Run prompt
/run-promptGit status: !`git status --short`
--- name: run-prompt description: Delegate one or moreprompts to new 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 Recentprompts : !ls -t ./prompts/*.md | head -5 </context > <objective> Execute one or moreprompts from./prompts/ as delegated sub-tasks in a fresh context. Supports single-prompt -execution, parallel execution of multiple independent-prompts , and sequential execution of dependent-prompts . </objective > <input> The user will specify whichprompt s to run via $ARGUMENTS, which can be: Single-prompt s: - Empty (no arguments): Run the most recently createdprompt (default behavior) - Aprompt al number (e.g., "001", "5", "42") - A partial filename (e.g., "user-auth", "dashboard") prompts s: - Multiple numbers (e.g., "005 006 007") - With execution flag: "005 006 007--parallel " or "005 006 007--sequential " - If no flag is specified with multipleprompts , default to--sequential for safety </input > <process> <step1parsearguments > Parse $ARGUMENTS to extract: - Prompt numbers/names (all arguments that are not flags) - Execution strategy flag (--parallel or--sequential ) <examples> - "005" → Single-prompt s: 005 - "005 006 007" → Multiple-prompts s: [005, 006, 007], strategy: sequential (default) - "005 006 007--parallel " → Multipleprompts : [005, 006, 007], strategy: parallel - "005 006 007--sequential " → Multipleprompts : [005, 006, 007], strategy: sequential </examples > </step1parsearguments > <step2resolvefiles > For eachprompt number/name: - If empty or "last": Find using the!ls -t ./prompts/*.md | head -1 - If a number: Find a 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 <matchingrules > - If exactly one match is found: Use that file - If multiple matches are found: List them and ask the user to choose - If no matches are found: Report an error and list availableprompts </matchingrules > </step2resolvefiles > <step3execute > <singleprompt > 1. Read the complete contents of theprompt file 2. Delegate as a subtask using the Task tool withsubagent_type = "general-purpose" 3. Wait for completion 4. Archiveprompt to./prompts/completed/ with metadata 5. Commit all work: - Stage files YOU modified withgit add [file] (nevergit add . ) - Determine the appropriate commit type based on the changes (fix|feat|refactor|style|docs|test|chore) - Commit using the following format:[type]: [description] (lowercase, specific, concise) 6. Return results </singleprompt > <parallelexecution > 1. Read allprompt files 2. Launch all Task tools in a SINGLE MESSAGE (this is critical for parallel execution): <example> Use the Task tool forprompt 005 Use the Task tool forprompt 006 Use the Task tool forprompt 007 (All in one message with multiple tool calls) </example > 3. Wait for ALL to complete 4. Archive allprompts with metadata 5. Commit all work: - Stage files YOU modified usinggit add [file] (nevergit add . ) - Determine the appropriate commit type based on the changes (fix|feat|refactor|style|docs|test|chore) - Commit using the format:[type]: [description] (lowercase, specific, concise) 6. Return consolidated results </parallelexecution > <sequentialexecution > 1. Read the firstprompt file 2. Launch the Task tool for the firstprompt 3. Wait for completion 4. Archive the firstprompt 5. Read the secondprompt file 6. Launch the Task tool for the secondprompt 7. Wait for completion 8. Archive the secondprompt 9. Repeat for the remainingprompts 10. Archive allprompts with metadata 11. Commit all work: - Stage files YOU modified withgit add [file] (nevergit add . ) - Determine appropriate commit type based on changes (fix|feat|refactor|style|docs|test|chore) - Commit using the following format:[type]: [description] (lowercase, specific, concise) 12. Return consolidated results </sequentialexecution > </step3execute > </process > <context_strategy > By delegating to a subtask, the actual implementation work takes place in