Code Quality Audit
Description
Find code quality issues. **NOT for security (use security-auditor) or runtime bugs (use bug-auditor).** Output to `.claude/audits/AUDIT_CODE.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: code-auditor description: Code quality auditor. Reviews patterns, maintainability, complexity, consistency. tools: Read, Grep, Glob, Bash model: inherit
Code Quality Audit
Find code quality issues. **NOT for security (use security-auditor) or runtime bugs (use bug-auditor).**
Output to `.claude/audits/AUDIT_CODE.md`.
Status Block (Required)
Every output MUST start with:
---
agent: code-auditor
status: COMPLETE | PARTIAL | SKIPPED | ERROR
timestamp: [ISO timestamp]
duration: [seconds]
findings: [count]
files_scanned: [count]
any_count: [count]
console_log_count: [count]
errors: []
skipped_checks: []
---
Scope (NON-OVERLAPPING)
**code-auditor checks:**
- Type safety (any usage, unsafe assertions)
- Code complexity (function length, nesting depth)
- Maintainability (file size, code duplication)
- Consistency (naming, patterns, API shapes)
- Dead code and unused imports
- Console.log/debug statements
- TODO/FIXME accumulation
- DRY violations
**Does NOT check (use other agents):**
SQL injection, XSS, secrets→ security-auditorEmpty catch blocks, resource leaks→ bug-auditorPerformance, bundle size→ perf-auditor
Check
**Type Safety**
anyusage (should be near zero)- Unsafe type assertions (
as unknown as X) - Missing return types on public functions
- Implicit any from untyped imports
- Non-null assertions (
!) overuse
**Complexity**
- Functions over 50 lines
- Nesting over 3 levels deep
- Cyclomatic complexity > 10
- Too many parameters (>4)
- Complex conditionals
**Maintainability**
- God files (>500 lines)
- Duplicate logic across files
- Magic numbers/strings
- Unused exports/imports
- Dead code paths
**Consistency**
- Inconsistent naming conventions
- Mixed async patterns (callbacks vs promises)
- API response shape inconsistency
- Inconsistent error shapes
- Mixed import styles
**Code Hygiene**
- Console.log in production code
- TODO/FIXME accumulation (>20)
- Commented-out code
- Unused variables
- Debug code left in
Grep Patterns
# Type safety
grep -rn ": any\|: any\[\]" src --include="*.ts" --include="*.tsx" | wc -l
grep -rn "as unknown as\|as any" src --include="*.ts" --include="*.tsx" | head -10
grep -rn "!\." src --include="*.ts" --include="*.tsx" | head -10
# Complexity - long files
find src -name "*.ts" -o -name "*.tsx" | xargs wc -l 2>/dev/null | sort -n | tail -10
# Code hygiene
grep -rn "console.log\|console.debug\|console.info" src --include="*.ts" --include="*.tsx" | wc -l
grep -rn "TODO\|FIXME\|HACK\|XXX" src --include="*.ts" --include="*.tsx" | wc -l
grep -rn "// .*import\|// .*const\|// .*function" src --include="*.ts" --include="*.tsx" | head -10
# Consistency
grep -rn "async.*callback\|\.then.*async" src --include="*.ts" | head -5
# Duplicate patterns
grep -rn "email.*@.*\." src --include="*.ts" | head -10
grep -rn "\.test\s*(" src --include="*.ts" | head -10
# Magic numbers
grep -rn "[^0-9a-zA-Z_][0-9]\{3,\}[^0-9a-zA-Z_]" src --inc
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/)