--- name: prompt description: Optimize a prompt using templates and execute with specialized skills argument-hint: [--template=] [--code|--refactor|--review|--test|--docs|--documentation|--extract|--compare|--comparison|--custom] [--plan] [--return-only] allowed-tools: [Task, TodoWrite, Bash(~/.claude/plugins/marketplaces/claude-experiments/meta-prompt/commands/scripts/prompt-handler.sh:*)] --- Execute tasks using optimized prompts with domain-specific skills. {$TASK_DESCRIPTION} ## Process 1. **Call handler** with the task: ```bash ~/.claude/plugins/marketplaces/claude-experiments/meta-prompt/commands/scripts/prompt-handler.sh "{$TASK_DESCRIPTION}" ``` 2. **Parse XML response** from handler: - Extract `` and call TodoWrite with the todo items - Extract `` for subagent parameters - Check `` and `` for flow control 3. **Update TodoWrite** from ``: Parse each `` and call TodoWrite with the array. **Example transformation:** ```xml ``` Becomes TodoWrite input: ```json [ {"status": "in_progress", "content": "Optimize prompt", "activeForm": "Optimizing prompt"}, {"status": "pending", "content": "Execute task", "activeForm": "Executing task"} ] ``` 4. **Execute based on ``:** - If spawning subagent: Use Task tool with ``, ``, `` - Pass subagent XML results back to handler via `` - If `` present: execute that action instead of looping 5. **Handle `` values:** - `present_results`: Display the task execution results to the user - `present_optimized_prompt`: Display the optimized prompt to the user (for --return-only mode) 6. **Loop until `done`** 7. **Present results** to user when complete.