modularize-large-files
Installation
SKILL.md
Modularize Large Files
Line count is a symptom, not the disease. A 2k-line file is a prompt to look for seams, not a mandate to chop it into ten 200-line files that all import each other. Split along cohesion boundaries so each new module has one reason to change; if the pieces still need each other's internals, you have moved the mess, not fixed it.
Find the offenders
Rank by size, then read before cutting:
# Largest tracked source files by line count (skip vendored/generated)
git ls-files '*.ts' '*.tsx' '*.js' '*.py' '*.go' '*.rs' \
| grep -Ev '(dist|build|vendor|node_modules|\.min\.)' \
| xargs wc -l | sort -rn | head -20