Skip to content
cccskills
FreePublished on GitHub

deep-audit

Audit an entire repository with four parallel agents checking documentation, hook scripts, skills, and rules. Identify broken references, incorrect counts, code issues, and conflicting information, then apply fixes and repeat verification for up to five rounds.

OriginalShow the original description

Deep consistency audit of the entire repository — launches 4 parallel specialist agents to find factual errors, code bugs, broken references, count mismatches, and cross-document inconsistencies, then fixes all issues and loops until clean. Make sure to use this skill whenever the user wants a comprehensive repository-wide check — not a targeted review of a single file. Triggers include: "audit", "deep audit", "find inconsistencies", "check everything", "run a full audit", "are there any broken references", "check the whole repo", "something feels off", "run the audit loop", or after making broad changes across multiple files.

Run score Not tested

See how to install

Good for

  • Check repository consistency after broad changes
  • Find broken paths and outdated feature counts
  • Review hook scripts and rule consistency
  • Run repeated checks before a release

Files included (1)

  • SKILL.md5.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

/deep-audit — Repository Infrastructure Audit

Run a comprehensive consistency audit across the entire repository, fix all issues found, and loop until clean.

When to Use

  • After broad changes (new skills, rules, hooks, guide edits)
  • Before releases or major commits
  • When the user asks to "find inconsistencies", "audit", or "check everything"

Workflow

PHASE 1: Launch 4 Parallel Audit Agents

Launch these 4 agents simultaneously using Task with subagent_type=general-purpose:

Agent 1: Guide Content Accuracy

Focus: README.md, CLAUDE.md, rules/workflow-overview.md

  • All numeric claims match reality (skill count, agent count, rule count, hook count)
  • All file paths mentioned actually exist on disk
  • All skill/agent/rule names match actual directory names
  • No stale counts from previous versions

Agent 2: Hook Code Quality

