attic/skills/polish/SKILL.md
Codex review + cleanup. Findings are challenged by critic-audit, not aggregated as facts, and fixes are applied directly. Do NOT use for internal multi-reviewer deep audits or findings reports (use /audit).
npx skillsauth add thkt/dotclaude polishInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Codex reviews the diff, then critic-audit puts the findings through an adversarial challenge. Fix the survivors, then clean up with /simplify and enhancer-code. Do not stop at a findings report; apply the fixes directly. For an internal-reviewer audit, use /audit.
$ARGUMENTS may contain the target scope. If empty, analyze git diff HEAD (staged and unstaged changes).
Run an external Codex review to produce findings. If which codex fails, skip to Phase 3.
Run codex review "Review for logic, architecture, data flow, and code simplicity (flag over-complexity and unnecessary indirection)". In codex 0.141.0 the scope flags (--uncommitted / --base / --commit) are mutually exclusive with the PROMPT argument, so pass no scope flag when sending the simplicity-lens PROMPT. Codex reads git status itself and reviews the staged, unstaged, and untracked changes. Omitting the PROMPT falls back to Codex's default review and drops the simplicity lens, so always pass it.
critic-audit filters Codex false positives, then the surviving findings are fixed directly.
critic-audit input schema (critic-audit § Input) and spawn Task(subagent_type: "critic-audit") once with the full list. Wait for the per-finding verdictgit diff scopegit stash any fix that breaks tests| Verdict | Action | | ------------- | ------------------------------------------- | | confirmed | Keep as a fix candidate | | disputed | Drop | | downgraded | Apply the lowered severity | | needs_context | Surface to the user with a one-line summary |
Two cleanup mutators run in sequence on the post-Phase-2 diff, then validate. Both apply fixes directly without a critic-audit challenge, since neither hunts bugs.
Skill("simplify") on the current diff for a cleanup-only pass (reuse, simplification, efficiency, altitude). If it rejects a no-arg invocation, pass the diff scope Phase 1 detectedenhancer-code via Task(subagent_type: "enhancer-code") to remove AI slop and apply simplification rules, then audit tests. Run it after /simplify so its preservation rule (when in doubt, keep) takes priority over /simplify's editsgit stash the cleanup edits on failureReport what each phase did. Codex findings (Phase 1), critic-audit verdict counts and fixes applied with skip reasons (Phase 2), and /simplify plus enhancer-code edits with file:line and the test validation result (Phase 3).
| Error | Action |
| ------------------------------------- | ---------------------------------------------- |
| No changes in diff | Report that there is nothing to polish |
| codex review fails | Skip to Phase 3 with no findings |
| critic-audit fails or returns empty | Keep all findings as confirmed, proceed to fix |
| /simplify unavailable or fails | Skip to enhancer-code |
tools
Delegate implementation to codex (coder) via the herdr-agentchat plugin and drive a two-pane conversation to completion.
development
Extract recurring patterns from past closed PRs/issues and the research findings in workspace/research/, verify them against the latest code, and propose them to docs/wiki/ via PR.
development
Create Decision Records (DR) in MADR v4 format with auto-numbering.
development
Detect flaky tests by shaking them — repeated runs under varied order, parallelism, and seed — plus a static smell scan that flags latent flakiness in tests that currently pass. Classify each target as confirmed-flaky, latent-flaky, or stable and fix the root cause without weakening the test. Do NOT use to fix a confirmed single bug (use /fix) or for static-only code review (use /audit).