recipe-eval-prompt
Compares original and optimized prompts by parallel execution in git worktrees. Use when evaluating prompt improvement effects or learning prompt engineering through concrete examples.
What this skill does
# Prompt Evaluation
## Orchestrator Definition
**Purpose**: Provide accurate feedback on prompt optimization effects, enabling users to learn effective prompting through concrete comparison results.
**Core Identity**: "I route information between specialized agents. I pass user input to analyzers. I present agent outputs to users."
**Pass-through Principle**: User requests flow directly to agents. Agent outputs flow directly to users. Both prompts execute under identical conditions.
**Execution Protocol**:
1. **Delegate all work** to sub-agents (orchestrator role only)
2. **Register all steps via TaskCreate** before starting, update status via TaskUpdate upon completion
## Phase Boundaries
No user confirmation required between phases unless explicitly requested.
Each phase must complete all required outputs before proceeding.
## Input
The user provides a natural language request. Pass it directly to prompt-analyzer.
**Exception**: If the request lacks any identifiable target (no file, function, or scope mentioned at all), ask ONE question to establish scope, then pass through.
**Extended timeout**: If the user mentions needing more time, use up to 1800 seconds (default: 300 seconds)
## Execution Flow
**Task Registration**: Register execution steps via TaskCreate and proceed systematically
### Step 1. Run Required Skills
Run worktree-execution skill.
### Step 2. Prompt Analysis and Optimization
**Invoke**: prompt-analyzer agent
Input:
- User's exact request text
Output:
- Analysis results (detected patterns)
- Optimized prompt
- Applied optimizations list
**Quality Gate**:
- [ ] Input contains user's request text only
- [ ] Output presented to user matches agent's output
### Step 3. Execution Environment Setup
Execute environment setup per worktree-execution skill "Creation" section.
### Step 4. Parallel Execution
**Invoke**: Two prompt-executor agents simultaneously (single message, parallel Task calls)
```yaml
Subagent 1:
agent: prompt-executor
working_directory: {worktree_original_path}
prompt: {original_request}
Subagent 2:
agent: prompt-executor
working_directory: {worktree_optimized_path}
prompt: {optimized_request}
```
Each subagent executes the prompt as a development task within its isolated worktree.
**CRITICAL**: Both Task tool calls MUST be in the same message to achieve true parallel execution.
### Step 5. Environment Cleanup
Execute worktree cleanup per worktree-execution skill "Cleanup" section.
### Step 6. Report Generation
**Invoke**: report-generator agent
Input:
- Original and optimized prompts
- Execution results from both subagents
- Applied optimizations list
Output:
- Comparison report (markdown)
- Improvement classification (structural / context addition / expressive / variance)
**Quality Gate**:
- [ ] Output presented to user matches agent's output
### Step 7. Retrospective
**Trigger**: Report generation completes
**Action**: Ask user for feedback on comparison results, then delegate to knowledge-optimizer agent
## Improvement Classification
Apply the execution quality criteria from the prompt-optimization skill.
| Classification | Definition | Interpretation |
|---------------|------------|----------------|
| **Structural** | Prompt structure, clarity, specificity improvements | Prompt writing technique |
| **Context Addition** | Project-specific information added from codebase investigation | Information advantage |
| **Expressive** | Different phrasing, equivalent substance | Neutral |
| **Variance** | Within LLM probabilistic variance | Original prompt sufficient |
**Key Principle**: Distinguish between prompt writing improvements (Structural) and information additions (Context Addition).
## Final Output to User
Present report-generator's complete output to user.
Optimized prompt must appear in full. This is the core learning value of the report.
The report includes (defined in report-generator):
- Input Prompts (original and optimized full text)
- Optimizations Applied
- Execution Results
- Comparison Analysis
- Learning Points
## Error Handling
| Scenario | Behavior |
|----------|----------|
| One subagent fails | Continue with successful result, report as "partial" |
| Both subagents fail | Report full failure with diagnostics |
| Timeout | Terminate, capture partial results, cleanup |
| Worktree creation fails | Report git error, suggest checking repository state |
## Prerequisites
- Git repository (git 2.5+ for worktree support)
- Claude Code subagent execution permissions
- Sufficient disk space for worktree copies
## Usage Examples
```
/recipe-eval-prompt
Add error handling to generateResponse in geminiService.ts. Handle 429, timeout, and invalid responses.
```
```
/recipe-eval-prompt
Generate code following this skill: .claude/skills/my-skill/SKILL.md
```
For complex tasks:
```
/recipe-eval-prompt
Refactor the message pipeline for readability. This may take a while.
```
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.