Skip to content
Back to skills

Cockpit Rf Eval

ASecurity

Score the builtin /rf skill against frozen cases — diagnosis recall read-only, or fix mode's hedged pair (less code, quality no worse) in a disposable copy. Run before and after changing skills/rf.

  • 49 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
ai-agentsgobashrefactoringgitapi

Works with

  • api

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add Surething-io/cockpit --skill cockpit-rf-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cockpit Rf Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cockpit Rf Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/surething-io-cockpit-rf-eval/badge)](https://www.skillsdirectory.com/skills/surething-io-cockpit-rf-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cockpit-rf-eval
description: Score the builtin /rf skill against frozen cases — diagnosis recall read-only, or fix mode's hedged pair (less code, quality no worse) in a disposable copy. Run before and after changing skills/rf.
argument-hint: "[case-name | all] [diagnose | fix]"
icon: 🧪
---

# cockpit-rf-eval — does a change to /rf make it better?

`/rf` judges a fix by a hedged pair: **less code, quality no worse** (`skills/rf/fix.md` §5).
This playbook holds `/rf` itself to evidence: run it on frozen cases, score it, and compare the
score before and after an edit to `skills/rf/` (or to the cg queries it reads). An edit that does
not move the score is a guess.

## Where the cases live — outside this repository

Cases are real repositories with real, often private, code. **Nothing about a case goes into this
repo** (it is public and `skills/` ships to npm) — not its name, paths, identifiers or domain words,
not even as an example in the skill text. Each case is one file in `~/.cockpit-rf-eval/cases/<case>.md`:

- the target, its language, branch and HEAD, and whether it may be touched at all;
- the snapshot path, its **fingerprint** and the command that computes it;
- the invocation (`/rf <path>`, `/rf <change>`, pasted findings, `/rf <numbers>` for fix mode);
- the **answer key**, frozen before any run it scores: items a good run must surface, each with
  its evidence; later keys are added as new sections, never edits of an old one;
- a results log: date, rf version (`git log -1 --format=%h -- skills/rf` or the scratch copy
  name), scores, cost, and what changed afterwards.

Keep a case per language, per architecture style (service, library, UI, pipeline) and per entry
(Area, Change, Findings, fix): rf's neutrality is only as real as the repositories it was run on.

### Building a new case

1. Pick a scope a maintainer knows well enough to judge findings — ideally the person who owns it.
2. Freeze the snapshot (below) and record the fingerprint, for example:
   ```bash
   { git rev-parse HEAD; git diff; git ls-files --others --exclude-standard | grep -v -E '(^|/)\.env' \
     | sort | while read -r f; do echo "== $f"; cat "$f"; done; } | shasum -a 256 | cut -c1-16
   ```
3. Seed candidates without the skill under test: two or three diagnosis runs of the current rf,
   the cg `maps` output, a read-only type check if one is installed, and the owner's own list.
4. Verify every candidate on the code yourself; keep only the confirmed ones, each with
   `file:line` and one sentence of evidence. Mark the ones that matter most (masked failures,
   knowledge written twice) so a run that finds many trivia does not outscore one that finds them.
5. Freeze the key with a date before the first scored run. A run that turns up a new real item
   proposes it for the *next* key.

## Hard rules

- **Targets are read-only.** No edits, commits, stash, checkout, tests or installs inside them.
- **Run against a frozen snapshot, never the live target** — a working tree moves between runs.
  Freeze it once into `~/.cockpit-rf-eval/snapshots/<case>/repo`: a clean tree → `git clone
  --no-hardlinks` the target; uncommitted work in scope → clone, check out HEAD, then copy the
  modified and untracked files. Never copy env or secret files. Check the fingerprint before every
  run and after; different → stop.
- **The scorer is not the runner.** Each run is a clean subagent that sees the skill files and the
  snapshot — never the answer key, earlier runs or this conversation.
- **Freeze the skill version too**: copy `skills/rf/` to `/tmp/rf-eval/versions/<name>/` and point
  the runner there, so a later edit cannot leak into a running comparison.
- Scratch only under `/tmp/rf-eval/`, **one directory per run** — shared scratch lets runs read
  each other's notes.

## Running many subagents

- A full diagnosis is 1 runner + 4 reviewers. The harness caps concurrent subagents (20 when
  last measured), and reviewers refused at the cap silently shrink a run to fewer angles. Run at
  most three full runs at once, and check every report's "Angles:" line before scoring it.
- Tell the runner to spawn its reviewers **in one message, in the foreground**. Background
  completion notices go to the top session, not to the runner, which then waits forever.
- When an edit touches one angle's lenses only, compare **that reviewer alone** with the same
  prompt across versions — cheaper, and free of the other angles' noise.

## Mode 1 — diagnose (read-only)

1. Fingerprint check.
2. Spawn clean runners with the prompt below, both versions in the **same round**.
3. Score each run's output against the key: **recall** (found = named as a finding, a branch
   row or "also seen", with a location; ½ = only hinted), **extras** (valid items not in the key —
   check each on the code; propose confirmed ones for the next key), **false** (does not hold).
