Project audit
Repository audit for non-website projects (CLI, libs, backend, monorepo). Use when: "project-audit", "project audit", "repo audit", "code audit".From its SKILL.md
npx -y skills add claude-hangar/claude-hangar --skill project-auditAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
17.6 KB, ~4.6k tokens by cl100k_base, as published. Nobody here has run it
Skill: project-audit
Systematic project audit for any repository — with a three-layer depth model. Automatically detects the stack, loads relevant supplements, and performs structured checks — for management repos, CLI tools, libraries, backend services, monorepos, Python projects, and shell collections.
Distinction from /audit: No SEO, no accessibility, no privacy/GDPR, no Lighthouse.
Instead, more thorough checking of Git, CI/CD, code quality, deployment, and maintenance.
Check Layers
Each phase has two check levels:
| Layer | Method | When |
|---|---|---|
| Source Layer | Read code, analyze configs, scan files | Always (offline possible) |
| Runtime Layer | npm audit, tsc --noEmit, docker scout, run tests, check CI logs | When tools are available |
Rule: Source layer is mandatory. Runtime layer supplements with tool-based checks. Both layers are tracked in state per phase.
Runtime layer per phase:
| Phase | Runtime Tools |
|---|---|
| 02 Dependencies | npm audit, pip-audit, npm outdated |
| 03 Code Quality | tsc --noEmit, npx biome check, pylint |
| 05 CI/CD | gh run list, check CI logs |
| 07 Testing | npm test, coverage reports |
| 08 Security | npm audit, docker scout, git log --all -p -- .env |
| 09 Deployment | docker scout cves, container health check |
Check Priorities + Completeness Tracking
See
_shared/audit-patterns.md(MUST/SHOULD/COULD markers, completeness counting). Phase with <100% MUST-checks can NOT be marked asdone.
Architecture: Three-Layer Model
Layer 1: Base Phase (phases/*.md) ~70-100 lines, universal
Layer 2: Stack Supplement (stacks/*.md §-sections) ~10-15 lines per phase, stack-specific
Layer 3: Project Override (project-audit-context.md) ~20-40 lines, project-specific
Per phase, only the relevant supplements are loaded. Result: ~100-150 lines of check instructions per phase — comparable to a dedicated skill.
5 Modes
| Mode | Trigger | Description |
|---|---|---|
start | /project-audit start | Detect stack + project type, create phase plan, first 2 phases |
continue | /project-audit continue | Continue next phases or fix max 5 findings |
status | /project-audit status | Show progress + statistics |
report | /project-audit report | Generate structured Markdown report |
auto | /project-audit auto | Fully autonomous run — all phases without prompts |
Mode: start
Step 1 — Detect Project Type
| Detected | Project Type |
|---|---|
global/, projects/, setup.sh, no src/ | management-repo |
bin in package.json | cli-tool |
main/exports in package.json, no bin, no framework | library |
fastify/express/koa without frontend framework | backend-service |
workspaces in package.json or pnpm-workspace.yaml | monorepo |
Python project (setup.py, pyproject.toml, requirements.txt) | python-project |
| Shell scripts dominant (*.sh), no package.json | scripts-collection |
| Fallback | generic |
Step 2 — Stack Detection
Scan files and detect stack:
| File/Pattern | Detects | Stack-Key |
|---|---|---|
package.json present | Node.js | node: true |
pyproject.toml, setup.py, requirements.txt | Python | python: true |
Majority *.sh files, no package.json | Shell/Bash | shell: true |
Dockerfile, docker-compose.* | Docker | docker: true |
workspaces in package.json, pnpm-workspace.yaml | Monorepo | monorepo: true |
.claude/ directory or CLAUDE.md in root | Claude Code | claude-code: true |
go.mod present | Go | go: true |
*.tf files, terraform.tfvars | Terraform | terraform: true |
.github/ directory or git remote shows github.com | GitHub | github: true |
Version detection: For each detected stack, extract version:
- Node:
engines.nodeor.nvmrc/.node-version - Python:
python_requiresor.python-version - Docker: Base image tag in Dockerfile
Step 3 — Load Context
- Project CLAUDE.md read (architecture, conventions)
- project-audit-context.md load (if in project root) — project-specific context
- README.md read (purpose, setup instructions)
- Existing docs scan: TODO.md, STATUS.md, CHANGELOG.md
- package.json /
pyproject.tomlanalyze (if present) - Existing state file (.project-audit-state.json) check > auto-migrate if v1
Step 4 — User Query
Show detection result:
Project Detection:
+-------------+------------------+---------+
| Category | Detected | Version |
+-------------+------------------+---------+
| Project Type| management-repo | — |
| Stack | Shell/Bash | — |
| Docker | Yes | — |
| Monorepo | No | — |
+-------------+------------------+---------+
Project context: project-audit-context.md found
Existing docs: TODO.md, STATUS.md
Ask user (AskUserQuestion):
- Audit scope: Complete (all 10 phases) vs. focused (specific phases)
- Phase order: Sequential (01>10, default) vs. Smart Order (Security>Dependencies>Code>Rest, recommended)
[CHECKPOINT: decision] — User selects audit scope and phase order.
Step 5 — Create state, start first 2 phases
Mode: continue
- Read
.project-audit-state.json - Identify next pending phase(s)
- Generate smart recommendation (> logic in
_shared/audit-patterns.md) - Show recommendation as first option in AskUserQuestion, user chooses
- Write state immediately after each phase/fix
Fixing Findings
- Always fix highest severity first: CRITICAL > HIGH > MEDIUM > LOW
- Per fix: Show problem > Load fix template (from
fix-templates.md) > User confirmation > Implement > Test - Update fix status in state (
"status": "fixed","fixedIn": "Session N") - No auto-fix — every fix requires user confirmation (except
automode)
Mode: status
Read state file and display:
Project Audit: {{PROJECT_NAME}} (management-repo)
Stack: Shell/Bash, Docker
Phases:
[done] 01 Structure & Architecture (Session 1, 2 Findings, MUST 100%)
[done] 02 Dependencies & Ecosystem (Session 1, 1 Finding, MUST 100%)
[wip] 03 Code Quality (in progress)
[wait] 04 Git & Versioning
[wait] 05 CI/CD & Automation
[wait] 06 Documentation & Onboarding
[wait] 07 Testing & QA
[wait] 08 Security & Secrets
[wait] 09 Deployment & Operations
[wait] 10 Maintenance & Hygiene
Findings: 3 total
CRITICAL: 0
HIGH: 1 (open: 1)
MEDIUM: 2 (open: 2)
LOW: 0
Completeness: 2/10 phases completed
Layer: Source done | Runtime done (2/2 phases)
Mode: report
Generate structured Markdown report based on templates/report.md.
- Read state file
- Group all findings by phase
- Report with Executive Summary, Findings per Phase, Recommendations
- Include trend analysis (if history available):
Trend (recent audits): CRITICAL: 3 > 1 > 0 (resolved) HIGH: 5 > 3 > 2 (declining) Total: 12 > 8 > 5 Assessment: Project is steadily improving. - Save report as
PROJECT-AUDIT-REPORT-{YYYY-MM-DD}.mdin project root - If previous reports exist: Diff section (new/resolved since last report)
Mode: auto
Fully autonomous project audit without prompts.
Flow
- Check orchestrator context: If
.audit-orchestrator-state.jsonexists:- Read
phaseMapping.project-audit.delegated> skip delegated phases - Read
sequencingReason> understand context - Example: If
structuredelegated to/audit> skip Phase 01
- Read
- Auto-detection as in
start - All 10 phases run through (no 2-phase limit, skip delegated phases)
- Document findings with fix templates from
fix-templates.md - Context management: When context is running low:
- Write state immediately
- Create task in
.tasks.jsonwith handoff note - Recommend: "New session with
/project-audit continue"
- At the end: automatically generate report
Context Protection in Auto Mode
- Findings are collected but not fixed immediately (documented only)
- Write state after EVERY phase immediately
- At context limit: clean abort with complete state
- Fixes in follow-up sessions with
/project-audit continue
10 Phases
| # | Phase | Prefix | Checks |
|---|---|---|---|
| 01 | Structure & Architecture | STRUC | Folder structure, patterns, coupling, layering |
| 02 | Dependencies & Ecosystem | DEP | Packages, versions, ecosystem health, licenses |
| 03 | Code Quality | QUAL | Patterns, complexity, dead code, types, linting |
| 04 | Git & Versioning | GIT | .gitignore, commits, branches, tags, history |
| 05 | CI/CD & Automation | CICD | Workflows, actions security, deploy pipelines, hooks |
| 06 | Documentation & Onboarding | DOC | README, CLAUDE.md, ADRs, API docs, runbooks |
| 07 | Testing & QA | TEST | Test pyramid, coverage, E2E, mutation testing |
| 08 | Security & Secrets | SEC | Secrets, supply chain, container security, SAST |
| 09 | Deployment & Operations | DEPLOY | Docker, server, monitoring, rollback, health checks |
| 10 | Maintenance & Hygiene | MAINT | Tech debt, cleanup, lifecycle, deprecations |
Details in the phase files under phases/.
Phase Execution
For each phase:
-
Load base: Read
phases/{NN}-{name}.md— universal check items -
Load supplements: For each detected stack, load the matching file, ONLY the section relevant to the current phase
Phase Supplement Section 01-structure §Structure 02-dependencies §Dependencies 03-code-quality §Code 04-git §Git 05-cicd §CICD 06-documentation §Documentation 07-testing §Testing 08-security §Security 09-deployment §Deployment 10-maintenance §Maintenance -
Project override: If
project-audit-context.mdexists > include relevant section -
Existing findings: Check previous audit docs, do not create duplicates
-
Source layer: Systematically execute all code/config-based checks
-
Runtime layer: Execute tool-based checks (when tools are available)
- Unavailable tools: document, no error
-
Document findings: Each finding with ID, severity, description, location
-
Count completeness: MUST/SHOULD/COULD checks (executed vs. skipped)
- Skipped MUST-checks with reason in
checksSkipped[] - Phase with <100% MUST = NOT markable as
done
- Skipped MUST-checks with reason in
-
Update state: Phase status + completeness + layer status
[CHECKPOINT: verify] — After each phase: show findings + completeness to user, get confirmation.
Supplement Loading Logic
Per phase, the skill loads only relevant stack supplements. Each stack file is structured by sections.
Example Phase 08-security:
> Always: phases/08-security.md (base)
> If node=true: + stacks/node.md §Security
> If docker=true: + stacks/docker.md §Security
> If python=true: + stacks/python.md §Security
> If project-audit-context.md exists: + relevant section
Supplement files:
| Stack-Key | Supplement Path |
|---|---|
node: true | stacks/node.md |
python: true | stacks/python.md |
shell: true | stacks/shell.md |
docker: true | stacks/docker.md |
monorepo: true | stacks/monorepo.md |
claude-code: true | stacks/claude-code.md |
go: true | stacks/go.md |
terraform: true | stacks/terraform.md |
github: true | stacks/github.md |
If a stack is detected but no supplement exists > use base phase only, no error.
Finding-IDs
| Phase | Prefix | Example |
|---|---|---|
| 01-structure | STRUC | STRUC-01 |
| 02-dependencies | DEP | DEP-01 |
| 03-code-quality | QUAL | QUAL-01 |
| 04-git | GIT | GIT-01 |
| 05-cicd | CICD | CICD-01 |
| 06-documentation | DOC | DOC-01 |
| 07-testing | TEST | TEST-01 |
| 08-security | SEC | SEC-01 |
| 09-deployment | DEPLOY | DEPLOY-01 |
| 10-maintenance | MAINT | MAINT-01 |
Severity Definitions
| Level | Criteria | Examples |
|---|---|---|
| CRITICAL | Security vulnerability, data loss, exposed secrets | Secrets in repo, SQL injection, open ports |
| HIGH | Missing tests for critical paths, broken CI/CD, CVEs | No tests, outdated deps with CVE, broken pipelines |
| MEDIUM | Missing docs, style inconsistencies, missing .gitignore | No README, inconsistent naming, missing types |
| LOW | Cosmetic, nice-to-have, best practice | Outdated but secure deps, missing comments |
Prioritization: CRITICAL > HIGH > MEDIUM > LOW. Security before functional before cosmetic.
State Schema v2.1 (.project-audit-state.json)
Complete state schema (JSON example) + migrations v1>v2 and v2>v2.1: See state-schema.md
Phase Order
Sequential (Default)
01 > 02 > 03 > 04 > 05 > 06 > 07 > 08 > 09 > 10
Smart Order (Recommended)
Prioritized by impact:
08-security > 02-dependencies > 03-code-quality > 05-cicd > 09-deployment > 04-git > 07-testing > 01-structure > 06-documentation > 10-maintenance
Logic: Security and dependencies are most urgent (CVEs, secrets). Code quality and CI/CD have high impact. Structure/docs/maintenance are important but less time-critical.
User chooses at start. Store in state as "phaseOrder": "sequential" or "smart".
Fix Templates
For common findings there are ready-made fix templates in fix-templates.md.
Per finding type: code snippet, config change, verify step.
Verification-Depth + Fix Protocol
See
_shared/audit-patterns.md(4-Level Verification, Stub-Detection, 5-Step Fix-Protocol). Level 4 (Functional) is mandatory when runtime layer is available. READ + VERIFY never skip.
Context Protection (CRITICAL)
Base rules: See
_shared/audit-patterns.md(Max 2 phases, state immediately, no auto-fix).
Project audit specific:
- Layer tracking: Document source layer and runtime layer status per phase
Smart Next Steps
After completing the project audit, recommend suitable follow-up skills to user:
| Condition | Recommendation | Justification |
|---|---|---|
| >3 HIGH/CRITICAL findings | /adversarial-review audit | Check report for completeness |
| Claude Code project (.claude/ present) | /security-scan | MCP permissions, hook safety, secret detection |
| Audit completed | /lesson-learned session | Extract learnings from audit process |
| Web project detected AND no .audit-state.json | /audit start | Check website quality (SEO, A11y, privacy) |
| Astro project detected AND no .astro-audit-state.json | /astro-audit start | Astro-specific checks |
Output in report: Replace {NEXT_STEPS} placeholder with concrete recommendation list.
Files in This Skill
project-audit/
├── SKILL.md <- This file
├── state-schema.md # State Schema v2.1 + Migrations
├── fix-templates.md # Quick-Fix templates for common findings
├── phases/
│ ├── 01-structure.md # Folder structure, architecture, coupling
│ ├── 02-dependencies.md # Packages, ecosystem, licenses
│ ├── 03-code-quality.md # Patterns, complexity, dead code
│ ├── 04-git.md # .gitignore, commits, branches, tags
│ ├── 05-cicd.md # Workflows, actions security, pipelines
│ ├── 06-documentation.md # README, ADRs, API docs, onboarding
│ ├── 07-testing.md # Test pyramid, coverage, E2E
│ ├── 08-security.md # Secrets, supply chain, SAST
│ ├── 09-deployment.md # Docker, server, monitoring, rollback
│ └── 10-maintenance.md # Tech debt, cleanup, deprecations
├── stacks/
│ ├── node.md # Node.js-specific checks
│ ├── python.md # Python-specific checks
│ ├── shell.md # Shell/Bash-specific checks
│ ├── docker.md # Docker-specific checks
│ ├── monorepo.md # Monorepo-specific checks
│ ├── claude-code.md # Claude Code config/skills/agents/hooks checks
│ ├── go.md # Go-specific checks
│ ├── terraform.md # Terraform/IaC-specific checks
│ └── github.md # GitHub repo/org security checks
└── templates/
└── report.md # Markdown report template
What ships with it: 20 files
66.9 KB alongside SKILL.md
phases/
- 01-struktur.md2.5 KB
- 02-dependencies.md2.2 KB
- 03-code-qualitaet.md2.3 KB
- 04-git.md2.1 KB
- 05-cicd.md3.2 KB
- 06-dokumentation.md2.6 KB
- 07-testing.md2.4 KB
- 08-security.md3.0 KB
- 09-deployment.md2.4 KB
- 10-maintenance.md2.4 KB
stacks/
- claude-code.md6.2 KB
- docker.md3.9 KB
- monorepo.md3.6 KB
- node.md3.5 KB
- python.md3.5 KB
- shell.md3.1 KB
templates/
- report.md2.1 KB
- fix-templates.md11.5 KB
- skill.json353 B
- state-schema.md4.2 KB
Gives 0 of the 12 instructions most audit compliance skills give in ~4.6k tokens
Counted across 937 of the 1,487 authors here whose files we hold, read 2026-08-07
- Fetch latest guidelines before each reviewin 43 of 937, across 3 files
- Group findings by severityin 43 of 937
- Check files against all fetched rulesin 42 of 937, across 2 files
- Output findings in terse file:line formatin 41 of 937, across 3 files
- Ask user which files to review if none specifiedin 41 of 937, across 3 files
- Read specified files or prompt user for filesin 39 of 937, across 1 file
- Generate the audit reportin 33 of 937, across 30 files
- Assign a severity to every findingin 25 of 937
- Run automated accessibility scansin 23 of 937, across 13 files
- Output a markdown audit reportin 22 of 937
- Map findings to WCAG criteriain 20 of 937, across 10 files
- Confirm audit scopein 19 of 937, across 9 files
Said here and by no other author read
- run source layer checks mandatorily
- run runtime checks when tools are available
- mark phases incomplete if must checks are skipped
- ask user to select audit scope and phase order
- update the state file immediately after each phase
- group all findings by phase in the report
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.