← ClaudeAtlas

self-auditlisted

Pre-review self-audit of a PR branch: dead struct fields, rotting comments, duplicate types, scope drift — what a human catches but a compiler won't — then dispatches an adversarial agent for deeper design flaws. Use before tagging a reviewer, or after a self-directed refactor.
jamestexas/agents · ★ 2 · AI & Automation · score 61
Install: claude install-skill jamestexas/agents
# self-audit — Pre-review quality pass Check your own PR like a grumpy reviewer would, before one sees it. The compiler and `golangci-lint` catch the easy stuff. This skill catches the grown-up stuff that slips past both of them. ## When to use - After addressing review feedback, before asking a reviewer to look again. - After a significant self-directed refactor, before creating the PR. - Any time you feel "done" but want a second opinion that isn't a human. ## Arguments `$ARGUMENTS` — optional base branch name. Defaults to `main`. --- ## Step 1 — Scope sanity ```bash git diff --stat <base>...HEAD ``` Read the list. For every file, ask: *did I intend to change this?* If anything looks surprising — generated files, unrelated packages, formatter drift — stop and investigate before continuing. The rest of this audit is wasted effort if scope is wrong. ## Step 2 — Dead struct fields A struct field that is written but never read is dead code. `golangci-lint unused` does **not** catch this — as long as the field appears on either side of an `=`, it counts as used. For every struct field you added, confirm there is a read site outside the place it is written. If the only references are: - the extractor/constructor that populates it, and - a test that asserts "this field is non-empty", ...that is circular — the test verifies the field exists, and nothing else cares. Delete the field, its extractor, and that test. ```bash # Rough heuristic — greps for every .FieldName