Focus: hooks/*.py and hooks/*.sh

  • No remaining /tmp/ usage (should use ~/.claude/sessions/)
  • Hash length consistency ([:8] across all hooks)
  • Proper error handling (fail-open pattern: top-level try/except with sys.exit(0))
  • JSON input/output correctness (stdin for input, stdout/stderr for output)
  • Exit code correctness (0 for non-blocking, non-zero only when intentionally blocking)
  • from __future__ import annotations for Python 3.8+ compatibility
  • Correct field names from hook input schema (source not type for SessionStart)
  • PreCompact hooks print to stderr (stdout is ignored)

Agent 3: Skills and Rules Consistency

Focus: skills/*/SKILL.md and rules/*.md

  • Valid YAML frontmatter in all files
  • No stale disable-model-invocation: true
  • allowed-tools values are sensible
  • Rule paths: reference existing directories
  • No contradictions between rules
  • CLAUDE.md skills table matches actual skill directories 1:1
  • All templates referenced in rules/guide exist in templates/

Agent 4: Cross-Document Consistency

Focus: README.md, CLAUDE.md

  • All feature counts agree across both documents
  • All links point to valid targets
  • Directory tree matches actual structure
  • No stale counts from previous versions

PHASE 2: Triage Findings

Categorize each finding:

  • Genuine bug: Fix immediately
  • False alarm: Discard (document WHY it's false for future rounds)

Common false alarms to watch for:

  • Quarto callout ## Title inside ::: divs — this is standard syntax, NOT a heading bug
  • allowed-tools linter warning — known linter bug (Claude Code issue #25380), field IS valid
  • Counts in old session logs — these are historical records, not user-facing docs

PHASE 3: Fix All Issues

Apply fixes in parallel where possible. For each fix:

  1. Read the file first (required by Edit tool)
  2. Apply the fix
  3. Verify the fix (grep for stale values, check syntax)

PHASE 4: Documentation Check

This plugin does not maintain a Quarto source file. If README.md or CLAUDE.md were modified, verify they are consistent with each other — no render step is needed.

PHASE 5: Loop or Declare Clean

After fixing, launch a fresh set of 4 agents to verify.

  • If new issues found → fix and loop again
  • If zero genuine issues → declare clean and report summary

Max loops: 5 (to prevent infinite cycling)

Key Lessons from Past Audits

These are real bugs found across 7 rounds — check for these specifically:

Bug PatternWhere to CheckWhat Went Wrong
Stale counts ("19 skills" → "21")Guide, README, landing pageAdded skills but didn't update all mentions
Hook exit codesAll Python hooksExit 2 in PreCompact silently discards stdout
Hook field namespost-compact-restore.pySessionStart uses source, not type
State in /tmp/All Python hooksShould use ~/.claude/sessions/<hash>/
Hash length mismatchAll Python hooksSome used [:12], others [:8]
Missing fail-openPython hooks __main__Unhandled exception → exit 1 → confusing behavior
Python 3.10+ syntaxType hints like `dictNone`
Missing directoriesquality_reports/specs/Referenced in rules but never created
Always-on rule listingGuide + READMEmeta-governance omitted from listings
macOS-only commandsSkills, rulesopen without xdg-open fallback
Protected file blockingsettings.json editsprotect-files.sh blocks Edit/Write

Output Format

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]

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

a1

FreeSummary

Turn a broad research idea into clear, testable questions. Compare familiar and less conventional approaches, structure the selected question around its population and methods, and assess variables, feasibility, and potential theoretical contributions.

  • Turn a research topic into testable questions
  • Narrow an overly broad research question
  • Compare alternative research angles
brycewang-stanford/Auto-Empirical-Research-Skills4.7KUpdated Oct 20, 2026

a2

FreeSummary

Helps build a research framework by comparing theories, mapping relationships between variables, and deriving testable hypotheses. Explores less conventional options, examines weaknesses and competing explanations, and produces diagrams with anticipated reviewer objections.

  • Comparing theories for a research question
  • Deriving hypotheses from relationships between variables
  • Examining weaknesses and anticipated reviewer objections
brycewang-stanford/Auto-Empirical-Research-Skills4.7KUpdated Oct 20, 2026

a5

FreeSummary

Clarify the philosophical assumptions behind a research project and check whether they fit the proposed methods. Get a reasoned research stance, draft proposal wording, and guidance for explaining how the researcher's background and values shape the study.

  • Clarifying philosophical foundations for a research proposal
  • Explaining why the chosen research methods fit the study
  • Drafting a statement about the researcher's position
brycewang-stanford/Auto-Empirical-Research-Skills4.7KUpdated Oct 20, 2026

academic-paper

FreeSummary

Plan and draft academic papers through specialized agent roles covering literature, arguments, citations, and review. Get chapter guidance, revision roadmaps, Traditional Chinese and English abstracts, and documents formatted as LaTeX, DOCX, PDF, or Markdown.

  • Planning a paper chapter by chapter
  • Drafting a paper from research materials
  • Turning reviewer comments into a revision roadmap
brycewang-stanford/Auto-Empirical-Research-Skills4.7KUpdated Oct 20, 2026

Turn a detailed outline into a philosophy or interdisciplinary manuscript. Draft chapters with repeated quality reviews, check terminology and arguments across sections, and prepare the manuscript, evaluation reports, abstract, and metadata for submission.

  • Draft a full paper from a detailed outline
  • Review argument and citation quality chapter by chapter
  • Check terminology and argument flow across chapters
brycewang-stanford/Auto-Empirical-Research-Skills4.7KUpdated Oct 20, 2026

Simulate academic peer review through five reviewer roles tailored to the paper's field. Receive separate critiques, an editorial decision, and a prioritized revision roadmap, or check whether a revised manuscript addresses earlier comments.

  • Review a manuscript before journal submission
  • Examine research methods and statistical validity
  • Challenge core arguments and alternative explanations
brycewang-stanford/Auto-Empirical-Research-Skills4.7KUpdated Oct 20, 2026

See all skills by brycewang-stanford

Report a problem with this skill