/lab-skills:audit-projectfrom lab-skills
Periodic project health check - cross-check docs, prune conventions, find drift. Use when project documentation feels stale, before milestones, or when CLAUDE.md is getting long. Do NOT load for auditing skills (use /audit-skills) or data analysis scripts (use /audit-script).
Ships in lab-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When the user invokes /audit-project, perform a thorough health check of project documentation and conventions. This is a periodic maintenance task — not needed every session, but valuable before milestones, after intensive work periods, or when things feel out of sync.
Check the project's .claude/CLAUDE.md for a project-type: field:
data-science — Full audit including all stepsgeneral (or no field found) — Skip steps marked [Data Science only]Several checks below are pure structure, not judgment — gather them with bash up front and feed the results into the interactive review, so your attention goes to the hard calls rather than to what a regex settles:
wc -l .claude/CLAUDE.md .claude/*.md 2>/dev/null # §6 CLAUDE.md size + planning-doc sizes (§2)
ls .claude/*.md # §3 unregistered docs (diff against the Registry)
ls scripts/[0-9]*_* 2>/dev/null | grep -v '\.qmd$' # §4b numbered non-.qmd violations
ls scripts/scratch/ 2>/dev/null # §4b scratch leftovers
# §4b correspondence: numbered scripts/*.qmd vs outs/<num>_* (orphans either way)
Hand these to Steps 2–6 as evidence. The cross-document judgment stays solo — drift, duplication, and convention pruning need one context holding CLAUDE.md + every planning doc at once; fanning that read out across isolated agents would destroy the cross-doc signal the audit exists to find. (Only the optional gated verification in §7b — refuting findings already formed — may fan out.)
When invoked non-interactively — e.g. a headless weekly cron (claude -p) or when the user asks
for "report only" — run the detection half only and change nothing:
.claude/audit_reports/.The saved report is a worklist: the user later opens the project interactively and says "work through
the audit findings," at which point the interactive/decision steps run with them. This is the mode the
bundled jobs/weekly-audit.sh digest job uses across recently-active projects.
The main project CLAUDE.md should not maintain script or file lists that duplicate planning documents. Check for staleness:
For each registered planning document, perform both automated checks and an interactive review with the user.
After automated checks, walk through each planning document with the user:
Check if STATUS_SUMMARY.md exists at the repo root.
STATUS_SUMMARY.md uses a unified format shared between Claude Code (/done) and Cowork (wrapup), so executive-assistant skills can scan all projects uniformly. See the /done skill's Step 2b for the exact format template.
Check the Session Log section at the bottom of the project's .claude/CLAUDE.md:
Scan .claude/ for .md files not listed in the Project Document Registry. Propose adding any missing ones to the appropriate category table.
Check if any scripts in scripts/ are not tracked in any planning document. For untracked scripts that relate to ongoing work, suggest either:
/new-planCheck if any significant data files were created but not added to the Canonical Data Files Registry.
For projects using the script organization conventions:
.qmd scripts for missing status: YAML frontmatterfinalized that have been modified since their last commit, or development scripts that appear completeCheck the scripts/ directory for structural convention violations:
.qmd filesScan scripts/ (not subdirectories) for files matching [0-9]*_* that are NOT .qmd:
.R, .py, .Rmd files with number prefixes are violationsscripts/old/, scripts/scratch/, scripts/exploratory/, unnumbered files (legacy).qmd, move to R//python/ as helper, or archive to scripts/old/Check if scripts/scratch/ exists and has files:
For scripts with letter suffixes (e.g., 15a_, 15b_, 15c_):
outs/XX_topic/, not outs/XXa_topic/)a script exists (letters imply sequence)For each numbered .qmd:
outs/{number}_{topic}/ exists (lettered scripts share one dir by number)status: development — note, don't error)For each output directory in outs/ with a number prefix:
Review existing convention entries in the project's .claude/CLAUDE.md. For each, ask: Is this now self-evident from the codebase?
A convention is self-evident when:
Propose removing redundant entries. Show which entries would be pruned and why.
Be conservative — only prune conventions that are truly obvious from the code. When in doubt, keep the entry.
Report the current size of the project CLAUDE.md (line count, approximate KB). If it's growing large (>300 lines), suggest:
Quick checks on user-level configuration (lightweight — skip silently if everything is fine):
~/.claude/projects/*/memory/MEMORY.md for the current project. If over 200 lines, flag for pruning.~/.claude/CLAUDE.md line count. If over 150 lines, suggest extracting content into skills./audit-skills. Skip skill-level checks here.Gated — optional enhancement, not a requirement. The audit is complete and valid without this phase. Run it ONLY when both hold:
- the Workflow tool is available in this environment — it is not present in every Claude Code setup (lab-plugin users on a standard install will not have it), and
- at least one opt-in signal: ultracode is on, the user explicitly asked for thorough / adversarial / "double-check" verification, or you are producing a saved handoff report for another session.
If the Workflow tool is absent or no opt-in signal is present, skip this entire phase and proceed with your solo findings. Never block, delay, or weaken the audit waiting on a capability the environment may not have, and don't mention the workflow to users who can't run it.
When the conditions hold, fan out a short verification workflow over the drift / staleness findings you've already gathered solo (Steps 1–7). This is well suited to a large project with many planning docs, where one context can't hold every doc at once:
.claude/,
and scripts/ fresh, told what you already found, hunting only for what you missed:
unregistered docs/scripts, orphaned output dirs, status/reality mismatches, stale "Next"
items already done.Fold the verified / refuted / newly-found findings into the Summary, and note that an adversarial pass was run. Do the read and cross-referencing of Steps 1–7 solo; only this verification pass over already-formed findings may fan out. This is the "adversarial verify + completeness critic" pattern from the Workflow tool's quality-patterns guidance.
Report findings organized as:
Ask the user which findings they'd like to act on before making any changes.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub musserlab/lab-claude-skills --plugin lab-skills34 skills in this plugin
/audit-scriptSystematic audit of data analysis scripts for bugs, analytical reasoning, data handling, style, and reproducibility. Includes domain verification phase that researches tools, file formats, and methods to catch domain-specific errors (not just code bugs). Use when auditing a script, reviewing code for correctness, checking for bugs, preparing a script for publication, or when the user says "audit this script", "review this code", "check this for bugs", or "is this script correct". Three modes: thorough (collaborative section-by-section), fast (Claude-driven with discussion), and report-only. Do NOT load for quick one-off questions about a single line or function.
/audit-skillsAudit Claude Code skills for bloat, trigger accuracy, structural quality, redundancy, and pruning opportunities. Use when skills feel bloated, before publishing to lab repo, after building several new skills, when reviewing a single newly-created skill before publishing, or when the user says "audit my skills", "review skills", "check skill quality", "audit this skill", or invokes /audit-skills. Covers both user-level (~/.claude/skills/) and project-level (.claude/skills/) skills, and supports both full-library scans and single-skill reviews. Do NOT load for auditing data analysis scripts (use /audit-script) or project documentation (use /audit-project).
/cleanup-scriptsSession-scoped script cleanup for data science projects. Checks scripts/scratch/ for working files that need consolidation into .qmd scripts, flags numbered non-.qmd files in scripts/, and verifies script-output directory correspondence. Use when finishing a coding session, when scripts/scratch/ has accumulated files, or when the user says "clean up scripts", "consolidate scratch", or "check script conventions". Lightweight and fast — reads files, no expensive computation.
/conda-envConda environment activation for Python commands. Use when running Python scripts, pip, or conda-dependent tools./data-handlingData handling best practices for R and Python data science analysis scripts. Use when writing data manipulation code, analysis pipelines, or .qmd scripts that process scientific/analytical data (e.g., filtering, joining, normalizing datasets). Do NOT load for general Python scripting, infrastructure code, or configuration management.
/debugging-before-patchingSystematic debugging and error diagnosis. Use when debugging errors, fixing bugs, diagnosing problems in code or data, or when the user reports something not working.