Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Inspect codebases w/ pygount: LOC, languages, ratios.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 2% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -27% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 24% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -14% | 0% |
Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using pygount.
bashpip install --break-system-packages pygount 2>/dev/null || pip install pygount
Get a full language breakdown with file counts, code lines, and comment lines:
bashcd /path/to/repo pygount --format=summary \ --folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,.eggs,*.egg-info" \ .
IMPORTANT: Always use --folders-to-skip to exclude dependency/build directories, otherwise pygount will crawl them and take a very long time or hang.
Adjust based on the project type:
bash# Python projects --folders-to-skip=".git,venv,.venv,__pycache__,.cache,dist,build,.tox,.eggs,.mypy_cache" # JavaScript/TypeScript projects --folders-to-skip=".git,node_modules,dist,build,.next,.cache,.turbo,coverage" # General catch-all --folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,vendor,third_party"
bash# Only count Python files pygount --suffix=py --format=summary . # Only count Python and YAML pygount --suffix=py,yaml,yml --format=summary .
bash# Default format shows per-file breakdown pygount --folders-to-skip=".git,node_modules,venv" . # Sort by code lines (pipe through sort) pygount --folders-to-skip=".git,node_modules,venv" . | sort -t$'\t' -k1 -nr | head -20
bash# Summary table (default recommendation) pygount --format=summary . # JSON output for programmatic use pygount --format=json . # Pipe-friendly: Language, file count, code, docs, empty, string pygount --format=summary . 2>/dev/null
The summary table columns:
Special pseudo-languages:
__empty__ — empty files__binary__ — binary files (images, compiled, etc.)__generated__ — auto-generated files (detected heuristically)__duplicate__ — files with identical content__unknown__ — unrecognized file types--folders-to-skip, pygount will crawl everything and may take minutes or hang on large dependency trees.wc -l directly.--suffix to target specific languages rather than scanning everything.Other measured skills in the registry, with their headline benchmark lift.