verification
A rigorous verification skill that uses discriminating tests and data tracing to validate system behavior and catch bugs.
Install
mkdir -p .claude/skills/verification && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/19309" && unzip -o skill.zip -d .claude/skills/verification && rm skill.zipInstalls to .claude/skills/verification
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when: verifying an implementation, auditing the codebase, reviewing a finished change, doing a pre-commit scan, or when asked to 'check everything' in SAKIGo. Evidence-driven verification procedure that replaces checklist ceremony with discriminating tests. Covers: running test suites, tracing tiny examples, auditing with subagents, filtering false positives, and SAKIGo-specific invariants (perspective flips, pass logit, D4 equivariance, masks).Key capabilities
- →Run test suites for Python and Rust
- →Trace tiny examples end-to-end
- →Audit codebases using subagents
- →Verify SAKIGo-specific invariants
- →Record risks in AI/Issues.md
How it works
The skill uses evidence-gathering through test execution and manual tracing to distinguish between functional and broken code states.
Inputs & outputs
When to use verification
- →Audit codebase for specific bugs
- →Verify implementation after a code change
- →Perform a pre-commit verification scan
About this skill
Verification
Verify by gathering evidence that can actually discriminate between "correct" and "broken" — not by walking a checklist and nodding. A checklist item you can't falsify is ceremony; skip it and spend the effort where a bug could hide.
Core principles
- Weigh evidence by discriminating power. A passing test only counts if it would fail under the bug you're worried about. An underpowered repro can falsely exonerate (this repo's val-metric incident: a 38k-sample fresh model "cleanly reproduced" behavior that was actually a cache bug). Before accepting any "it's fine" result, ask: what would this look like if the code were wrong?
- Run things before reading things.
pytest+cargo testtake under a minute and instantly bound the search space. Then read only where tests are thin. - Trace a tiny example end to end. For any data transformation, hand-walk one record: a 2x2 board, one capture, one perspective flip. Most SAKIGo bugs ever found were sign/index/perspective errors that a tiny trace exposes.
- Treat audit findings as hypotheses, not conclusions. Subagent/reviewer findings have a high false-positive rate (a 2026-07-06 full scan: 5 reported bugs, 4 were false positives). For each finding, open the actual code and re-derive the claim before fixing anything. Domain definitions matter: e.g. positional superko keys on board only — a "missing side-to-move in hash" finding is wrong by definition. Do not delegate audits to weak models (owner instruction 2026-07-06: no Haiku-class subagents — too many false positives AND negatives); prefer doing the pass yourself.
- Robustness = the rebuild question. For infrastructure, ask "what would a
clean rebuild do differently?" and grade the gap: duplicated logic that can
drift (two copies of a training loop), non-atomic writes of files another
process or a resume will read (checkpoints, status JSON, caches), process
lifecycles without a
finally(orphaned engines), dead config surface (no-op CLI args). Fix the cheap ones; record the structural ones as issues. - Verify the arithmetic of your own story. Before explaining observed behavior (loss curves, sampling exposure, throughput), check the counting: samples seen per record, batches per epoch, who computes what when.
- Distinguish "code wrong" from "coverage missing". A clean scan with untested behavior is not a clean scan. The fix for a coverage gap is a test that would have caught the feared bug.
Procedure
- Establish state.
git status/git log --oneline -8; readAI/Issues.mdwatchlist and the latestAI/Log.mdentry. Note what changed since the last verification — new/refactored files get the deepest look. - Run the suites.
- Python:
uv --cache-dir .uv-cache run --frozen pytest -q --basetemp=.pytest-tmp -p no:cacheprovider(repo-local temp: system temp denies access on this machine). - Rust:
cd Engine; cargo test --quiet. get_errorsfor compile/lint diagnostics.
- Python:
- Audit in parallel with subagents (one per module boundary: Engine, Model, Training). Tell them the known issues so they don't re-report, and demand: file+line, the traced logic error, and an explicit CLEAN list.
- Re-verify every finding yourself against the source before acting (principle 4). Classify: real bug / real risk / coverage gap / false positive.
- Fix what's real. Bugs: fix + regression test that fails without the fix.
Coverage gaps: add the discriminating test. Risks/decisions: record in
AI/Issues.md, don't silently resolve. - Re-run the affected suite. Then re-read the diff for churn, debug prints, and accidental scope creep.
- Record. Update
AI/Log.md(session entry) andAI/Issues.md(new/ resolved risks). Commit with a message stating what was verified, not just what changed.
SAKIGo-specific invariants (the recurring bug shapes)
Check these whenever code near them changed; each has bitten before or is a standing design contract:
- Perspective: My/Opponent planes, WDL (length 4: win/draw/loss/ no-result), score sign, ownership sign, captured-stone diff, komi sign (negative for Black to move) — all flip with side to move; per-ply flips in any tree/sequence walk.
- Action space:
N*N + 1logits, row-major board points, pass is the final logit. Komi/captures normalized by board area, clamped [-1, 1]. - D4: augmentation and equivariance apply to every board-shaped field (planes, ownership, policy/budget board part, legal mask) and never to the pass entry or global fields. Policy-index transforms must use the same group element as the plane transform.
- Masking: raw logits during training; legality masking only at
inference/search. Masked losses normalize by
mask.sum().clamp_min(1). - Live-model measurement: validation must exercise current weights — watch
parameter caches (
RegularLinear1x1caches only whenrequires_grad=False), stale eval iterators, mutated pinned buffers. - Rules source of truth: the Rust engine. Python reimplementations (generator, selfplay_eval) are tracked divergence risks — compare semantics, don't assume.
- Windows/WDDM: oversized CUDA batches page instead of OOM-ing; judge memory by measured peak allocation, not by exceptions.
- Strength claims: paired color-reversed evals, not val loss (val loss has anti-correlated with strength here; the split leaks transposed openings).
What NOT to do
- Don't re-report known watchlist items as new findings.
- Don't "fix" design decisions (e.g. masking location, policy/budget split)
during verification — those go to
AI/Issues.mdfor the human. - Don't pad the report: findings, evidence, what remains. No ceremony.
When not to use it
- →Re-reporting known watchlist items
- →Fixing design decisions during verification
- →Delegating audits to Haiku-class subagents
Prerequisites
Limitations
- →Subagent findings have a high false-positive rate
- →Clean scans with untested behavior are insufficient
How it compares
It replaces checklist-based reviews with discriminating tests that falsify assumptions about code correctness.
Compared to similar skills
verification side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| verification (this skill) | 0 | 22d | No flags | Advanced |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| fix-bug | 11 | 6mo | Review | Intermediate |
| test-fixing | 1 | 8mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
fix-bug
tddworks
Guide for fixing bugs in ClaudeBar following Chicago School TDD and rich domain design. Use this skill when: (1) User reports a bug or unexpected behavior (2) Fixing a defect in existing functionality (3) User asks "fix this bug" or "this doesn't work correctly" (4) Correcting behavior that violates the user's mental model
test-fixing
mhattingpete
Run tests and systematically fix all failing tests using smart error grouping. Use when user asks to fix failing tests, mentions test failures, runs test suite and failures occur, or requests to make tests pass.
fixing-bugs-systematically
CaptainCrouton89
Diagnose and fix bugs through systematic investigation, root cause analysis, and targeted validation. Use when something is broken, errors occur, performance degrades, or unexpected behavior manifests.
moai-workflow-testing
modu-ai
Comprehensive development workflow specialist combining DDD testing, debugging, performance optimization, code review, PR review, and quality assurance into unified development workflows
investigate
MadAppGang
Unified entry point for code investigation. Auto-routes to specialized detective based on query keywords. Use when investigation type is unclear or for general exploration.