run-action

A command that replays a previously saved Maestro action by name. Maestro is a tool for describing and running mobile-app interactions, and the command can pass environment values to the saved flow.

In plain words
What is it for?
Use it to run a saved mobile-app flow on the current iOS or Android session, provide values for placeholders, choose the platform, or turn off automatic repair.
Why use it?
It lets you reuse a known interaction sequence instead of manually rebuilding the same device steps. It can also retry a missing selector through its automatic repair process unless that option is disabled.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/lykhoyda/rn-dev-agent/run-action
Clone the repo
git clone --depth 1 https://github.com/Lykhoyda/rn-dev-agent
Per session 72 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,957 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00072 $0.02957
Opus 5 $0.00036 $0.01478
Sonnet 5 $0.00014 $0.00591
Haiku 4.5 $0.00007 $0.00296

Measured yesterday against content hash 4529e580b067, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

run-action scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/claude-plugin/commands/run-action.md · 237 lines

How it starts

The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Execute the learned action: $ARGUMENTS

What this command does

/rn-dev-agent:list-learned-actions lists what's available; /rn-dev-agent:run-action actually replays one. Together they implement the artifact-first protocol from feedback_execute_artifacts_before_manual.md: list → match → run, before composing any device_* primitives manually.

The action name is matched against the inventory's flow field (filename without .yaml). Substring + case-insensitive — task-create will match wizard-create-task if it's the only candidate; ambiguity errors otherwise.

Argument parsing

The first positional arg is the action name (required). Subsequent args are parsed into the cdp_run_action request:

  • -e KEY=VALUE — environment variable for ${KEY} placeholders in the flow. Keys must match [A-Z_][A-Z0-9_]* (Maestro convention) — anything else is rejected by cdp_run_action / maestro_run (GH #116).
  • --platform <ios|android> — must match the current ready session; omitted values are filled from that session
  • --no-auto-repair — opt out of cdp_repair_action retry on SELECTOR_NOT_FOUND (default: auto-repair on)

Example calls:

/rn-dev-agent:run-action wizard-create-task -e TITLE="Buy milk" -e PRIORITY=high -e TAG=feature -e DESC="Test"
/rn-dev-agent:run-action mark-all-done --platform android
/rn-dev-agent:run-action mark-all-done --no-auto-repair    # surface the raw failure without patching

Protocol

  1. Parse arguments. First word of $ARGUMENTS is the action name. Detect --platform, --no-auto-repair, and collect every -e KEY=VALUE pair into a params object (key must match [A-Z_][A-Z0-9_]*; reject malformed early — cdp_run_action will refuse them anyway, but catching at parse time gives a clearer error). Treat anything else as a passthrough flag.

  2. Resolve the action via the script (single source of truth — never glob .rn-agent/actions/ directly):

    ACTION_NAME="<first-arg>"
    RESULT=$(node "${CLAUDE_PLUGIN_ROOT}/rn-dev-agent-core/dist/learned-actions.js" \
      --json --section b \
      --workspace-root "$PWD" --memory-cwd "$PWD" \
      --filter "$ACTION_NAME")
    COUNT=$(echo "$RESULT" | jq '.sections.flows.count')
    
    • 0 matches: stop. Tell the user what they searched for, list the closest 5 alternatives by running the script again with a broader filter (or no filter), and suggest creating the flow via /rn-dev-agent:test-feature.
    • >1 match: stop. Print the candidates with their full paths and ask the user to disambiguate (e.g. by passing the full filename without .yaml).
    • 1 match: continue to step 3.

Read the full file on GitHub · 237 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 237 lines · 72 tokens per session scan A 4529e580b067

Subscribe to this mod's changes

run-action is a command published in the GitHub repository Lykhoyda/rn-dev-agent (11 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 2,957 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.