codebase-audit

Audit Python codebases through baseline verification, structural recon, and iterative review loops.

1|Updated Mar 15, 2025
One-click install
npx skills add https://github.com/adikpb/dotfiles --skill codebase-audit-adikpb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-audit
Source: https://github.com/adikpb/dotfiles/tree/main/.hermes/skills/software-development/codebase-audit
Command: npx skills add https://github.com/adikpb/dotfiles --skill codebase-audit-adikpb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Code reviews and audits often produce false positives, miss collection-breaking test failures, or trust stale documentation claims. This Skill provides a disciplined, read-only audit workflow that establishes a runnable test baseline first, verifies every finding against the actual source, and loops independent reviewers until a round comes back clean. ## Core Features & Use Cases - Python Test Baseline: Confirms the suite actually collects and passes (ruff + pytest) before any smell scanning, catching silently dropped test modules. - Structural Recon: Read-only diagnosis of code smells with prioritized HIGH/MED/LOW reports citing file:line and minimal restructures. - Documentation & Residual-API Audits: Verifies wiki/contract docs against vendored source with dual citations, and sweeps for leftover old-version API surface after migrations. - Audit Loop: Dispatches parallel independent read-only subagents in rounds, applying findings and re-verifying until a full round is clean. - Use Case: After a v2-to-v1 API migration, run the residual-version audit to confirm zero old routes remain in code, tests, and scripts, then loop fresh reviewers to catch regressions your own fixes introduced. ## Quick Start Ask the agent to audit this Python codebase read-only: establish the pytest baseline, scan for structural smells, and report prioritized findings with file:line evidence.

Frequently Asked Questions about codebase-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit a Python codebase for structural smells?▼

Start by establishing a runnable baseline with ruff check and the full pytest suite, then inventory and read every target file. Scan for smell categories, verify apparent bugs with the AST parser rather than eyeballing, and report findings grouped HIGH/MED/LOW with file:line and a minimal restructure.

How to verify documentation against source code automatically?▼

Extract every load-bearing claim from the docs (signatures, constants, config keys, semantic claims), then batch-verify each against the source clone with grep. Every finding needs dual citations: code path:line plus the doc line. Watch especially for inverted if/elif branches described in prose.

Why does pytest show tests passed but miss a broken module?▼

A collection error in any test_*.py aborts just that module while pytest still reports the rest as passed, so a green count can hide a silently dropped module. Always grep the full output for 'ERROR collecting' and confirm specific modules actually execute before trusting the number.

When should I use an audit loop with subagents instead of a single review?▼

Use the loop after a refactor or migration when you want independent verification. Dispatch parallel read-only agents with vague briefs and re-sliced file scopes each round, apply worthwhile findings, re-run the suite, and stop only when a full round returns nothing actionable.

What are the limitations of read-only code recon?▼

Read-only recon diagnoses and ranks issues but never fixes them; implementation belongs to a separate cleanup step. It can also produce false positives if findings are not verified against the parser and the test suite, since tests often prove a flagged bug is intended behavior.