# Clean Code Quick Scan Commands

> Sub-skill of clean-code: Quick Scan Commands.

- Skill: `vamseeachanta/clean-code-quick-scan-commands` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/clean-code-quick-scan-commands`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/clean-code-quick-scan-commands/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/clean-code-quick-scan-commands

---


# Quick Scan Commands

## Quick Scan Commands


Run these before reviewing or merging code:

```bash
# Find files exceeding 400-line hard limit
find src/ -name "*.py" -exec wc -l {} + | awk '$1 > 400 {print $1, $2}' | sort -rn | head -20

# Find functions exceeding 50 lines (approximate — counts def blocks)
grep -n "^    def \|^def " src/**/*.py | awk -F: '{print $1, $2}' | head -30

# Oversized files by severity
echo "=== CRITICAL (>1000 lines) ===" && find src/ -name "*.py" -exec wc -l {} + | awk '$1>1000{print}' | sort -rn
echo "=== HIGH (400-1000 lines) ===" && find src/ -name "*.py" -exec wc -l {} + | awk '$1>400 && $1<=1000{print}' | sort -rn

# Dead code: files named *_unused.py or *_old.py
find src/ \( -name "*_unused.py" -o -name "*_old.py" -o -name "*_bak.py" \) | head -20

# Duplicate class names (possible God Object fragmentation)
grep -r "^class " src/ | sed 's/.*class //' | sed 's/[:(].*//' | sort | uniq -d
```

---

