run-prompt

run-prompt is a command for Claude Code from marcusgoll/Spec-Flow. It costs 19 tokens per session (1,746 once invoked), scanned A, original, MIT.

A command for sending one or more prompts to fresh task contexts, either at the same time or in sequence. A fresh context is a separate workspace for handling a subtask.

In plain words
What is it for?
Use it to run saved prompts by number or filename, select parallel or sequential execution, and apply configured execution preferences.
Why use it?
It helps split larger jobs into focused subtasks and choose whether independent work can run in parallel or must follow a safe order.

Command for Claude Code

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/marcusgoll/spec-flow/run-prompt
Clone the repo
git clone --depth 1 https://github.com/marcusgoll/Spec-Flow

Made for: Claude Code.

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-prompt

README.md
[![agentmods](https://agentmods.dev/badge/commands/marcusgoll/spec-flow/run-prompt.svg)](https://agentmods.dev/commands/marcusgoll/spec-flow/run-prompt)
Your own site
<a href="https://agentmods.dev/commands/marcusgoll/spec-flow/run-prompt"><img src="https://agentmods.dev/badge/commands/marcusgoll/spec-flow/run-prompt.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,746 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.00019 $0.01746
Opus 5 $0.00010 $0.00873
Sonnet 5 $0.00004 $0.00349
Haiku 4.5 $0.00002 $0.00175

Measured 5d ago against content hash 46f67022165c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

run-prompt 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 5d 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.

.claude/commands/meta/run-prompt.md · 213 lines

How it starts

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

Execution Strategy Flags:

  • --auto-detect: Analyze prompt dependencies and choose strategy automatically (default)
  • --parallel: Force parallel execution (independent tasks only)
  • --sequential: Force sequential execution (safe for dependent tasks)
  • --no-input: Non-interactive mode for CI/CD - uses auto-detect strategy

Preference System: The command uses 3-tier preferences to determine execution strategy:

  1. Config file: .spec-flow/config/user-preferences.yaml (default_strategy)
  2. Command history: Learns from past usage
  3. Command-line flags: Explicit overrides

Single prompt:

  • Empty (no arguments): Run the most recently created prompt (default behavior)
  • A prompt number (e.g., "001", "5", "42")
  • A partial filename (e.g., "user-auth", "dashboard")

Multiple prompts:

  • Multiple numbers (e.g., "005 006 007")
  • With execution flag: "005 006 007 --parallel" or "005 006 007 --sequential"
  • If no flag specified with multiple prompts, default to --sequential for safety

Determine execution strategy using 3-tier preference system:

a. Load configuration file (Tier 1 - lowest priority):

$preferences = & .spec-flow/scripts/utils/load-preferences.ps1 -Command "run-prompt"
$configStrategy = $preferences.commands.'run-prompt'.default_strategy  # "auto-detect", "parallel", or "sequential"

b. Load command history (Tier 2 - medium priority, overrides config):

$history = & .spec-flow/scripts/utils/load-command-history.ps1 -Command "run-prompt"

if ($history.last_used_mode -and $history.total_uses -gt 0) {
    $preferredStrategy = $history.last_used_mode  # Use learned preference
} else {
    $preferredStrategy = $configStrategy  # Fall back to config
}

c. Check command-line flags (Tier 3 - highest priority):

const args = "$ARGUMENTS".trim();
const hasParallelFlag = args.includes('--parallel');
const hasSequentialFlag = args.includes('--sequential');
const hasAutoDetect = args.includes('--auto-detect');
const hasNoInput = args.includes('--no-input');

let selectedStrategy;

if (hasNoInput || hasAutoDetect) {
    selectedStrategy = 'auto-detect';  // CI/automation default
} else if (hasParallelFlag) {
    selectedStrategy = 'parallel';  // Explicit parallel override
} else if (hasSequentialFlag) {
    selectedStrategy = 'sequential';  // Explicit sequential override
} else {
    selectedStrategy = preferredStrategy;  // Use config/history preference
}

d. Track usage for learning system:

# Record selection after command completes successfully
& .spec-flow/scripts/utils/track-command-usage.ps1 -Command "run-prompt" -Mode $selectedStrategy

</step0_load_preferences>

<step1_parse_arguments> Parse $ARGUMENTS to extract:

  • Prompt numbers/names (all arguments that are not flags)
  • Execution strategy: Use selectedStrategy from preference system

<step2_resolve_files> For each prompt number/name:

  • If empty or "last": Find with !ls -t ./prompts/*.md | head -1
  • If a number: Find file matching that zero-padded number (e.g., "5" matches "005-.md", "42" matches "042-.md")
  • If text: Find files containing that string in the filename

Read the full file on GitHub · 213 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. 5d ago First seen · 213 lines · 19 tokens per session scan A 46f67022165c

Subscribe to this mod's changes

run-prompt is a command published in the GitHub repository marcusgoll/Spec-Flow (92 stars, last pushed 4mo ago), licensed MIT. It adds 19 tokens to every session and 1,746 once invoked, about $0.0001 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.