← ClaudeAtlas

cleanlisted

Pre-commit anti-slop audit — checks staged/dirty files for code slop (debug artifacts, single-use helpers, dead imports) AND documentation slop (stale claims, broken internal links, new .md files, redundant sections). Writes a sentinel so the pre-commit-gate hook lets the commit through. MUST be invoked before `git commit` in this repo. Triggers when the agent is about to commit, when user says "commit", "clean", "ready to commit", or when the pre-commit-gate hook blocks.
Rockielab/rockie-claude · ★ 20 · AI & Automation · score 76
Install: claude install-skill Rockielab/rockie-claude
# /clean — Pre-commit audit adapted for a research repo Research repos are typically majority prose — scripts, experiment dirs, and many `.md` docs read by humans AND future agents. Slop in either kind hurts. The audit covers both. ## When to run - Before EVERY `git commit`. The `pre-commit-gate` hook will block if the sentinel hash doesn't match current staged state. - When the user asks to commit. - When the hook emits a block message. ## What the skill does 1. Runs `${OPENCLAW_SKILLS_DIR}/clean/audit.py`. Arguments: - `--scope staged` (default) — audits files in `git diff --cached --name-only` - `--scope dirty` — audits all modified + untracked non-gitignored files 2. The audit reports findings in three buckets: - **Blockers** — must fix before commit (new `.md` files created during cleanup runs, broken internal doc links, obvious debug artifacts, syntax errors) - **Warnings** — should review (TODO markers pointing to resolved work, duplicate content across docs, rules contradicting `${OPENCLAW_WORKSPACE_DIR}/memory/workflow.db`) - **Info** — worth knowing (file size growth, complexity spikes) 3. If zero blockers: the audit invokes `${OPENCLAW_WORKSPACE_DIR}/scripts/clean-finalize.sh <hash>` as its final action. That script writes `${OPENCLAW_WORKSPACE_DIR}/.state/clean-ok-<hash>` (where `<hash>` is computed by `${OPENCLAW_WORKSPACE_DIR}/scripts/compute_clean_hash.sh`) AND emits the upstream-contribute nudge to stderr. Th