Skip to content
Testing
Skill

/recipe-eval-prompt

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.

From plugin
rashomon
185 skills7 agents
Install
$ npx -y skills add shinpr/rashomon --skill recipe-eval-prompt --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/recipe-eval-prompt

Context preview

The summary Claude sees to decide when to auto-load this skill.

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.

SKILL.md

recipe-eval-prompt.SKILL.md
name: recipe-eval-prompt
description: 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.
disable-model-invocation: true

**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.

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**: 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**: 1. **Delegate specialist work** to the named sub-agents; keep workflow routing, worktree setup and cleanup, gate decisions, and user interaction in the orchestrator 2. **Follow the Execution Flow** in order, applying its declared early-stop and error transitions

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

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:

  • Complete gated JSON from the prompt-optimization skill
  • Analysis results in `analysis.pattern_coverage`
  • Individual issues in `analysis.findings`
  • Final prompt in `result.final_prompt`
  • Applied optimizations in `optimization.finding_resolutions`

**Quality Gate**:

  • [ ] Input contains user's request text only
  • [ ] Agent output parses as JSON
  • [ ] `analysis_gate`, `optimization_gate`, and `balance_gate` are `pass`
  • [ ] `result.status` is `optimized` or `original_sufficient`

When 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.

Step 3. Repeated Paired Execution

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**:

  • both execution statuses are `success`;
  • both results used fresh worktrees from the same repository state; and
  • both results report the pinned base SHA; and
  • neither result contains an environment-verification failure.

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.

Step 4. Environment Cleanup

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.

Step 5. Blind Report Generation

Invoke report-generator in two phases.

**Phase 1 — blind assessment**:

  • User task description
  • Anonymized valid pairs as Result A and Result B
  • No prompts, identity mapping, optimization findings, or change summary

The agent must complete and lock its output-quality judgment before Phase 2.

**Phase 2 — identity reveal**:

  • Identity mapping: A = original, B = optimized
  • Full prompt-analysis JSON, not only `optimization.finding_resolutions`
  • Execution metadata and diagnostics for every trial

Output:

  • Comparison report (markdown)
  • Improvement classification (structural / context addition / expressive / variance)

**Quality Gate**:

  • [ ] Output presented to user matches agent's output

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.

Step 6. 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 | |---------------|------------|-----------

Read more
Ships withrashomon

Measure prompt and skill improvements with blind A/B comparison.

Get the whole plugin

Other skills on rashomon.