agentleFS
tammaitammai/bigin-skills/.claude/skills/skill-bench/SKILL.md

skill-bench

Skill1 starsChanged 41 days agoMITView on GitHub

Benchmarks a skill's outcome quality and consistency — same task with the skill available vs masked, k trials per arm, scored on a rubric (pass@k, pass^k). Triggers: 'benchmark this skill', 'run skill-bench', 'does this skill actually help'.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Trial cap: default 2 skills × 3 tasks × k=3 × 2 arms = 36 trials per invocation.

    line 13
  2. Very specific:

    Before dispatching a without-skill trial: run node .claude/skills/skill-bench/scripts/mask.mjs mask <skill>.

    line 35
  3. Very specific:

    Remove the worktree: git worktree remove <path> --force.

    line 38

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

skill-bench

Runs the same bench task k times with a skill available and k times with it masked, in isolated git worktrees, and scores each trial against an objective rubric. Never auto-fixes or auto-commits — proposes a report, same discipline harness-audit and sprint-distill already enforce.

Trial cap: default 2 skills × 3 tasks × k=3 × 2 arms = 36 trials per invocation. If the requested scope (skills × available tasks × k × 2) would exceed this, state the computed total and ask for explicit confirmation before running any trials.

When not to use

  • Project-local only — audits this plugin's own skills, never ships downstream.
  • Auditing hooks, frontmatter, or docs staleness against the official docs — that's harness-audit.

Phase 0: Select scope and self-heal

  1. Target skill(s) — default coverage set is write-tests, task-workflow, debug-workflow (the initial 3-skill set; see benchmarks/<skill>/tasks.json for what's actually defined — don't invent tasks for a skill that has no tasks.json, report it missing instead).
  2. k — default 3.
  3. Safety check, always run first: node .claude/skills/skill-bench/scripts/mask.mjs status <skill> for every skill in scope. If any comes back masked, a prior run crashed mid-trial — run unmask on it before doing anything else. This is the actual mechanism behind "the mask is restored even if a trial errors": idempotent self-healing at the top of every run, not a language-level trap around a subagent call (which can't exist across an LLM dispatch).

Phase 1: Load bench tasks

Read benchmarks/<skill>/tasks.json for each target skill. Each entry: {id, prompt, fixture, rubric}. fixture is a path (relative to that skill's benchmarks/<skill>/ dir) to the starting file state for the trial. rubric is a list of criteria — every criterion must be one of file-exists, file-contains, command (see scripts/score.mjs's header for the exact shape). If a rubric line can't be expressed as one of these, rewrite it or cut it — never score by judgment.

Phase 2: Run trials

For each task, for each arm (with-skill, without-skill), for trial in 1..k:

  1. Dispatch one Agent tool call with isolation: "worktree" so the trial's file changes land in a fresh, isolated git worktree rather than the main tree. Prompt: the task's fixture contents as starting context (tell the agent which files exist at which paths) plus the task's prompt field verbatim. Record the worktree path the Agent tool result returns (only returned when the agent made changes — a no-op trial has nothing to score and counts as a fail).
  2. Before dispatching a without-skill trial: run node .claude/skills/skill-bench/scripts/mask.mjs mask <skill>.
  3. Immediately after that trial returns — regardless of whether it succeeded, errored, or looks wrong — run node .claude/skills/skill-bench/scripts/mask.mjs unmask <skill> before starting the next trial. Do not skip this because the trial failed; masked state must never carry into the next dispatch.
  4. Score the trial: write {worktree: <path>, rubric: <task's rubric, with fixture-relative paths resolved to the worktree>} to a scratch JSON file, then run node .claude/skills/skill-bench/scripts/score.mjs <that-file>. Record trialPasses.
  5. Remove the worktree: git worktree remove <path> --force.

Known limitation, stated plainly rather than assumed away: masking works by renaming skills/<skill>/SKILL.md in the main tree (see scripts/mask.mjs's header), because that's the one lever that reliably controls skill discoverability regardless of how a spawned agent's worktree isolation interacts with this plugin's own loading. This means with-skill and without-skill trials for the same task cannot literally run concurrently against each other (the mask is a shared, main-tree toggle) — run all trials for one arm before switching to the other.

Phase 3: Score

Compute pass@k and pass^k per (task, arm) per references/scoring.md's formulas. Aggregate to a skill-level pass^k delta (with-skill avg − without-skill avg, in points).

Phase 4: Report — STOP HERE

Write references/report-template.md's shape to .claude/tmp/bench/<skill>-<date>.md. Diffs are summaries + file paths only — never inline full trees (full output stays available in each trial's worktree until Phase 5's cleanup runs, so it's one git diff away if actually needed). Ask: "Act on any of these now, or just log the report?" Do not write or fix anything in this phase.

Phase 5: Cleanup sweep

Even though each trial removes its own worktree in Phase 2 step 5, run a backstop sweep: git worktree list --porcelain | grep -A1 'bench' (or equivalent) and remove anything left over from a trial that errored before reaching step 5. Confirm git worktree list shows no bench residue before finishing.

References

  • scripts/mask.mjs — masks/unmasks a skill directory in the main tree; idempotent, self-healing, never auto-fixes.
  • scripts/score.mjs — mechanical rubric scoring; every criterion is a command or file assertion, never judgment.
  • references/scoring.md — pass@k / pass^k formulas + worked example.
  • references/report-template.md — exact report shape and the propose-then-stop gate.
  • benchmarks/<skill>/tasks.json — task/fixture/rubric definitions per skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.