agentsclimarketplace

Error audit

Skill arndvs/ctrlshft/skills/error-audit

Use when repeated Claude Code session errors need analysis; scans session transcripts for errors, clusters by root cause, and suggests remediations.From its SKILL.md

Install
npx -y skills add arndvs/ctrlshft --skill error-audit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 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

6.3 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it

Error Audit

If running interactively (human present), output "Read Error Audit skill." to acknowledge. If running with --dangerously-skip-permissions (AFK/unattended), skip acknowledgement and proceed directly.

Scan every Claude Code session transcript for errors, cluster by root cause, surface the top offenders with suggested remediations.


When to invoke

  • Periodically (every 5-10 sessions) as a health check
  • When the user notices "this keeps happening"
  • After a session with 3+ retry loops on the same error
  • When proposing a new hook or rule (to justify it with data)

Usage

# Default: all sessions, top 20 clusters, human output
python3 skills/error-audit/error-audit.py

# Last 30 days only
python3 skills/error-audit/error-audit.py --since 30

# Show fewer clusters
python3 skills/error-audit/error-audit.py --top 10

# Machine-readable (for piping into other tools)
python3 skills/error-audit/error-audit.py --json

# Override the projects dir (useful for testing)
python3 skills/error-audit/error-audit.py --projects-dir /path/to/projects

# Override or disable suppressions
python3 skills/error-audit/error-audit.py --suppressions-path /path/to/suppressions.md
python3 skills/error-audit/error-audit.py --no-suppressions
python3 skills/error-audit/error-audit.py --show-suppressed

Steps (when invoking via /error-audit)

  1. Run python3 <skill-path>/error-audit.py with any arguments the user provided.
  2. Display the output to the user exactly as printed (includes colour-coded counts and suggested remediation tiers).
  3. For the top 3 clusters, propose a concrete action:
    • Tier 1 (settings allowlist): show the exact ~/.claude/settings.json entry to add, but do NOT auto-apply — user must review Bash allowlist changes.
    • Tier 2 (hook or script fix): locate the hook/script and propose the edit.
    • Tier 3 (instruction/memory): draft the feedback or mechanism memory entry.
  4. Do NOT auto-apply any remediation. This skill surfaces and proposes; the user decides.

Error Classes

ClassSignalExample
tool_erroris_error:true on a tool result (excluding denials)Read/Write/Edit failures
validation_errorInputValidationError in tool resultWrong parameter types
permission_denial"The user doesn't want to proceed"Bash command rejected
hook_blockhook_failure attachment typegit-workflow-gate blocks
bash_failNon-zero exitCode on Bash attachmentCommand failures
retry_storm3+ overloaded_error records for the same tool on the same dayAPI overload
read_before_edit"File has not been read yet"Edit without prior Read

Remediation Tiers

TierFix typeExample
1Settings allowlistAdd Bash(cmd:*) to allow list (review first)
2Hook or script fixTune a hook to exclude a known-good pattern
3Instruction/memoryAdd behavioral memory covering the failure mode

Configuration

Env varPurposeDefault
CLAUDE_ERROR_AUDIT_SUPPRESSIONSSuppressions file path<skill-dir>/suppressions.md

Suppressions

The suppressions.md file (ships alongside error-audit.py) marks known "working-as-designed" cluster keys. Default human output hides them; --show-suppressed re-includes them; --json always includes them with a suppressed: true|false field.

Fallback Method (when Python is unavailable)

If python3 is not available, fall back to manual analysis:

Phase 1 — Gather error data

# Recent fix commits
git log --oneline --since="2 weeks ago" --grep="fix" --grep="revert" | head -30

# Find recent session files
find ~/.claude/projects/ -name "*.jsonl" -mtime -14 2>/dev/null | head -10

# HUD events
if [[ -f "$HOME/dotfiles/working/logs/events.jsonl" ]]; then
  grep -i "error\|fail\|block" "$HOME/dotfiles/working/logs/events.jsonl" | tail -30
fi

Phase 2 — Classify

Group errors into: Tooling, Convention, Environment, Architecture, External.

Phase 3 — Score

Frequency × Cost × Fixability. Minimum 3 occurrences before calling "systemic."

Phase 4 — Recommend actions

One specific action per pattern. For each high-priority pattern, recommend ONE specific action:

Action TypeWhen to useExample
New hookRepeated mechanical error that can be detected before it happens"Add a hook that checks Node version on SessionStart"
New ruleConvention violation that the model keeps forgetting"Add a rule that requires test file for every new module"
Architecture fixStructural issue causing cascading failures"Extract shared types to a package"
DocumentationMisunderstanding of how something works"Document the auth flow in README"
IgnoreExternal/transient issue not worth automating"GH API rate limits during peak hours"

Report Format

## Error Audit Report

**Period**: Last 2 weeks (N sessions analyzed)
**Patterns found**: M

### High Priority

| # | Pattern | Freq | Cost | Action |
|---|---------|------|------|--------|
| 1 | TypeScript path alias misconfigured | 4 sessions | ~10 min each | Rule: verify tsconfig paths on project start |
| 2 | Commit to main without PR | 3 sessions | 5 min each | Hook: ✅ already fixed (git-workflow-gate) |

### Medium Priority
...

### Resolved by existing mechanisms
- [pattern] → resolved by [hook/rule name]

### Recommendations
1. [Specific action with a one-liner justification]
2. ...

Integration

After producing recommendations:

  1. If a new hook is recommended: Use the hooks/PROPOSAL_TEMPLATE.md to draft it
  2. If a new rule is recommended: Create in rules/ following existing patterns
  3. If resolved: Update hooks/COVERAGE_MATRIX.md to reflect new coverage

Constraints

  • Only analyze data that actually exists — do NOT fabricate patterns from thin air
  • If session data is unavailable or incomplete, say so explicitly
  • Minimum 3 occurrences before calling something "systemic"
  • Prefer conservative recommendations — one well-placed hook over five speculative ones

What ships with it: 2 files

22.6 KB alongside SKILL.md, 1 of them executable

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.