Codebase Inspection with pygount Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using . 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 1. Basic Summary (Most Common) Get a full language breakdown with file counts, code lines, and comment lines: IMPORTANT: Always use to exclude dependency/build directories, otherwise pygount will crawl them and take a ve…

\\t' -k1 -nr | head -20\n```\n\n## 5. Output Formats\n\n```bash\n# Summary table (default recommendation)\npygount --format=summary .\n\n# JSON output for programmatic use\npygount --format=json .\n\n# Pipe-friendly: Language, file count, code, docs, empty, string\npygount --format=summary . 2>/dev/null\n```\n\n## 6. Interpreting Results\n\nThe summary table columns:\n- **Language** — detected programming language\n- **Files** — number of files of that language\n- **Code** — lines of actual code (executable/declarative)\n- **Comment** — lines that are comments or documentation\n- **%** — percentage of total\n\nSpecial pseudo-languages:\n- `__empty__` — empty files\n- `__binary__` — binary files (images, compiled, etc.)\n- `__generated__` — auto-generated files (detected heuristically)\n- `__duplicate__` — files with identical content\n- `__unknown__` — unrecognized file types\n\n## Pitfalls\n\n1. **Always exclude .git, node_modules, venv** — without `--folders-to-skip`, pygount will crawl everything and may take minutes or hang on large dependency trees.\n2. **Markdown shows 0 code lines** — pygount classifies all Markdown content as comments, not code. This is expected behavior.\n3. **JSON files show low code counts** — pygount may count JSON lines conservatively. For accurate JSON line counts, use `wc -l` directly.\n4. **Large monorepos** — for very large repos, consider using `--suffix` to target specific languages rather than scanning everything.\n---","attachment_filenames":[],"attachments":[],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Codebase Inspection with pygount","type":"text"}]},{"type":"paragraph","content":[{"text":"Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using ","type":"text"},{"text":"pygount","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When to Use","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"User asks for LOC (lines of code) count","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"User wants a language breakdown of a repo","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"User asks about codebase size or composition","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"User wants code-vs-comment ratios","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"General \"how big is this repo\" questions","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Prerequisites","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"pip install --break-system-packages pygount 2>/dev/null || pip install pygount","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"1. Basic Summary (Most Common)","type":"text"}]},{"type":"paragraph","content":[{"text":"Get a full language breakdown with file counts, code lines, and comment lines:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"cd /path/to/repo\npygount --format=summary \\\n --folders-to-skip=\".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,.eggs,*.egg-info\" \\\n .","type":"text"}]},{"type":"paragraph","content":[{"text":"IMPORTANT:","type":"text","marks":[{"type":"strong"}]},{"text":" Always use ","type":"text"},{"text":"--folders-to-skip","type":"text","marks":[{"type":"code_inline"}]},{"text":" to exclude dependency/build directories, otherwise pygount will crawl them and take a very long time or hang.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"2. Common Folder Exclusions","type":"text"}]},{"type":"paragraph","content":[{"text":"Adjust based on the project type:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Python projects\n--folders-to-skip=\".git,venv,.venv,__pycache__,.cache,dist,build,.tox,.eggs,.mypy_cache\"\n\n# JavaScript/TypeScript projects\n--folders-to-skip=\".git,node_modules,dist,build,.next,.cache,.turbo,coverage\"\n\n# General catch-all\n--folders-to-skip=\".git,node_modules,venv,.venv,__pycache__,.cache,dist,build,.next,.tox,vendor,third_party\"","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"3. Filter by Specific Language","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Only count Python files\npygount --suffix=py --format=summary .\n\n# Only count Python and YAML\npygount --suffix=py,yaml,yml --format=summary .","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"4. Detailed File-by-File Output","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Default format shows per-file breakdown\npygount --folders-to-skip=\".git,node_modules,venv\" .\n\n# Sort by code lines (pipe through sort)\npygount --folders-to-skip=\".git,node_modules,venv\" . | sort -t

Codebase Inspection with pygount Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using . 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 1. Basic Summary (Most Common) Get a full language breakdown with file counts, code lines, and comment lines: IMPORTANT: Always use to exclude dependency/build directories, otherwise pygount will crawl them and take a ve…

