codebase-inspection
Inspect codebases: LOC, languages, ratios via pygount.
npx skills add HezaoHezao/poirot --skill codebase-inspection --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Codebase Inspection 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 pygount ``` ## 1. Basic Summary (Most Common) ```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. ## 2. Common Folder Exclusions ```bash # Python project --folders-to-skip=".git,__pycache__,venv,.venv,.tox,.eggs,*.egg-info,.pytest_cache,.mypy_cache,.ruff_cache" # Node.js project --folders-to-skip=".git,node_modules,dist,build,.next,.cache,coverage" # General (safe default) --folders-to-skip=".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.tox,.eggs,*.egg-info,.pytest_cache,.mypy_cache" ``` ## 3. Detailed Per-File Out
- When to Use
- Prerequisites
- 1. Basic Summary (Most Common)
- 2. Common Folder Exclusions
- 3. Detailed Per-File Output
- 4. Language Breakdown Only
- 5. JSON Output (for further processing)
- 6. Quick LOC Count (without pygount)
- 7. File Count by Type
- Pitfalls
pip install pygount cd /path/to/repo pygount --format=summary \ Python project Node.js project General (safe default) pygount --format=summary /path/to/repo 2>/dev/null | grep -E "^\s+\w" | sort -t$'\t' -k2 -rn pygount --format=json \ python3 -c " import json
What does the codebase-inspection skill do?
Inspect codebases: LOC, languages, ratios via pygount.
How do I install it?
Run `npx skills add HezaoHezao/poirot --skill codebase-inspection --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From HezaoHezao/poirot, a repository with 139 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
