From 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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rashomon:recipe-eval-promptThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Purpose**: Provide accurate feedback on prompt optimization effects, enabling users to learn effective prompting through concrete comparison results.
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:
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)
Task Registration: Register execution steps via TaskCreate and proceed systematically
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: Both Task tool calls MUST be 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.
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.
npx claudepluginhub shinpr/rashomon --plugin rashomonEvaluate how you use Claude Code — analyze prompt patterns, feature utilization, and get improvement suggestions. Trigger: /prompts:evaluate, prompt analysis, usage evaluation, how am I using Claude
Runs autonomous optimization loops to iteratively improve prompts, templates, configs, or code using four-way separation of main agent, eval agent, test runner, and deterministic eval.py judge. Invoke via /autoresearch or 'optimize this prompt'.
Guides versioning prompts like code with Git, testing changes via regression/A/B tests, and managing deployments/rollbacks. Useful for prompt engineering workflows to track iterations and avoid regressions.