.claude/skills/pragmatic-audit/SKILL.md
Scan codebase for Pragmatic Programmer anti-patterns. Reports findings. Triggers on "pragmatic audit" or "/pragmatic-audit".
npx skillsauth add AbeJitsu/Shopify-Playground pragmatic-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Scan the codebase for bad programming practices and report findings.
| Category | What to Look For | |----------|------------------| | DRY | Repeated code patterns, duplicate styles | | SOLID | God objects (500+ lines), single-use abstractions | | KISS | Nested ternaries, deep nesting, complex regex | | Hardcoded | Magic numbers, inline colors, hardcoded URLs | | Broken Windows | TODO/FIXME comments, console.log in production | | Coupling | Deep imports (../../../), circular deps |
# DRY violations
grep -r "bg-white dark:bg-gray-800 rounded" app/ --include="*.tsx"
# God objects
find app -name "*.tsx" -o -name "*.ts" | xargs wc -l | awk '$1 > 500'
# Nested ternaries
grep -rE "\?.*\?.*:" app/ --include="*.tsx"
# Console.log in production
grep -r "console.log(" app/ --include="*.ts" --include="*.tsx" | grep -v ".test." | grep -v ".spec."
# Deep imports
grep -rE "from\s+['\"]\.\.\/\.\.\/\.\.\/" app/ --include="*.ts"
Report findings like this:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PRAGMATIC AUDIT COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Files scanned: 142
Issues found: 23
By Category:
DRY violations: 8
God objects: 3
Console.log: 6
Deep imports: 4
Other: 2
Top Priority:
1. checkout/page.tsx (892 lines) - refactor needed
2. AdminSidebar.tsx - repeated card patterns
3. api/stripe/webhook/route.ts - 6 console.log statements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Skip these in scans:
development
Set up and orchestrate parallel Claude Code agents using git worktrees. Use this skill when the user wants to parallelize a feature across multiple agents, spawn worktrees, or merge agent work back together.
development
AI thinking partner for strategy and planning. Reads the current work state, analyzes progress, and helps you plan the next phase while the worker instance builds. Triggered by "think ahead".
development
Spawn 5 parallel agents applying quality principles across planning, building, and validating code. Use when designing features, making decisions, or checking work. Triggers on "launch a swarm" or when ensuring solid, maintainable, secure software.
development
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.