← ClaudeAtlas

codebase-inspectionlisted

Inspect codebases w/ pygount: LOC, languages, ratios.
LiHongwei-cn/lihongwei-cn · ★ 9 · AI & Automation · score 82
Install: claude install-skill LiHongwei-cn/lihongwei-cn
# Codebase Inspection with pygount Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using `pygount`. ## When to Use - User asks for LOC (lines of code) count - User wants a language breakdown of a repo - User asks about codebase size or composition - User wants code-vs-comment ratios - General "how big is this repo" questions ## Prerequisites ```bash pip install --break-system-packages pygount 2>/dev/null || pip install pygount ``` ## 1. Basic Summary (Most Common) Get a full language breakdown with file counts, code lines, and comment lines: ```bash 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. ## 2. Common Folder Exclusions 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" ``` ## 3. Filter by Specific Language ```bash # Only count Python files pygount --suffix=py --format=summary . # Only count Python and Y