Go Verify Lead
ASecurityVerify a Go change before calling it done — route the diff to the test skills it needs (unit-test, fuzzing-test, api-integration-test, e2e-test, load-test, go-benchmark), run every check through a recorder that keeps the output and judges it from the output itself, prove new tests catch an injected defect, take reviews as advisory, and compute one verdict JSON with a script. Use when a coding agent finishes a Go task, before a commit or PR, or when asked "is this change verified / tested enou...
- 32 stars
- 0 votes
- 0 copies
- 0 views
- Added December 5, 2026
Works with
Security analysis
100/100Pro scans all 15 files and shows the line behind each finding
npx -y skills add johnqtcg/awesome-skills --skill go-verify-lead --agent claude-codeAre you the author of Go Verify Lead?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/johnqtcg-go-verify-lead)---
name: go-verify-lead
description: Verify a Go change before calling it done — route the diff to the test skills it needs (unit-test, fuzzing-test, api-integration-test, e2e-test, load-test, go-benchmark), run every check through a recorder that keeps the output and judges it from the output itself, prove new tests catch an injected defect, take reviews as advisory, and compute one verdict JSON with a script. Use when a coding agent finishes a Go task, before a commit or PR, or when asked "is this change verified / tested enough". NOT for writing tests by itself (unit-test), reviewing code (go-review-lead), or CI design (go-ci-workflow).
allowed-tools: Read, Grep, Glob, Skill, Agent, Bash(python3 ${CLAUDE_SKILL_DIR}/scripts/route.py*), Bash(python3 ${CLAUDE_SKILL_DIR}/scripts/verdict.py*)
hooks:
PostToolUse:
- matcher: "Agent|Task|Skill"
hooks:
- type: command
command: 'python3 "${CLAUDE_PLUGIN_ROOT}/scripts/record_dispatch.py"'
---
# Go Verify Lead — Verification Orchestrator
## Purpose
A coding agent that writes the code, the tests and the claim "tests pass" grades itself.
This skill takes the grading away from it: **the verdict is computed by
`scripts/verdict.py` from records that `scripts/run_check.py` wrote**, and those records
are judged from each command's own output. You choose what to run and write the tests; you
never write "passed".
Mirror of `go-review-lead` on the testing side: that skill triages a diff into review
dimensions; this one triages it into verification checks. Reviews still happen here, but
they are **advisory** — they never decide the verdict.
| Need | Use |
|---|---|
| Is this change verified enough to call done / commit / open a PR? | **this skill** |
| Write or improve tests for a function | `unit-test` (this skill invokes it) |
| Review the code | `go-review-lead` (this skill invokes it, advisory) |
| Fast check on every turn | the Stop hook running `make check-fast` |
| Merge gate | CI (`go-ci-workflow`) |
## Hard Rules
1. **A check counts only if `run_check.py` ran it.** A command you ran yourself, a pasted
output, or "I checked by hand" is not a record and does not count.
2. **Never write or edit anything in the run directory** (`records.jsonl`, `route.json`,
`base.json`, `verdict.json`, `out/`). `verdict.py` re-hashes every saved output and
re-judges it; an edited record makes the run unjudgeable (exit 2).
3. **Only `verdict.py` exit 0 means verified.** Exit 1 = not verified; exit 2 = cannot be
judged. Never report "done", "verified" or "all checks pass" on any other basis.
4. **Required checks cannot be waived.** Expected checks need a passing record or a waiver
whose reason is specific (≥ 15 characters, names why this change does not need it).
5. **Any Go edit after a check makes its record stale.** Re-run the affected checks; do
not argue with a `stale` status.
6. **Kill checks inject the defect with `go test -overlay`** and never edit the file under
test (`unit-test` → `references/killer-case-patterns.md` § Verifying the Kill). An
overlay whose key does not match go's path is ignored silently — the record then says
the mutant was not caught, which is the truth.
7. **Reviews are advisory, but they must run.** Their findings never decide the verdict;
a finding a tool can show (a compile error, a `-race` report, a `go vet` finding) is
re-run as its own check through `run_check.py`, and that check can block. The review
itself cannot be replaced by a summary you write: `go-review` is required, and its note
is accepted only after go-review-lead has dispatched its reviewer agents on this tree,
which this skill's hook records (`record_dispatch.py`).
8. **`thirdparty-api-integration-test` runs only when the user invokes it** (the skill has
`disable-model-invocation`). Ask; if the user declines, waive with that reason.
## Workflow
```bash
S="${CLAUDE_SKILL_DIR}/scripts"
```
### 1. Route
```bash
python3 "$S/route.py" # base = merge-base with main, else HEAD (it says which)
python3 "$S/route.py" --base origin/release-1.4 --reset # another base: start a new run
```
The JSON lists `checks`, each with `id`, `policy` (`required` | `expected`), `kind`, the
`skill` to use, `signals` (why it was routed), `suggested_command`, and `must_contain`
(flags the command must carry — `-race` when the change adds goroutines, channels or
locks). Routing rules: `references/routing-rules.md`. The run directory lives inside the
git dir (`.git/go-verify/`), so it never appears in `git status`.
### 2. Write what is missing, then run each check through the recorder
Required checks first. For each check, invoke the named skill to write or extend the tests,
then run the check — adapting the suggested command, keeping its `must_contain` flags:
```bash
python3 "$S/run_check.py" --id unit-test:./calc --kind go-test -- go test -race -count=1 -v ./calc
python3 "$S/run_check.py" --id baseline --kind cmd -- make check-fast
```
`go-test` needs `-v` and a fresh run (`-count=1`): a run whose every test skipped, or a
`(cached)` result, is recorded as a failure. What each kind accepts:
`references/check-kinds.md`.
### 3. Prove the new tests catch something
For every package routed a `kill:` check: take a killer case from `unit-test`, write the
mutated copy of the file, point an overlay at it, and record the experiment. Several per
package are fine (`kill:./calc:upper-bound`, `kill:./calc:empty-input`); one uncaught
mutant fails the package.
```bash
python3 "$S/run_check.py" --id kill:./calc:upper-bound --kind kill -- \
go test -count=1 -overlay="$MUT/overlay.json" -run TestClampUpper -v ./calc
```
### 4. Reviews (advisory)
Invoke `go-review-lead` (and `security-review` when routed) **after** this skill is running
and on the final tree — this skill's hook records each Agent and Skill call with the tree's
fingerprint, and the summary below is refused without `go-quality-reviewer` and
`go-logic-reviewer` dispatched on the current tree (a `security-review` summary needs a
`security-review` skill call). Reviewing yourself instead does not count, and `go-review`
cannot be waived. Wait for the agents' reports, then record a one-line summary — counts by
severity and the High findings — and re-run anything tool-evidenced as its own check
(rule 7):
```bash
python3 "$S/run_check.py" --id go-review --advisory "2 Medium (error wrapping), 0 High"
```
### 5. Waive what genuinely does not apply
```bash
python3 "$S/run_check.py" --id e2e --waive "CSS-only colour change; no journey is affected"
```
`run_check.py` refuses a waiver of a required check and leaves no record.
### 6. Verdict
```bash
python3 "$S/verdict.py"
```
| Exit | Meaning | Next |
|---|---|---|
| 0 | verified | report it |
| 1 | not verified | read `blocking`, fix or re-run, then verdict again |
| 2 | cannot be judged | no route run yet, or records/outputs were altered — re-route with `--reset` and re-run the checks |
`verdict.py` re-routes the current tree, so a package you added after routing brings its
own checks back. Its JSON shape is `references/verdict-schema.json`; statuses:
| Status | Blocks | Meaning |
|---|---|---|
| `pass` | no | a current record judged pass (and carrying every `must_contain` flag) |
| `waived` | no | expected check, waiver with a reason |
| `advisory` / `advisory-stale` | no | review summary (stale: recorded before a later edit) |
| `fail` | yes | the record failed, a `must_contain` flag is missing, or a kill mutant was not caught |
| `missing` | yes | no record |
| `stale` | yes | recorded before the Go sources last changed |
| `waiver-not-allowed` | yes | a waiver on a required check |
| `kind-mismatch` | yes | e.g. an advisory note standing in for a test run |
| `review-not-dispatched` | yes | a review summary with no recorded dispatch of the review on the tree it describes |
A failing record that matches no routed check (an extra `lint` run, say) also blocks while
it is current.
## Output Contract
The final report MUST contain, in this order:
1. **Verdict line**: `Verified: yes|no (verdict.py exit N)`, plus `base_label`.
2. **Blocking items**: the verdict's `blocking` list verbatim, or "none".
3. **Checks table**: id, policy, status, and the reason or quoted evidence (the `--- FAIL:`
line of a failure, the caught test of a kill).
4. **Waivers** with their reasons, and **advisory** review notes (marked stale if so).
5. **Path** to `verdict.json` (`.git/go-verify/verdict.json`).
Never summarise a `no` as "mostly verified", and never report checks the verdict does not
contain.
## Scripts
| Script | Exit codes | Pre-approved |
|---|---|---|
| `route.py` | 0 routed · 2 not a repo / bad base / base mismatch (needs `--reset`) | yes (read-only) |
| `run_check.py` | 0 pass · advisory · waived · 1 fail · 2 not recorded | **no** — it executes the command it is given, so pre-approving it would pre-approve any command |
| `verdict.py` | 0 verified · 1 not · 2 cannot judge | yes (read-only) |
| `record_dispatch.py` | always 0 (a hook must not break the session) | runs as this skill's PostToolUse hook, never by hand |
| `check_installed_skills.py` | 0 every routed skill installed and identical · 1 one differs or is missing · 2 usage | no — maintenance, not part of the workflow |
| `eval/bench.py` | 0 ok · 1 unsound case or invalid run · 2 usage or harness error | no — maintenance; `run` calls `claude` and spends money |
Python 3.9+, standard library only. `_state.py` holds the base, the run directory and the
Go-source fingerprint; all three scripts import it, so they cannot disagree about which tree
a record belongs to.
## References
- `references/routing-rules.md` — which change routes which check (mirrors `route.py`)
- `references/check-kinds.md` — what each kind accepts as proof, and why
- `references/verdict-schema.json` — the verdict JSON
- `scripts/eval/README.md` — the benchmark that measures this pipeline against a no-skill baseline (maintenance, not part of the workflow)
Files in this skill
- SKILL.md
- references/check-kinds.md
- references/routing-rules.md
- references/verdict-schema.json
- scripts/_state.py
- scripts/route.py
- scripts/run_check.py
- scripts/run_regression.sh
- scripts/tests/COVERAGE.md
- scripts/tests/gvl_testlib.py
- scripts/tests/test_route.py
- scripts/tests/test_run_check.py
- scripts/tests/test_skill_contract.py
- scripts/tests/test_verdict.py
- scripts/verdict.py
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.