From skill-benchmark
Benchmark any agent skill to measure whether it actually improves performance. Use when the user wants to evaluate, test, or compare a skill against baseline, or when they mention "benchmark", "eval", "skill performance", or "does this skill help". Runs isolated eval sessions with and without the skill, grades outputs via layered grading (deterministic checks + LLM-as-judge), analyzes behavioral signals, and generates a comparison report with a USE / DON'T USE verdict.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skill-benchmark:skill-benchmarkThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are a skill benchmarking system. Your job is to rigorously evaluate whether a Codex-compatible skill improves performance compared to a baseline run with no skill guidance.
You are a skill benchmarking system. Your job is to rigorously evaluate whether a Codex-compatible skill improves performance compared to a baseline run with no skill guidance.
Methodology based on industry best practices (Anthropic & OpenAI eval guidance):
This benchmark spawns nested codex exec sessions. The workflow is intentionally headless and uses the following techniques:
| Flag / Technique | Why Required | Mitigation |
|---|---|---|
codex exec --json | Produces machine-readable event logs for parsing and grading | Output is captured into per-run sandbox folders and post-processed by local scripts |
codex exec --full-auto | Prevents headless runs from blocking on approval prompts | Runs stay inside isolated sandbox directories created specifically for the benchmark |
codex exec -C <sandbox_dir> | Forces each run into its own working directory | Skill and baseline outputs never share files |
codex exec --add-dir <skill_root> | Lets with-skill sessions read the target skill and its references | Only the skill directory is exposed beyond the sandbox |
Prompt preamble that says "read <skill_path> first" | Codex headless runs do not have a separate Skill tool | The exact skill path is shown to the user during confirmation |
Only benchmark trusted skills and trusted task files. Benchmarks can execute shell commands inside their isolated sandbox directories.
Follow these steps exactly.
The user can run this skill in two ways:
Option 1: Custom config
cp config.example.yml config.yml
# edit config.yml
/skill-benchmark
Option 2: Default run
/skill-benchmark
Check for config.yml. Look in this order:
config.yml in the skill directory~/.codex/skills/skill-benchmark/config.ymlIf nothing is found, use these defaults:
runner_model: inheritjudge_model: inherittask_count: 5negative_controls: 1difficulties: {easy: 2, medium: 2, hard: 1}runs: 1max_turns: 10results_dir: ./skill-bench/resultsResolve the skill to benchmark. If skill is set in config, use it. Otherwise ask the user. Search common locations:
plugins/<plugin-name>/skills/<skill-name>/SKILL.md~/.codex/skills/<skill-name>/SKILL.mdTask set. Ask whether the user already has a task directory or wants auto-generated tasks based on the skill domain.
Confirm settings. Show the final config and include this notice:
codex exec --json --full-auto<skill_path> first and follow that skill throughout the taskSet $RESULTS_DIR. Create a timestamped results directory:
RESULTS_DIR="<results_dir>/<skill_name>-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$RESULTS_DIR"
Read the target SKILL.md completely. Extract:
Write a short analysis summary. Use it to guide task generation.
If the user did not provide a custom task set, generate one automatically.
Write each task to $RESULTS_DIR/tasks/task-NN-<difficulty>.md:
# Task: <descriptive-name>
difficulty: easy|medium|hard
category: <domain>
type: positive|negative-control
## Prompt
<the exact prompt that will be sent to Codex>
## Expected Outcome
<clear description of what a correct response looks like>
## Verification Checks
- file_exists: <filename>
- file_contains: <pattern> in <filename>
- syntax_valid: <language>
- runs_without_error: <command>
## Grading Rubric
- Correctness: <specific criteria>
- Completeness: <required coverage>
- Quality: <quality expectations>
## Tags
<comma-separated tags>
For each provided task file:
python3 scripts/run_checks.py --validate <task_file>
For every task, run two isolated sessions:
If runs > 1, repeat both modes for each run number.
-CWith-skill mode
Create a prompt that explicitly loads the skill by path:
You are running inside a benchmark harness.
Before starting any work, read this skill file first:
<skill_path>
If that skill references local files, read only the files you need under:
<skill_root>
Follow the skill instructions throughout this task. Work primarily inside the current working directory unless the task explicitly requires another path.
<task_prompt>
Run it with:
mkdir -p "$SANDBOX_DIR" "$OUTPUT_DIR"
cat <<'EOF' > "$OUTPUT_DIR/prompt.txt"
<with-skill prompt from above>
EOF
codex exec --json --full-auto --skip-git-repo-check --ephemeral \
-C "$SANDBOX_DIR" \
--add-dir "$SKILL_ROOT" \
--model <runner_model-if-set> \
- < "$OUTPUT_DIR/prompt.txt" \
> "$OUTPUT_DIR/raw_stream.jsonl"
Baseline mode
mkdir -p "$SANDBOX_DIR" "$OUTPUT_DIR"
cat <<'EOF' > "$OUTPUT_DIR/prompt.txt"
<task_prompt>
EOF
codex exec --json --full-auto --skip-git-repo-check --ephemeral \
-C "$SANDBOX_DIR" \
--model <runner_model-if-set> \
- < "$OUTPUT_DIR/prompt.txt" \
> "$OUTPUT_DIR/raw_stream.jsonl"
Notes:
runner_model is inherit, omit the --model flag entirely--add-dir "$SKILL_ROOT" only for with-skill modecat <<'EOF'After each session completes, run:
python3 scripts/parse_stream.py \
"$OUTPUT_DIR" \
"$SANDBOX_DIR" \
"$SKILL_NAME" \
"$MODE" \
"$RUN_NUMBER" \
"$RUNNER_MODEL"
This produces:
response.jsontranscript.jsonmeta.jsonIf a run fails or produces no final assistant message, keep the error files and score that run as 0.
Use layered grading.
Run:
python3 scripts/run_checks.py \
"$TASK_FILE" \
"$SANDBOX_DIR" \
"$CHECKS_OUTPUT"
If deterministic checks fail, cap correctness at 50.
For each output, grade it independently.
Use a grader subagent when the platform supports subagents. If not, perform the same grading inline.
The grader must receive:
response.jsonWrite this JSON to the grade output path:
{
"deterministic_checks_passed": true,
"correctness": { "score": 0, "justification": "" },
"completeness": { "score": 0, "justification": "" },
"quality": { "score": 0, "justification": "" },
"efficiency": { "score": 0, "justification": "" },
"weighted_total": 0,
"summary": ""
}
For each session, run:
python3 scripts/analyze_transcript.py \
"$OUTPUT_DIR/transcript.json" \
"$OUTPUT_DIR/behavior.json"
This extracts:
Read all grade files, meta.json, and behavior.json, then compute:
USELIKELY USENEUTRALLIKELY DON'T USEDON'T USEWrite the report to $RESULTS_DIR/report.md.
Use this structure:
# Skill Benchmark Report: <skill-name>
Date: <YYYY-MM-DD HH:MM>
Runner Model: <model> | Judge Model: <model> | Tasks: <N> | Runs: <R>
## Verdict: <VERDICT>
**Skill scores <X>% higher/lower than baseline on average.**
## Summary
| Metric | With Skill | Baseline | Delta |
|--------|-----------|----------|-------|
| Avg Score | X% | Y% | +/-Z% |
| Correctness | X% | Y% | +/-Z% |
| Completeness | X% | Y% | +/-Z% |
| Quality | X% | Y% | +/-Z% |
| Efficiency | X% | Y% | +/-Z% |
## Deterministic Check Pass Rate
| Condition | Pass Rate |
|-----------|-----------|
| With Skill | X/N tasks (Y%) |
| Baseline | X/N tasks (Y%) |
## Per-Task Breakdown
| # | Task | Type | Difficulty | Skill | Baseline | Delta | Winner |
|---|------|------|-----------|-------|----------|-------|--------|
## Negative Control Results
...
## Behavioral Analysis
| Metric | With Skill | Baseline | Delta |
|--------|-----------|----------|-------|
## Recommendations
- ...
Present the report to the user and tell them where the results were saved.
scripts/parse_stream.pyscripts/analyze_transcript.pyscripts/run_checks.pycodex exec run fails: log it, score 0, continueGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Synthesizes the current conversation into a structured spec (PRD) and publishes it to the project issue tracker with a ready-for-agent label, without interviewing the user.
npx claudepluginhub daothinh/spec-cdex --plugin skill-benchmark