bulk-audit
Skill39 starsChanged 18 days agoApache-2.0View on GitHub
Systematic codebase audit and batch remediation — scan for anti-patterns, file issues, fix in validated batches
In this repository14 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adoptSkill
- bugfixSkill
- canonical-auditSkill
- claims-auditSkill
- commitSkill
- dead-code-reviewSkill
- deploySkill
- implementSkill
- issueSkill
- parallelSkill
- researchSkill
- research-to-issuesSkill
- secreviewSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use for: hardcoded credentials/IPs, missing error handling, security anti-patterns, TODO/FIXME sweeps, or any fix that touches 10+ files.
- Distinctive: line 51
Run pre-commit on them:
- Distinctive: line 59
Only proceed to Phase 3 if all checks pass
- Distinctive: line 82
If pre-commit fails on any file in the batch:
- Distinctive: line 85
Do NOT move to next batch until current batch is clean
- Distinctive: line 105
File per-file issues: if a specific file needs structural changes beyond a simple search-replace
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bulk Audit & Batch Remediation
Use for: hardcoded credentials/IPs, missing error handling, security anti-patterns, TODO/FIXME sweeps, or any fix that touches 10+ files.
Phase 1: Discover
- Define the pattern to find:
grep -rn "<pattern>" --include="*.py" --include="*.ts" --include="*.vue" . | head -50 - Count scope:
grep -rl "<pattern>" --include="*.py" . | wc -l - Classify findings by severity (critical / high / medium / low):
- Critical: security vulnerabilities, data corruption risk
- High: hardcoded credentials, IPs, broken error handling
- Medium: performance issues, code smells
- Low: style, minor tech debt
- Create a GitHub issue per category (not one per file) — then attach each to the audit umbrella as a native sub-issue,
not just a checklist row (
issueskill, Step 4):gh issue create --title "Fix: <description>" \ --body "$(cat <<'EOF' ## Problem <pattern found, severity, impact> ## Scope <N files affected — list first 10> ## Fix Approach <how to fix> EOF )" --label "bug,backend,priority: high"
Phase 2: Validate Fix on Sample
NEVER apply bulk fixes without validating on 2-3 files first.
- Pick 2-3 representative files from the findings
- Apply the fix manually to those files
- Run pre-commit on them:
pre-commit run --files <file1> <file2> <file3> - Run affected tests:
python -m pytest tests/ -k "<relevant_keyword>" -x - Only proceed to Phase 3 if all checks pass
Phase 3: Batch Fix (10-20 files per batch)
Never apply across all files at once — work in batches of 10-20.
For each batch:
# Get next batch of files
FILES=$(grep -rl "<pattern>" --include="*.py" . | head -20)
# Apply fix to each file (Edit tool, not sed/awk)
# ... apply fixes ...
# Validate batch
pre-commit run --files $FILES
# If clean, commit this batch
git add $FILES
git commit -m "fix(scope): <description> (#{issue_number}) batch N/M"
git show --stat HEADIf pre-commit fails on any file in the batch:
- Fix that file
- Re-run pre-commit on the fixed file
- Do NOT move to next batch until current batch is clean
Phase 4: Verify & Close
# Confirm pattern is gone
grep -rn "<pattern>" --include="*.py" . | wc -l # Should be 0
# Run full test suite
python -m pytest tests/ -x --tb=short
# Close the issue
gh issue close {issue_number} --comment "Fixed across N files in M batches. Tests passing."Guardrails
- Stop if a batch produces unexpected test failures — diagnose before continuing
- Stop if pre-commit fails 3 times on same file — manual inspection needed
- Never use
--no-verify— fix the underlying issue - File per-file issues if a specific file needs structural changes beyond a simple search-replace
- Log each batch as a GitHub issue comment so progress is tracked if session ends early:
gh issue comment {issue_number} --body "Batch N/M complete: fixed files X, Y, Z. Remaining: N files."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

