Agent skill · nousresearch
codebase-inspection
Inspect codebases w/ pygount: LOC, languages, ratios.
What it needs
About 2k tokens when loaded.
What this skill does
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 1. Basic Summary (Most Common) Get a full language breakdown with file counts, code lines, and comment lines: 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: 3. Filter by Specific Language 4. Detailed File-by-File Output 5. Output Formats 6. Interpreting Results The summary table columns: Language — detected programming language Files — number of files of that language Code — lines of actual code (executable/declarative) Comment — lines that are comments or documentation % — percentage of total 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 Pitfalls 1. Always exclude .git, nodemodules, 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.
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills nousresearch/codebase-inspection--94e092