.claude/skills/deep-audit/SKILL.md
Deep consistency audit of the entire repository infrastructure. Launches 4 parallel specialist agents to find factual errors, code bugs, count mismatches, and cross-document inconsistencies. Then fixes all issues and loops until clean. Use when: after making broad changes, before releases, or when user says "audit", "find inconsistencies", "check everything".
npx skillsauth add AndreaMentasti/tweet-election deep-auditInstall 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.
Run a comprehensive consistency audit across the entire repository, fix all issues found, and loop until clean.
Launch these 4 agents simultaneously using Task with subagent_type=general-purpose:
Focus: guide/workflow-guide.qmd
Focus: .claude/hooks/*.py and .claude/hooks/*.sh
/tmp/ usage (should use ~/.claude/sessions/)[:8] across all hooks)try/except with sys.exit(0))from __future__ import annotations for Python 3.8+ compatibilitysource not type for SessionStart)Focus: .claude/skills/*/SKILL.md and .claude/rules/*.md
disable-model-invocation: trueallowed-tools values are sensiblepaths: reference existing directoriestemplates/Focus: README.md, docs/index.html, docs/workflow-guide.html
Categorize each finding:
Common false alarms to watch for:
## Title inside ::: divs — this is standard syntax, NOT a heading bugallowed-tools linter warning — known linter bug (Claude Code issue #25380), field IS validApply fixes in parallel where possible. For each fix:
If guide/workflow-guide.qmd was modified:
quarto render guide/workflow-guide.qmd
cp guide/workflow-guide.html docs/workflow-guide.html
After fixing, launch a fresh set of 4 agents to verify.
Max loops: 5 (to prevent infinite cycling)
These are real bugs found across 7 rounds — check for these specifically:
| Bug Pattern | Where to Check | What Went Wrong |
|-------------|---------------|-----------------|
| Stale counts ("19 skills" → "21") | Guide, README, landing page | Added skills but didn't update all mentions |
| Hook exit codes | All Python hooks | Exit 2 in PreCompact silently discards stdout |
| Hook field names | post-compact-restore.py | SessionStart uses source, not type |
| State in /tmp/ | All Python hooks | Should use ~/.claude/sessions/<hash>/ |
| Hash length mismatch | All Python hooks | Some used [:12], others [:8] |
| Missing fail-open | Python hooks __main__ | Unhandled exception → exit 1 → confusing behavior |
| Python 3.10+ syntax | Type hints like dict | None | Need from __future__ import annotations |
| Missing directories | quality_reports/specs/ | Referenced in rules but never created |
| Always-on rule listing | Guide + README | meta-governance omitted from listings |
| macOS-only commands | Skills, rules | open without xdg-open fallback |
| Protected file blocking | settings.json edits | protect-files.sh blocks Edit/Write |
After each round, report:
## Round N Audit Results
### Issues Found: X genuine, Y false alarms
| # | Severity | File | Issue | Status |
|---|----------|------|-------|--------|
| 1 | Critical | file.py:42 | Description | Fixed |
| 2 | Medium | file.qmd:100 | Description | Fixed |
### Verification
- [ ] No stale counts (grep confirms)
- [ ] All hooks have fail-open + future annotations
- [ ] Guide renders successfully
- [ ] docs/ updated
### Result: [CLEAN | N issues remaining]
testing
Perform adversarial visual audit of Quarto or Beamer slides checking for overflow, font consistency, box fatigue, and layout issues.
testing
Validate bibliography entries against citations in all lecture files. Find missing entries and unused references.
testing
Translate Beamer LaTeX to Quarto RevealJS. Multi-phase workflow with TikZ extraction and QA.
tools
Context and tools for working with Stata — writing .do files, running them in batch mode, and efficiently consulting the bundled PDF documentation.