/devflow:eval-harness [mode: create|run|report]from DevFlow Skills Collection
Builds and runs evaluation suites for AI features: prompts, LLM calls, RAG pipelines, agents. Supports create/run/report modes with graders (exact match, regex, code execution, LLM judge, human) and metrics (pass@k, latency, cost).
Ships in DevFlow Skills Collection. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Reference files (open one when a step points to it):
references/eval-types.md: Eval typesreferences/file-format.md: Eval file formatreferences/graders.md: Gradersreferences/metrics.md: Metrics — pass@k, pass^k, latency, costBuild and run evaluation suites for AI features in the user's application — a prompt, an LLM call, a RAG pipeline, an agent. Covers two eval types (capability, regression), three grader families (code, model, human), and the metrics that summarise them (pass@k, pass^k, latency, cost).
Not this skill:
skill-creator skill.claude-api skill's build-eval and hillclimb subcommands, which go further than this skill. If claude-api is not in your skill list, carry on here.| Mode | Does | Writes |
|---|---|---|
create | Defines the suite: success criteria, eval files, graders, thresholds | evals/eval-suite.yaml + eval files |
run | Generates or reuses the runner script and executes the suite | <output_dir>/<run-id>/results.jsonl, summary.json |
report | Reads a run's results, computes metrics, compares to thresholds and the previous run | <output_dir>/<run-id>/report.md |
Without an argument, infer the mode: no suite yet → create; a suite but no results, or the code changed since the last run → run; results present and the user asks how it went → report.
Evals are defined before or alongside implementation, not after, so "working" is explicit and testable from day one.
| Type | Purpose | When to use |
|---|---|---|
| Capability | Verify new functionality works | Adding features, improving functionality, testing edge cases |
| Regression | Protect against unintended breakage | After code changes, before PR merge, after dependency or model updates |
Full structures and YAML examples → references/eval-types.md.
| Type | Strength | When to use |
|---|---|---|
| Code (exact match, regex, function output) | Fast, deterministic, cheap | Any codifiable correctness check |
| Model (LLM judge with rubric, structured verdict) | Handles semantic variation, tone, quality | Natural-language outputs, multiple valid answers |
| Human (Likert, binary, ranking) | Catches what machines miss | Creative content, safety-critical judgments, calibrating model graders |
Configs, implementation sketches, judge call and rubric templates → references/graders.md.
| Metric | Question answered | Use case |
|---|---|---|
| pass@1 | "Can it solve this at all?" | Single-shot capability |
| pass@k | "Can it ever solve this?" | Best-of-k capability, retries cheap |
| pass^k | "Can it always solve this?" | Consistency, reliability, production |
| latency p50 / p95 | "How long does a case take?" | Interactive features, latency budgets |
| tokens and cost per case | "What does a case cost?" | Model or prompt comparisons, budget checks |
Formulas, what to record per case, and the picking guide → references/metrics.md.
Write the suite file and the eval files it references. Eval file format → references/file-format.md.
# evals/eval-suite.yaml
eval_suite:
name: "Feature X evaluation suite"
version: "1.0.0"
description: "Capability and regression evals for Feature X"
target: # how the runner calls the system under test
entry_point: "src/feature_x/answer.py:answer" # the real code path, not a rebuilt API call
config:
reps: 3 # samples per case; the k available to pass@k and pass^k
max_workers: 4
timeout_per_case_seconds: 120
thresholds:
pass_at_1: 0.85
pass_hat_3: 0.70
latency_p95_seconds: 8
evals:
- $ref: "./capability/cap-001.yaml"
- $ref: "./capability/cap-002.yaml"
- $ref: "./regression/reg-001.yaml"
output_dir: "./results"
Checklist:
references/graders.md)While implementing the feature, run the relevant subset often (run with a filter) and use failures to guide the work.
There is no eval-harness CLI. The runner is a small script in the user's project, written in the project's language and idiom, that you generate once and reuse.
evals/run_evals.*, an eval script in package.json or the Makefile, a pytest marker). Reuse it if it meets the contract below; extend it rather than writing a second one.evals/run_evals.<ext> — a pytest module or Click CLI for Python, an npm script for Node, and so on.Runner contract:
--filter <category-or-tag>, --reps <k>, --run-id <id>.$ref, and validate that every test case has input, grader, and expected where its grader needs one.target, mocking only external side effects (emails, payments, production writes), with the per-case timeout. Record the output, latency_s, and — when the call surfaces them — model and token usage from the response.judge_model and judge_usage; human-graded cases go to review.jsonl with status pending. Details → references/graders.md.<output_dir>/<run-id>/results.jsonl as each finishes, with case_id, rep, category, tags, status (ok | error | timeout | pending), passed, score, details, latency_s, model, usage, judge_model, judge_usage. Infrastructure failures get status: error, not passed: false, so they aren't counted as model failures. On restart, skip (case, rep) pairs already written.summary.json (pass rate per category and per grader type, pass@k / pass^k, latency and token summaries per references/metrics.md), print one PASS/FAIL line per threshold, and exit non-zero if any threshold fails, so the run can gate a merge.Read results.jsonl (plus any grades filled into review.jsonl), compute the metrics in references/metrics.md, and write report.md from a summary like this:
eval_report:
metadata:
suite_name: "Feature X evaluation suite"
run_id: "eval-20261006-143052"
timestamp: "2026-10-06T14:30:52Z"
duration_seconds: 127
environment:
model: "claude-opus-5-5" # model under test, as reported by the responses
app_version: "1.2.3"
summary:
total_cases: 25
passed: 22
failed: 3
errors: 0
pending_human: 0
pass_rate: 0.88
by_category:
capability: { total: 15, passed: 13, pass_rate: 0.867 }
regression: { total: 10, passed: 9, pass_rate: 0.90 }
by_grader:
code: { total: 18, passed: 17 }
model: { total: 5, passed: 4 }
human: { total: 2, passed: 1 }
metrics:
pass_at_1: 0.88
pass_at_3: 0.96
pass_hat_3: 0.68
latency_s: { p50: 2.1, p95: 4.8, max: 7.2 }
tokens_per_case: { input_median: 1850, output_median: 420 }
cost_usd: { per_case_median: 0.016, run_total: 1.21, judge_total: 0.41 } # derived from usage at report time
thresholds:
- { metric: pass_at_1, value: 0.88, threshold: 0.85, status: PASS }
- { metric: pass_hat_3, value: 0.68, threshold: 0.70, status: FAIL }
failures:
- eval_id: "cap-003"
name: "Complex nested extraction"
reason: "Missed nested array handling"
- eval_id: "cap-011"
name: "Edge case: empty input"
reason: "Threw exception instead of returning empty"
- eval_id: "reg-007"
name: "Code review comment quality"
reason: "Specificity score 3.6, baseline 4.2 (tolerance -0.3)"
regressions_since_previous_run:
- "reg-007: passed in eval-20261005-091200, fails now"
recommendations:
- "Improve nested data structure handling"
- "Add empty input validation"
Compare with the previous run in the same output_dir when there is one, and list the cases that flipped from pass to fail.
Evals can be run as a manual gate before marking an implementation phase complete: run the suite and check the threshold lines.
| Output type | Recommended grader | Rationale |
|---|---|---|
| Exact values | Code (exact match) | Fast, deterministic |
| Formatted text | Code (regex) | Validates structure |
| Code output | Code (function) | Tests correctness |
| Natural language | Model | Handles variation |
| Creative content | Human | Subjective judgment |
| Safety-critical | Human + Model | Double verification |
| Scenario | Recommended metric |
|---|---|
| Code generation (any solution works) | pass@k |
| Production system reliability | pass^k |
| Single-shot capability | pass@1 |
| Best-effort with retries | pass@5 or pass@10 |
| Consistency requirements | pass^3 or pass^5 |
| Interactive feature | latency p95 alongside pass@1 |
| Context | pass@1 | pass@k | pass^k |
|---|---|---|---|
| Development | 0.70 | 0.90 | 0.50 |
| Staging | 0.80 | 0.95 | 0.65 |
| Production | 0.90 | 0.99 | 0.80 |
| Critical | 0.95 | 0.999 | 0.90 |
references/eval-types.md — capability and regression eval structures with YAML examplesreferences/graders.md — code / model / human grader configs, the structured-output judge call, rubric examples, calibrationreferences/metrics.md — pass@k and pass^k formulas, latency and cost recording and summaries, picking guidereferences/file-format.md — eval file schemas (YAML/JSON) and the recommended directory layoutWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ai-evals, llm-evaluation, regression-testing, prompt-testing
npx claudepluginhub mhylle/claude-skills-collection --plugin devflow35 skills in this plugin
/adrDocument architectural decisions in standardized ADR format. This skill should be used when making significant technical decisions, choosing between approaches, establishing patterns, or when other skills (create-plan, implement-plan, brainstorm) identify decisions that need documentation. Triggers on "document decision", "create ADR", "architectural decision", or automatically when invoked by other skills during planning and implementation./adversarial-reviewerAdversarial code review by three independent subagent personas (Saboteur, New Hire, Security Auditor) running in parallel, isolated contexts that know nothing of the author's intent or Claude's earlier conclusions. Reviews a diff by default (staged/unstaged, a ref or a file); --codebase reviews a whole repo or subtree for tech debt, attack surface and knowledge silos. Use before merging a PR; when the user asks for a hostile, harsh, critical, skeptical or second-opinion review; when a /devflow:code-review came back suspiciously clean; when the user is tired after a long session or has a gut feeling something is off; or for a quick audit of an inherited repo ("what am I inheriting"). Differs from /devflow:code-review (routine per-phase review, no isolation) and /devflow:security-review (single-lens OWASP depth)./agent-creatorCreate composable AI agent systems in NestJS projects following the "tools all the way down" architecture. Use this skill when users want to: (1) Create new AI agents with orchestrator/planner/executor/evaluator components, (2) Build agentic systems that can call other agents as tools, (3) Implement DAG-based planning with parallel execution, (4) Add database-backed state persistence for agent runs, (5) Create custom evaluators for quality assurance. Triggers on "create agent", "build agent", "agent system", "agentic", "orchestrator", "planner/executor pattern", or NestJS AI agent requests.
/brainstormRefine a rough idea into a well-structured concept through Socratic questioning, targeted research and one or two fitting analysis frameworks (Six Thinking Hats, SCAMPER, Premortem), then write it to docs/brainstorms/ as the input for planning. Use when the user wants to brainstorm, explore or think through an idea, find holes in a proposal, asks "what am I missing", or wants to shape a concept before planning, whether or not the work is tracked in TaskTracker. The output feeds /create-plan, /tt-create-plan and /user-story./codebase-auditLong-running, resumable adversarial audit of a whole codebase. Splits the repo into partitions, runs /adversarial-reviewer --codebase on each, then synthesizes a cross-partition risk register and a written remediation report. Use for onboarding audits of an inherited codebase, pre-acquisition due diligence, periodic tech-debt health checks, or when the user asks for a comprehensive, thorough, exhaustive or deep review of the whole codebase ("full codebase audit", "code due diligence", "tech debt audit", "what am I inheriting"). Differs from /adversarial-reviewer --codebase, which samples the repo in one pass, and from /code-quality-audit, which measures coverage, complexity, cycles and mutation scores./codebase-researchOrchestrates comprehensive codebase research by decomposing user queries into parallel sub-agent tasks and synthesizing findings. This skill should be used when users ask questions about how code works, where functionality exists, how components interact, or need comprehensive documentation of existing implementations. It focuses exclusively on documenting and explaining the codebase as it exists today.Other plugins' skills for the same job