\\t' -k1 -nr | head -20","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"5. Output Formats","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Summary table (default recommendation)\npygount --format=summary .\n\n# JSON output for programmatic use\npygount --format=json .\n\n# Pipe-friendly: Language, file count, code, docs, empty, string\npygount --format=summary . 2>/dev/null","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"6. Interpreting Results","type":"text"}]},{"type":"paragraph","content":[{"text":"The summary table columns:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Language","type":"text","marks":[{"type":"strong"}]},{"text":" — detected programming language","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Files","type":"text","marks":[{"type":"strong"}]},{"text":" — number of files of that language","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Code","type":"text","marks":[{"type":"strong"}]},{"text":" — lines of actual code (executable/declarative)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Comment","type":"text","marks":[{"type":"strong"}]},{"text":" — lines that are comments or documentation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"%","type":"text","marks":[{"type":"strong"}]},{"text":" — percentage of total","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Special pseudo-languages:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"__empty__","type":"text","marks":[{"type":"code_inline"}]},{"text":" — empty files","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"__binary__","type":"text","marks":[{"type":"code_inline"}]},{"text":" — binary files (images, compiled, etc.)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"__generated__","type":"text","marks":[{"type":"code_inline"}]},{"text":" — auto-generated files (detected heuristically)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"__duplicate__","type":"text","marks":[{"type":"code_inline"}]},{"text":" — files with identical content","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"__unknown__","type":"text","marks":[{"type":"code_inline"}]},{"text":" — unrecognized file types","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Pitfalls","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Always exclude .git, node_modules, venv","type":"text","marks":[{"type":"strong"}]},{"text":" — without ","type":"text"},{"text":"--folders-to-skip","type":"text","marks":[{"type":"code_inline"}]},{"text":", pygount will crawl everything and may take minutes or hang on large dependency trees.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Markdown shows 0 code lines","type":"text","marks":[{"type":"strong"}]},{"text":" — pygount classifies all Markdown content as comments, not code. This is expected behavior.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"JSON files show low code counts","type":"text","marks":[{"type":"strong"}]},{"text":" — pygount may count JSON lines conservatively. For accurate JSON line counts, use ","type":"text"},{"text":"wc -l","type":"text","marks":[{"type":"code_inline"}]},{"text":" directly.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Large monorepos","type":"text","marks":[{"type":"strong"}]},{"text":" — for very large repos, consider using ","type":"text"},{"text":"--suffix","type":"text","marks":[{"type":"code_inline"}]},{"text":" to target specific languages rather than scanning everything.","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"codebase-inspection","author":"@skillopedia","source":{"stars":175796,"repo_name":"hermes-agent","origin_url":"https://github.com/nousresearch/hermes-agent/blob/HEAD/skills/github/codebase-inspection/SKILL.md","repo_owner":"nousresearch","body_sha256":"8bcf3173ff10cb7a2177f0cc5fb305878f5513bb11b6724573e7a049884ec833","cluster_key":"3eb1aa1ffe3f944f65a9a57f070a9595a016da215449354fa0b9e3ad630ee287","clean_bundle":{"format":"clean-skill-bundle-v1","source":"nousresearch/hermes-agent/skills/github/codebase-inspection/SKILL.md","bundle_sha256":"0de68a2c8fcf6dcacfa0ad46b7f161976996c1361a3f692dc19a151cab57c0c7","attachment_count":0,"text_attachments":0,"binary_attachments":0},"cluster_size":3,"skill_md_path":"skills/github/codebase-inspection/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"integrations-apis","category_label":"Integrations"},"exact_dupes_collapsed_into_this":2},"license":"MIT","version":"v1","category":"integrations-apis","metadata":{"hermes":{"tags":["LOC","Code Analysis","pygount","Codebase","Metrics","Repository"],"related_skills":["github-repo-management"]}},"platforms":["linux","macos","windows"],"import_tag":"clean-skills-v1","description":"Inspect codebases w/ pygount: LOC, languages, ratios.","prerequisites":{"commands":["pygount"]}}},"renderedAt":1782979365578}

Codebase Inspection with pygount Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using . 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 1. Basic Summary (Most Common) Get a full language breakdown with file counts, code lines, and comment lines: IMPORTANT: Always use to exclude dependency/build directories, otherwise pygount will crawl them and take a ve…