Skip to main content
command CX Codex

run-prompt — Claude Code command: run prompts

This command sends prompts from ./prompts/ to fresh sub-task contexts, one at a time or in parallel. Use it to run independent work concurrently or keep dependent tasks in order.

MIT ★ 1,988 updated 2026-04-01

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add glittercowboy/taches-cc-resources
/plugin install taches-cc-resources@taches-cc-resources
Open on GitHub

What run-prompt does

run-prompt locates prompt files by number or filename fragment, reads them, and delegates each through Task with the general-purpose subagent type. With no argument, it picks the most recently created prompt. For multiple prompts, choose --parallel or --sequential; sequential execution is the default.

Once a task succeeds, the command moves its prompt into ./prompts/completed/ and prepares a commit. It stages changed files individually and selects a commit type based on the changes. Parallel tasks are launched together in one message. A missing prompt produces an error with available prompts; a failed task stops a sequential run.

What it helps with

  • run the newest prompt in ./prompts/
  • locate a prompt by number or filename fragment
  • run independent prompts concurrently
  • keep dependent prompts in sequence
  • archive completed prompts and prepare a commit

Example prompts for the agent

  • Run the newest prompt from ./prompts/.
  • Run prompts 005 006 007 one after another.
  • Run 005 006 007 in parallel.

How to install run-prompt

1Plugin marketplace

/plugin marketplace add glittercowboy/taches-cc-resources
/plugin install taches-cc-resources@taches-cc-resources

2Manually: put the files in place

.claude/commands/run-prompt.md

Call it with /run-prompt. For all projects use ~/.claude/commands/

Questions about run-prompt

How do I install run-prompt in Claude Code?

Run /plugin marketplace add glittercowboy/taches-cc-resources, then /plugin install taches-cc-resources@taches-cc-resources. The command file is .claude/commands/run-prompt.md.

What does run-prompt do?

It selects prompt files from ./prompts/ and delegates them to subagents. After successful execution, it archives the prompts and prepares a commit.

How do I run multiple prompts in parallel?

Pass their numbers or names with --parallel, such as 005 006 007 --parallel. Without a mode flag, multiple prompts run sequentially.

Source text

run-prompt.md · MIT
---
name: run-prompt
description: Delegate one or more prompts to fresh sub-task contexts with parallel or sequential execution
argument-hint: <prompt-number(s)-or-name> [--parallel|--sequential]
allowed-tools: [Read, Task, Bash(ls:*), Bash(mv:*), Bash(git:*)]
---

<context>
Git status: !`git status --short`
Recent prompts: !`ls -t ./prompts/*.md | head -5`
</context>

<objective>
Execute one or more prompts from `./prompts/` as delegated sub-tasks with fresh context. Supports single prompt execution, parallel execution of multiple independent prompts, and sequential execution of dependent prompts.
</objective>

<input>
The user will specify which prompt(s) to run via $ARGUMENTS, which can be:

**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
  </input>

<process>
<step1_parse_arguments>
Parse $ARGUMENTS to extract:
- Prompt numbers/names (all arguments that are not flags)
- Execution strategy flag (--parallel or --sequential)

<examples>
- "005" → Single prompt: 005
- "005 006 007" → Multiple prompts: [005, 006, 007], strategy: sequential (default)
- "005 006 007 --parallel" → Multiple prompts: [005, 006, 007], strategy: parallel
- "005 006 007 --sequential" → Multiple prompts: [005, 006, 007], strategy: sequential
</examples>
</step1_parse_arguments>

<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

<matching_rules>

- If exactly one match found: Use that file
- If multiple matches found: List them and ask user to choose
- If no matches found: Report error and list available prompts
  </matching_rules>
  </step2_resolve_files>

<step3_execute>
<single_prompt>

1. Read the complete contents of the prompt file
2. Delegate as sub-task using Task tool with subagent_type="general-purpose"
3. Wait for completion
4. Archive prompt to `./prompts/completed/` with metadata
5. Commit all work:
   - Stage files YOU modified with `git add [file]` (never `git add .`)
   - Determine appropriate commit type based on changes (fix|feat|refactor|style|docs|test|chore)
   - Commit with format: `[type]: [description]` (lowercase, specific, concise)
6. Return results
   </single_prompt>

<parallel_execution>

