audit-bugs
Skill5 starsChanged 6 months agoMITView on GitHub
Analyze historical bug patterns by mining Claude Code project logs for /investigate skill invocations since a specified date. Identifies recurring root causes, architectural gaps, and proactive detection strategies. Use when user says "audit bugs", "bug patterns", "analyze investigations", or "bug audit".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Trecek/useful-claude-skillsword for word, first seen Mar 26, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Trecek/useful-claude-skills★ 1100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- audit-archSkill
- audit-cohesionSkill
- audit-defense-standardsSkill
- audit-testsSkill
- chart-courseSkill
- check-bearingSkill
- design-guardsSkill
- elaborate-phaseSkill
- id-slopSkill
- make-arch-diagSkill
- make-reqSkill
- make-scenariosSkill
- promote-to-mainSkill
- render-recipeSkill
- review-promotionSkill
- update-architectureSkill
- update-reqsSkill
- update-specsSkill
- validate-auditSkill
- verify-diagSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Create files outside temp/audit-bugs/ directory
- Distinctive: line 34
Use subagents heavily for parallel log analysis
- Very specific: line 35
All output goes under temp/audit-bugs/ (create if needed)
- Distinctive: line 38
Do not change any code
- Very specific: line 55
Verify the directory exists and contains .jsonl files.
- Very specific: line 59
Use find with -newermt to filter .jsonl files modified since the target date
- Very specific: line 78
Look for tool calls writing to temp/investigate/investigation_*.md or temp/rectify/rectify_*.md for structured findings
- Distinctive: line 79
Search for keywords: "root cause", "Root Cause", "fix", "summary", "finding"
- Distinctive: line 80
Read the first ~500 lines for context, then search for conclusions
- Distinctive: line 84
After subagents return, group findings into recurring patterns:
- Very specific: line 96
Ensure temp/audit-bugs/ exists (mkdir -p).
≈ “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
Bug Pattern Audit Skill
Mine Claude Code conversation logs for /investigate skill invocations to identify recurring bug patterns, architectural gaps, and proactive detection strategies.
When to Use
- User says "audit bugs", "bug patterns", "analyze investigations", or "bug audit"
- User wants to find recurring themes across past bug investigations
- User wants proactive strategies to catch bugs before they manifest
Arguments
The user may provide a "since" date (e.g., 2/7, 2026-02-07, last week). If not specified, use AskUserQuestion to ask what the earliest lookback date should be before proceeding.
Critical Constraints
NEVER:
- Modify any source code files
- Create files outside
temp/audit-bugs/directory
ALWAYS:
- Use subagents heavily for parallel log analysis
- All output goes under
temp/audit-bugs/(create if needed) - Final report:
temp/audit-bugs/bug_pattern_audit_{YYYY-MM-DD_HHMMSS}.md - Subagents must NOT create their own files - they return findings in their response text only
- Do not change any code
Workflow
Step 1: Locate Project Logs
Claude Code stores conversation logs at ~/.claude/projects/ in a folder derived from the project's absolute path with / replaced by -.
Derive the log directory:
# Convert current working directory to Claude's folder naming scheme
PROJECT_PATH=$(pwd)
LOG_DIR="$HOME/.claude/projects/-${PROJECT_PATH//\//-}"
# Remove leading double dash if present
LOG_DIR="${LOG_DIR//--/-}"Verify the directory exists and contains .jsonl files.
Step 2: Filter by Date and Investigate Skill
- Use
findwith-newermtto filter.jsonlfiles modified since the target date - From those,
grep -l '"skill".*"investigate"'to find files where the investigate skill was invoked (tool invocation pattern) - Also
grep -l '/investigate'to catch user-typed invocations - Combine and deduplicate. Only use top-level files (not subagent logs under
*/subagents/)
Step 3: Dispatch Subagents for Parallel Analysis
Split the matching files into batches of ~5 and dispatch general-purpose subagents in parallel. Each subagent should extract from each log file:
- Error/Symptom: The error message or failure the user reported
- Root Cause: What the investigation identified as the root cause
- Component: Which module/system was affected
- Category: Bug classification (e.g., "type boundary", "state management", "validation gap")
- Fix: What solution was identified or applied
Subagent instructions for reading logs:
- JSONL format: each line is a JSON object
"type": "human"entries contain user messages (error reports)"type": "assistant"entries with text content contain investigation findings- Look for tool calls writing to
temp/investigate/investigation_*.mdortemp/rectify/rectify_*.mdfor structured findings - Search for keywords: "root cause", "Root Cause", "fix", "summary", "finding"
- Read the first ~500 lines for context, then search for conclusions
Step 4: Synthesize Patterns
After subagents return, group findings into recurring patterns:
- Identify bugs that share the same root architectural weakness
- Count frequency of each pattern across sessions
- For each pattern, identify:
- Which components it affects
- Why it keeps recurring
- What architectural gap enables it
- Concrete grep/search patterns that could detect latent instances today
Step 5: Write Report
Ensure temp/audit-bugs/ exists (mkdir -p).
Save to: temp/audit-bugs/bug_pattern_audit_{YYYY-MM-DD_HHMMSS}.md
Structure:
# Bug Pattern Audit: Investigations Since {date}
**Analysis Date:** {today}
**Sessions Analyzed:** {count}
## Executive Summary
{2-3 sentences: top patterns, frequency, recommended investments}
## Pattern N: {Name}
**Frequency:** X of Y sessions (Z%)
### Manifestations
| Session | Date | Bug | Component |
{table of affected sessions}
### Root Architectural Gap
{Why this pattern keeps occurring}
### Proactive Detection Strategy
{Concrete scans, tests, or grep patterns to find latent instances}
---
## All Sessions Quick Reference
| # | Session ID | Date | Error Summary | Pattern(s) |
{table of all sessions}
## Recommended Proactive Scans
{Runnable grep/rg commands to find latent bugs today}Step 6: Terminal Summary
Output a concise summary: pattern count, top 3 patterns by frequency, and report location.
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.

