mx-auto
Use this skill when the user wants to:
- view the currently available local triggers
- execute an existing App trigger
- save or inspect the mode/config defaults used for trigger execution
- refresh or reuse the last callable trigger snapshot
- drive the workflow from another agent that prefers stable structured inputs and outputs
For complex or ambiguous requests, read references/learning-guide.md before deciding what to ask or run.
Core Rules
- Keep the skill narrow. Support only
trigger.execute. - Current active mode is
localonly. - Use direct Runtime HTTP APIs.
- The trigger execution command body is:
{ target: "trigger.execute", payload: { triggerId, input? }, wait, leaseTtlMs }
- Ask only for missing local Runtime config or missing trigger identity.
- Prefer
triggerNamein normal usage because it is easier for humans to work with. - If both
triggerNameandtriggerIdare present, resolve by exact cached trigger name first. - If the name does not resolve, fall back to explicit
triggerId. - Refresh trigger snapshots from local Runtime when local access is available, instead of guessing trigger ids.
- Do not broaden this skill into
connector.collectorscript.run. - Cloud files are kept only as reserved structure for later recovery. They are not active in this version.
- Prefer stable machine-readable output when another agent needs to parse trigger lists:
--list-format json
- Default to auto-discovery before asking for anything:
- discover local Runtime base URL first
- when a user names a trigger, try running it with no
inputfirst - ask only when auto-discovery fails or Runtime clearly says required input is missing
- Use the wrapper entry point:
bash {baseDir}/scripts/run.sh ...
Persistent State
Preferences file:
$OPENCLAW_STATE_DIR/skill-state/mx-auto/preferences.json
Fallback:
$HOME/.openclaw/skill-state/mx-auto/preferences.json
Helper script:
bash {baseDir}/scripts/export_preference.sh show
bash {baseDir}/scripts/export_preference.sh check
bash {baseDir}/scripts/export_preference.sh apply-recommended
bash {baseDir}/scripts/export_preference.sh set-key defaultConnectionMode local
bash {baseDir}/scripts/export_preference.sh set-key defaultCloudDeviceId <device_id>
Persisted defaults:
defaultConnectionModedefaultLocalBaseUrldefaultCloudBaseUrldefaultCloudDispatchPathdefaultCloudCommandStatusPathTemplatedefaultCloudCommandListPathdefaultCloudDeviceIddefaultCloudTokendefaultWaitdefaultLeaseTtlMsdefaultPollSecdefaultTimeoutSec
Cached trigger snapshot:
triggerSnapshot.loadedAttriggerSnapshot.sourceModetriggerSnapshot.registryPathtriggerSnapshot.services[]
Defaults
Recommended defaults:
defaultConnectionMode=localdefaultWait=truedefaultLeaseTtlMs=60000defaultPollSec=3defaultTimeoutSec=1200
Local Runtime discovery order:
MX_APP_RUNTIME_BASE_URLRPA_RUNTIME_BASE_URL- stored
defaultLocalBaseUrl - standard Runtime ports:
8877,8878,8879
- Use
/local/statusfor optional probing. - Load trigger catalogs from
/trigger-services. - Dispatch only through
/local/commands/send.
Trigger Resolution
Resolution order is fixed:
- exact cached trigger name match from
--trigger-name --trigger-id- fail with a clear message telling the user to refresh triggers locally, or provide
triggerIdif the name is not cached yet
Common Commands
List currently available local triggers:
bash {baseDir}/scripts/run.sh --connection-mode local --list-triggers
List currently available local triggers for agent parsing:
bash {baseDir}/scripts/run.sh --connection-mode local --list-triggers --list-format json
Refresh trigger snapshot from local Runtime:
bash {baseDir}/scripts/run.sh --connection-mode local --refresh-triggers
Run by trigger id in local mode:
bash {baseDir}/scripts/run.sh \
--connection-mode local \
--trigger-id trigger_xxx
Run by cached trigger name in local mode:
bash {baseDir}/scripts/run.sh \
--connection-mode local \
--trigger-name "小红书测试"
Run with explicit business input only when the user intentionally overrides a trigger's built-in configuration:
bash {baseDir}/scripts/run.sh \
--connection-mode local \
--trigger-name "小红书测试" \
--input-json '{"keyword":"AI employee"}'
Final Reply
When a human asks for listing, prefer a short human-readable trigger list:
- trigger count
- trigger names
- status
- summary only when it is actually useful
When another agent needs the list, prefer structured JSON with:
modesourceModeloadedAtregistryPathtriggerCounttriggers[]
When execution succeeds, summarize:
- mode
- trigger identity
- commandId when available
- final status
- the key result
When the run fails, clearly distinguish:
- local Runtime reachability or authorization problems
- trigger list refresh failure
- command execution failure
Use this minimal user-facing guidance when local auto-discovery fails:
“本地模式会先自动查找本地 Runtime。通常不需要手动配置。 如果自动发现失败,优先检查:
- Runtime 是否正在本机运行
- Runtime 的本地配置是否已准备好
- 如果路径或端口不是默认值,再显式设置对应环境变量或运行参数”