📄 SKILL.md

← Vault

name: codebase-inspection

description: Inspect and analyze codebases using pygount for LOC counting, language breakdown, and code-vs-comment ratios. Use when asked to check lines of code, repo size, language composition, or codebase stats.

version: 1.0.0

author: Hermes Agent

license: MIT

metadata:

hermes:

tags: [LOC, Code Analysis, pygount, Codebase, Metrics, Repository]

related_skills: [github-repo-management]

prerequisites:

commands: [pygount]


Codebase Inspection with pygount

Analyze repositories for lines of code, language breakdown, file counts, and code-vs-comment ratios using pygount.

When to Use

Pitfalls

1. Always exclude .git, node_modules, venv — without --folders-to-skip, pygount will crawl everything and may take minutes or hang on large dependency trees.

2. Markdown shows 0 code lines — pygount classifies all Markdown content as comments, not code. This is expected behavior.

3. JSON files show low code counts — pygount may count JSON lines conservatively. For accurate JSON line counts, use wc -l directly.

4. Large monorepos — for very large repos, consider using --suffix to target specific languages rather than scanning everything.