/rashomon:recipe-eval-promptfrom rashomon
Compares original and optimized prompts through repeated blind paired execution in git worktrees. Use when evaluating prompt improvement effects or learning prompt engineering through concrete examples.
Ships in rashomon. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Explicit User Instruction: The user explicitly instructs and authorizes every subagent call named in this recipe. Execute each applicable call when its prerequisites are met.
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: Pass the user's exact request to prompt-analyzer, execute the original and optimized prompts under identical conditions, and present report-generator's output unchanged.
Execution Protocol:
No user confirmation required between phases unless explicitly requested. Each phase must complete all required outputs before proceeding.
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)
Run worktree-execution skill.
Invoke: prompt-analyzer agent
Input:
Output:
analysis.pattern_coverageanalysis.findingsresult.final_promptoptimization.finding_resolutionsQuality Gate:
analysis_gate, optimization_gate, and balance_gate are passresult.status is optimized or original_sufficientWhen a gate is blocked, stop before environment setup and present the gate's missing items as the required input for continuing.
When result.status is original_sufficient, stop before environment setup. Return the analysis evidence and original prompt as the final prompt. Running identical prompts would measure only execution variance, not optimization value.
Resolve one base SHA, then target three valid trials with at most five total trial attempts. For every trial, create a fresh original/optimized worktree pair at that SHA using worktree-execution. Within a trial, invoke two prompt-executor agents simultaneously:
Subagent 1:
agent: prompt-executor
working_directory: {worktree_original_path}
expected_base_sha: {pinned_base_sha}
prompt: {original_request}
Subagent 2:
agent: prompt-executor
working_directory: {worktree_optimized_path}
expected_base_sha: {pinned_base_sha}
prompt: {prompt_analysis.result.final_prompt}
Each subagent executes the prompt as a development task within its isolated worktree. Clean the pair after collecting both results, then create fresh worktrees for the next trial.
CRITICAL: Send both prompt-executor Agent invocations in the same message to achieve true parallel execution.
Pair validity gate:
success;Keep failed and partial runs as diagnostics only. Continue until three valid pairs are collected or five total trial attempts have run. Compare with reduced confidence when two valid pairs remain. With fewer than two, set status to inconclusive, skip winner/recommendation claims, and report the diagnostics.
Execute worktree cleanup per worktree-execution skill "Cleanup" section.
Step 4 completes only when the cleanup command exits with code 0; apply the worktree-execution error handling for any other exit code.
Invoke report-generator in two phases.
Phase 1 — blind assessment:
The agent must complete and lock its output-quality judgment before Phase 2.
Phase 2 — identity reveal:
optimization.finding_resolutionsOutput:
Quality Gate:
The report joins analysis.findings and optimization.finding_resolutions by finding_id; pattern, severity, evidence, change, and source must remain traceable. Context delta is derived from resolutions whose source is a named project path or project knowledge entry.
Trigger: Report generation completes
Action: Ask user for feedback on comparison results, then delegate to knowledge-optimizer agent
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).
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):
| Scenario | Behavior |
|---|---|
| One side of a trial fails | Exclude the unpaired trial from quality comparison and retain diagnostics |
| Fewer than two valid pairs | Report inconclusive; no winner or prompt recommendation |
| All executions fail | Report full failure with diagnostics |
| Timeout | Terminate, capture partial results, cleanup |
| Worktree creation fails | Report git error, suggest checking repository state |
git worktree lock support/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.
What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/knowledge-baseRetrieves and updates project-specific prompt knowledge from comparison evidence and user feedback. Use only for prompt analysis or post-comparison learning within a Rashomon evaluation./prompt-optimizationImproves LLM-facing context while preserving intent, execution boundaries, and proportional work. Use when creating or reviewing prompts, agent definitions, skill definitions, or other instructions for an LLM./recipe-eval-skillCreates or updates Claude Code skills through interactive dialog, then evaluates effectiveness with sequential paired comparisons. Use when creating new skills, updating existing skills, or evaluating skill quality.npx claudepluginhub shinpr/rashomon --plugin rashomonOther plugins' skills for the same job