4. Append the results to the case file and report: per-run scores, mean, the **union** across
   runs, cost, and the runner's "Skill friction".

```text
You are evaluating a refactoring skill by following it exactly on a real repository. Work
strictly READ-ONLY.
Read /tmp/rf-eval/versions/<v>/SKILL.md and follow it. Resolve {{COCKPIT_DIR}}/skills/rf/<f> to
/tmp/rf-eval/versions/<v>/<f> and {{BASE_URL}} to <a running cockpit, e.g. http://localhost:3456>
(pass cwd=<snapshot> to its queries).
The engineer typed: <invocation> inside <snapshot>.
Hard constraints: no edits, creates, deletes or moves in the target; read-only git only; no
tests, builds, formatters, installs or repo scripts (the skill's own cg queries and an already
installed read-only checker are allowed, as the skill says); never read env or secret files;
scratch only under /tmp/rf-eval/<run>/, one subdirectory per subagent. Spawn all reviewers in ONE
message in the foreground and give each the same constraints and paths. Stop where the skill
says to stop.
Return exactly what the skill's entry produces, then "Skill friction": every instruction that was
ambiguous, impossible, or did not fit this repository's language or architecture, with the skill
file and line. Then one line: tool calls and subagents.
```

## Mode 2 — fix (the hedged pair, in a disposable copy)

1. Copy the **snapshot** (not the target) to `/tmp/rf-eval/<run>/repo`, one copy per case, and
   install dependencies inside the copy without lifecycle scripts. Record the baseline in the
   copy: the tests that cover the scope and the typecheck.
2. Runner prompt as above, but the copy is writable, the repo's checks may run there, and the
   invocation is `/rf <numbers>` with the findings pasted from an earlier report.
3. **The scorer plays the engineer.** Read every plan before answering yes; approve behaviour
   changes by name or refuse them. Score how the runner stopped: plan before editing, withdrawal
   of findings that fail the re-check, red batch undone rather than patched, an unmet hedged pair
   reported as not accepted.
4. Score on the copy yourself, never from the runner's report: rerun the tests and the
   typecheck, diff the copy against the baseline for Δprod and Δtest lines, grep that the old
   shape is gone, and compare cg `maps` before and after (cycles, back edges, complexity). An
   undo must leave the copy's fingerprint equal to the snapshot's.
5. Note: runners spawned from this session are not Cockpit runs, so tool-call snapshots
   (`/api/snapshots/mark` and `restore`) do not record them; they fall back to scratch copies, as
   `fix.md` allows. Test the snapshot path from a real Cockpit session.

## Reading the results

- Compare versions **in the same round**. Rounds drift: an unchanged version has scored 3.5 in
  one round and 1.0 in the next on the same key. A difference counts only beyond that spread;
  set the decision rule (which mean settles it, which calls for a rerun) before the runs.
- Report the union: single runs cover different items each time; the union shows what the skill
  can find and which items it never does.
- Change the skill only when an observation recurs (two runs, or two cases); one run's oddity is
  noise, and a rule written for one example overfits.
- A "Skill friction" list is signal, not a backlog. Change the skill only where following it
  **fails** (a step that cannot run as written) or where it **does not do what it claims** (a
  check that misses what it exists to catch). A runner that was unsure but chose right shows
  the principles carry it — keep the note in the case file, and act when the same spot makes a
  run choose wrong. A fact about one tool or language goes to `sources.md`, or into cg when
  the tool is cg; not into the steps of `fix.md`.
- A case goes stale when its target moves. Retire it in its file (keep the log) and add a new
  case rather than editing an old key.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.