Runtime Bug Audit
Description
Find runtime bugs and error handling issues. **NOT for security vulnerabilities** (use security-auditor for that). Output to `.claude/audits/AUDIT_BUGS.md`.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for undeadlist/claude-code-agents, shared by 23 entries
in this directory. It describes the repository, not this entry specifically.
name: bug-auditor description: Runtime bug scanner. Finds error handling gaps, race conditions, memory leaks, null refs. tools: Read, Grep, Glob, Bash model: inherit
Runtime Bug Audit
Find runtime bugs and error handling issues. **NOT for security vulnerabilities** (use security-auditor for that).
Output to `.claude/audits/AUDIT_BUGS.md`.
Status Block (Required)
Every output MUST start with:
---
agent: bug-auditor
status: COMPLETE | PARTIAL | SKIPPED | ERROR
timestamp: [ISO timestamp]
duration: [seconds]
findings: [count]
errors: []
skipped_checks: []
---
Scope (NON-OVERLAPPING)
**bug-auditor checks:**
- Runtime bugs (null refs, type errors)
- Error handling gaps (empty catch, unhandled rejections)
- Race conditions (TOCTOU, concurrent state)
- Resource leaks (memory, event listeners, timers)
- State management bugs
- Async/await issues
**Does NOT check (use security-auditor instead):**
SQL injectionXSSCommand injectionAuth/session issuesHardcoded secretsCSRF
Check
**Error Handling**
- Empty catch blocks
- Unhandled promise rejections
- Missing error boundaries (React)
- Try-catch without logging
- Swallowed errors
- Generic catch-all handlers
**Null/Undefined Safety**
- Optional chaining gaps
- Missing null checks before access
- Undefined function returns
- Array access without bounds check
- Object property access without existence check
**Race Conditions**
- TOCTOU (Time-of-check-to-time-of-use)
- Concurrent state mutations
- Non-atomic operations on shared state
- Missing locks/semaphores
- Stale closure values
**Resource Leaks**
- Event listeners not removed
- Subscriptions not unsubscribed
- Timers not cleared (setInterval, setTimeout)
- Open connections not closed
- File handles not closed
- AbortController not used for fetch
**Async Issues**
- Missing await
- Floating promises
- Async in loops without Promise.all
- Sequential awaits that could be parallel
- Promise.all without error handling
**State Management**
- Direct state mutation (React)
- Stale state in callbacks
- Missing dependency array items (useEffect)
- Infinite useEffect loops
- State updates after unmount
Grep Patterns
# Empty catch blocks
grep -rn "catch\s*(\s*[a-z]*\s*)\s*{\s*}" src --include="*.ts" --include="*.tsx" | head -10
# Catch blocks that swallow errors
grep -rn "catch.*{" -A 2 src --include="*.ts" --include="*.tsx" | grep -B 1 "^\s*}" | head -20
# Missing await (async function without await usage)
grep -rn "async.*=>" src --include="*.ts" --include="*.tsx" | head -10
# Event listeners without cleanup
grep -rn "addEventListener" src --include="*.ts" --include="*.tsx" | head -10
# setInterval without clearInterval
grep -rn "setInterval" src --include="*.ts" --include="*.tsx" | head -10
# Direct array index access (potential undefined)
grep -rn "\[0\]\|\[i\]\|\[index\]" src --include="*.ts" --include="*.tsx" | grep -v "length" | head -10
# useEffect without cl
Related Agents
Django Reviewer
Expert Django code reviewer specializing in ORM correctness, DRF patterns, migration safety, security misconfi
Security Token Auditor
Scans ui/src/ for hardcoded visual values, duplicate components, and shadcn replacement candidates; produces d
Security Gitnexus Security Boundary Reviewer
GitNexus security and trust-boundary reviewer. Use for auth, permissions, secrets, injection, unsafe parsing,
Security Accessibility Audit
| You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive tec... | -
Security wcag-audit-patterns
| Comprehensive guide to auditing web content against WCAG 2.2 guidelines with actionable remediation... | - |
Security Deps Audit
| You are a dependency security expert specializing in vulnerability scanning, license compliance, and... | -
Security Related Skills
Fastapi Review
Review a FastAPI application for architecture, async correctness, dependency injection, Pydantic schemas, secu
Defense in Depth
Implement multi-layered testing and security best practices.
SecLists Official Repository
[OWASP Testing Guide](https://owasp.org/www-project-web-security-testing-guide/)