Systematic framework for evaluating AI-facing prompts, tracking success rates across versions, and iterating prompts based on measured performance. Covers eval suite design, scoring criteria, version management, and data-driven prompt improvement.
A methodology for treating AI prompts as testable, measurable artifacts — not static text blobs.
Every AI-facing prompt is a function: it takes an input and produces an output. Like any function, it should be tested against expected behaviors, scored, and improved when it underperforms.
Activate this skill when:
┌─────────────────┐
│ 1. Define │ What does "good output" look like?
│ Criteria │ Write rubrics, regex checks, judge prompts.
└────────┬────────┘
▼
┌─────────────────┐
│ 2. Write │ Real-world inputs spanning easy, hard,
│ Test Cases │ and adversarial scenarios.
└────────┬────────┘
▼
┌─────────────────┐
│ 3. Run │ Feed each test case through the prompt,
│ Evaluation │ capture raw output, score each criterion.
└────────┬────────┘
▼
┌─────────────────┐
│ 4. Analyze │ Find patterns in failures. Which criteria
│ Results │ are weakest? Which test cases break?
└────────┬────────┘
▼
┌─────────────────┐
│ 5. Iterate │ Revise the prompt to address failures.
│ Prompt │ Never overwrite — version and re-eval.
└────────┬────────┘
▼
┌─────────────────┐
│ 6. Compare │ Side-by-side scoring across versions.
│ Versions │ Ship when score > threshold.
└────────┘────────┘
│
└──→ Repeat from step 3 if score < threshold
Read references/01-eval-criteria-types.md for the full taxonomy of criteria types.
Every eval suite needs 3-7 weighted criteria. Each criterion has:
| Field | Description |
|-------|-------------|
| id | Short identifier (no-jargon, follows-format) |
| description | What "passing" looks like in plain English |
| weight | Relative importance (0.0 - 1.0, all weights should sum to 1.0) |
| type | How to score it: exact_match, contains, regex, rubric, llm_judge |
Weight assignment heuristic: Criteria that affect user-facing quality or correctness get 2x the weight of stylistic/formatting criteria.
Read references/02-test-case-design.md for test case design patterns.
Minimum viable test suite: 5 test cases spanning:
Each test case has:
id: descriptive sluginput: the user message / context fed to the promptcontext: additional context or constraintsexpected (optional): a reference output for comparisonFor each test case:
{ test_id, output, scores, weighted_score }Compute overall suite score: weighted average across all test cases.
Read references/03-failure-diagnosis.md for the diagnostic framework.
After a run, answer these questions:
Common failure modes:
Read references/04-prompt-iteration-patterns.md for revision strategies.
Rules for iteration:
v1.md → v2.md → v3.mdRead references/05-version-comparison.md for comparison methodology.
Ship decision matrix:
| Overall Score | Action | |---------------|--------| | ≥ 0.90 | Ship with confidence | | 0.80 - 0.89 | Ship if no critical criteria are below 0.70 | | 0.70 - 0.79 | Iterate one more time, focus on lowest criteria | | < 0.70 | Major revision needed — reconsider the prompt's architecture |
evals/
<prompt-name>/
eval-suite.yaml
prompts/
v1.md
v2.md
changelog.md
results/
run-v1-2026-02-27T14-30.yaml
run-v2-2026-02-27T15-00.yaml
analysis/
comparison-v1-v2.md
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer