run-action

run-action is a command for Claude Code from Lykhoyda/rn-dev-agent. It costs 72 tokens per session (3,376 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the rn-dev-agent plugin — 28 skills, 17 commands, 6 agents, 6 hooks shipped together

Good fit 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.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Lykhoyda/rn-dev-agent
Claude Code
/plugin install rn-dev-agent

Made for: Claude Code.

Or install rn-dev-agent, the plugin that ships this one along with the rest of its 28 skills, 17 commands, 6 agents, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for run-action

README.md
[![agentmods](https://agentmods.dev/badge/commands/lykhoyda/rn-dev-agent/run-action/github.svg)](https://agentmods.dev/commands/lykhoyda/rn-dev-agent/run-action)
Your own site
<a href="https://agentmods.dev/commands/lykhoyda/rn-dev-agent/run-action"><img src="https://agentmods.dev/badge/commands/lykhoyda/rn-dev-agent/run-action/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for run-action

Your own site · 80×15
<a href="https://agentmods.dev/commands/lykhoyda/rn-dev-agent/run-action"><img src="https://agentmods.dev/badge/commands/lykhoyda/rn-dev-agent/run-action.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 3,376 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00072 $0.03376
Opus 5.5 $0.00029 $0.01350
Sonnet 5.5 $0.00014 $0.00675
Haiku 4.5 $0.00007 $0.00338

Measured 19d ago against content hash 0dc2bb09d88c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 19d ago.

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 · 264 lines

How it starts

The opening of the file, as written. The whole thing — 264 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:-${CURSOR_PLUGIN_ROOT:-${RN_DEV_AGENT_CODEX_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:?set it to the installed rn-dev-agent plugin root, then re-run}}}}/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 · 264 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. 19d ago Changed 0dc2bb09d88c
  2. 1mo ago Changed c975709266a7
  3. 1mo ago Changed · +7 lines 30058d872c36
  4. 1mo ago Changed · +20 lines 8d606159d420
  5. 1mo ago 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 (20 stars, last pushed today), licensed MIT. It adds 72 tokens to every session and 3,376 once invoked, about $0.0003 per session on Opus 5.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.