Loading...
Loading...
Orchestrates the 11-dimension codebase audit (ISO/IEC 25010, OWASP 2025) — discovery, dimension selection, parallel or sequential dimension runs, deterministic scoring and CI gate, and Markdown/SARIF/HTML reports. Use when asked to audit a codebase or run /codebase-audit.
npx skill4agent add appuk45/claude-codebase-audit codebase-audit/codebase-audit # show the dimension menu
/codebase-audit --all # run all applicable dimensions, no menu
/codebase-audit --ci # non-interactive: all applicable dims, gate + exit code
/codebase-audit --config PATHSKILL_DIRreferences/...scripts/...SKILL_DIRAUDIT_CWDAUDIT_CWD/.codebase-audit/.gitignore| # | audit key | detection spec (relative to |
|---|---|---|
| 1 | performance | |
| 2 | security | |
| 3 | enterprise | |
| 4 | issues | |
| 5 | architecture | |
| 6 | dependencies | |
| 7 | i18n | |
| 8 | api | |
| 9 | resilience | |
| 10 | container_iac | |
| 11 | observability | |
references/detection/examples/<same file name>--config.codebase-audit.ymlAUDIT_CWDreferences/config-schema.mddimensionscontext.maturityignoregatesuppressrm -rf .codebase-audit/results && mkdir -p .codebase-audit/resultsAUDIT_CWDreferences/discovery.mdAUDIT_CWDdiscovery_contextarchetypeshas_iactotal_lines.codebase-audit/discovery.jsonDiscovered: [languages] | archetypes: [...] | files: [n] | IaC: [yes/no]dimensions--all--cialldiscovery_context.has_iac == falseDimension 10 (Container & IaC) skipped — no Dockerfile/Terraform/K8s foundRunning: [selected audit keys]EXPECTEDAudit the repository atfor theAUDIT_CWDdimension. discovery_context:<audit key>. Maturity:<JSON>. Ignore paths:<maturity>. Read the detection spec<globs>and follow its "How to use this spec" section: skip non-applicable items as<SKILL_DIR>/references/detection/<NN-name>.md, run each item'sskippedto locate candidates, read only candidate snippets, applysignals, assign severity. Consultconfirmonly for ambiguous candidates. Do not read the whole repository. Write exactly one AuditResult JSON object conforming to<SKILL_DIR>/references/detection/examples/<NN-name>.md(audit =<SKILL_DIR>/references/schema.json, score = 0) to<audit key>. Reply with one line:AUDIT_CWD/.codebase-audit/results/<audit key>.json.<audit key>: <n> findings
✓ <audit key>: <n> findingsAUDIT_CWDpython3pythonpython3# Runtime deps (jsonschema + PyYAML). In interactive mode ask the user before installing.
python3 -c "import jsonschema, yaml" 2>/dev/null || \
python3 -m pip install -q -r "<SKILL_DIR>/scripts/requirements.txt"
# Local (default): HTML dashboard + markdown
python3 "<SKILL_DIR>/scripts/run_engine.py" \
--results-dir .codebase-audit/results --expect <EXPECTED, comma-separated> \
--discovery .codebase-audit/discovery.json \
--out audit-report.md --formats html,md --html-out audit-report.html \
--total-lines <total_lines> [--config .codebase-audit.yml]
# CI (--ci): SARIF + markdown + gate exit code
python3 "<SKILL_DIR>/scripts/run_engine.py" \
--results-dir .codebase-audit/results --expect <EXPECTED, comma-separated> \
--out audit-report.md --formats sarif,md --sarif-out audit-report.sarif \
--total-lines <total_lines> [--config .codebase-audit.yml] --ci--expectgate.fail_on_errorreferences/config-schema.md--total-lines--cireferences/scoring.mdreferences/compliance-map.md