codebase-inspection
Inspect codebases w/ pygount: LOC, languages, ratios.
High Quality
Join 0+ developers using this skill
skill
GitHub
beginner
Inspect codebases w/ pygount: LOC, languages, ratios.
Real data. Real impact.
Emerging
Developers
Per week
Excellent
Skills give you superpowers. Install in 30 seconds.
Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using
pygount.
pip install --break-system-packages pygount 2>/dev/null || pip install pygount
Get a full language breakdown with file counts, code lines, and comment lines:
cd /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:
# 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"
# Only count Python files pygount --suffix=py --format=summary . # Only count Python and YAML pygount --suffix=py,yaml,yml --format=summary .
# 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
# 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.MIT
mkdir -p ~/.hermes/skills/github/codebase-inspection && curl -o ~/.hermes/skills/github/codebase-inspection/SKILL.md https://raw.githubusercontent.com/NousResearch/hermes-agent/main/skills/github/codebase-inspection/SKILL.md1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.