1. Read all prompt files
2. **Spawn all Task tools in a SINGLE MESSAGE** (this is critical for parallel execution):
   <example>
   Use Task tool for prompt 005
   Use Task tool for prompt 006
   Use Task tool for prompt 007
   (All in one message with multiple tool calls)
   </example>
3. Wait for ALL to complete
4. Archive all prompts with metadata
5. Commit all work:
   - Stage files YOU modified with `git add [file]` (never `git add .`)
   - Determine appropriate commit type based on changes (fix|feat|refactor|style|docs|test|chore)
   - Commit with format: `[type]: [description]` (lowercase, specific, concise)
6. Return consolidated results
   </parallel_execution>

<sequential_execution>

1. Read first prompt file
2. Spawn Task tool for first prompt
3. Wait for completion
4. Archive first prompt
5. Read second prompt file
6. Spawn Task tool for second prompt
7. Wait for completion
8. Archive second prompt
9. Repeat for remaining prompts
10. Archive all prompts with metadata
11. Commit all work:
    - Stage files YOU modified with `git add [file]` (never `git add .`)
    - Determine appropriate commit type based on changes (fix|feat|refactor|style|docs|test|chore)
    - Commit with format: `[type]: [description]` (lowercase, specific, concise)
12. Return consolidated results
    </sequential_execution>
    </step3_execute>
    </process>

<context_strategy>
By delegating to a sub-task, the actual implementation work happens in fresh context while the main conversation stays lean for orchestration and iteration.
</context_strategy>

<output>
<single_prompt_output>
✓ Executed: ./prompts/005-implement-feature.md
✓ Archived to: ./prompts/completed/005-implement-feature.md

<results>
[Summary of what the sub-task accomplished]
</results>
</single_prompt_output>

<parallel_output>
✓ Executed in PARALLEL:

- ./prompts/005-implement-auth.md
- ./prompts/006-implement-api.md
- ./prompts/007-implement-ui.md

✓ All archived to ./prompts/completed/

<results>
[Consolidated summary of all sub-task results]
</results>
</parallel_output>

<sequential_output>
✓ Executed SEQUENTIALLY:

1. ./prompts/005-setup-database.md → Success
2. ./prompts/006-create-migrations.md → Success
3. ./prompts/007-seed-data.md → Success

✓ All archived to ./prompts/completed/

<results>
[Consolidated summary showing progression through each step]
</results>
</sequential_output>
</output>

<critical_notes>

- For parallel execution: ALL Task tool calls MUST be in a single message
- For sequential execution: Wait for each Task to complete before starting next
- Archive prompts only after successful completion
- If any prompt fails, stop sequential execution and report error
- Provide clear, consolidated results for multiple prompt execution
  </critical_notes>

© Lex Christopherson · MIT · glittercowboy/taches-cc-resources

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →

From the same set48

The whole set →
technical Researches technical implementation options, evaluates libraries and tradeoffs, and saves a ready architecture brief into Markdown. CX Codex +1 ★ 1,988repo stars feasibility feasibility is a command that assesses whether a project can meet its constraints and recommends whether to proceed, revise terms, or stop. CX Codex +1 ★ 1,988repo stars landscape Maps a domain landscape: identifies key players, available tools, trends and gaps. Takes a domain name or works in current context without arguments. CX Codex +1 ★ 1,988repo stars build-iphone-apps build-iphone-apps builds native iPhone apps in Swift using SwiftUI and UIKit via terminal commands without opening the Xcode IDE. Handles everything from code to App Store shipping. CX Codex +1 ★ 1,988repo stars open-source Finds existing open-source libraries and tools for the problem at hand, checks whether they are still maintained, and says whether to use one or build your own. CX Codex +1 ★ 1,988repo stars create-mcp-servers create-mcp-servers guides development of Model Context Protocol servers in Python and TypeScript for Claude Code, covering architecture, secrets isolation, and debugging. CX Codex +1 ★ 1,988repo stars slash-command-auditor slash-command-auditor audits Claude Code slash-command .md files for structure, arguments, context loading, tool scope, and security issues. CX Codex ★ 1,988repo stars create-hooks The create-hooks skill explains how Claude Code hooks work and gives ready configs for blocking dangerous commands, logging, and auto-formatting. CX Codex +1 ★ 1,988repo stars

Project sponsors

Companies that keep this analytics open