codebase-inspection
What it does
This skill has your AI measure a software project, such as its size and the mix of programming languages it uses. It is for developers and managers who want a quick overview of a codebase.
When to use it
- βWhen you ask how many lines of code a project has.
- βWhen you want a breakdown of the languages used in a repository.
- βWhen you want the ratio of code to comments in a project.
Skill link
https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/codebase-inspection/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHow many lines of code does this repo have, and which languages make up most of it?β
5 new skills a week. 1 minute to read.
How it works
The skill installs the pygount tool if it is missing and runs it on the project folder. It skips folders such as node_modules and build output, so the count is not inflated.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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
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:
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:
# 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
# Only count Python files
pygount --suffix=py --format=summary .
# Only count Python and YAML
pygount --suffix=py,yaml,yml --format=summary .
4. Detailed File-by-File Output
# Default format shows per-file breakdown
pygount --folders-to-skip=".git,node_modules,venv" .
# Sort by code lines (pipe through sort)
pygount --folders-to-skip=".git,node_modules,venv" . | sort -t$'\t' -k1 -nr | head -20
5. Output Formats
# Summary table (default recommendation)
pygount --format=summary .
# JSON output for programmatic use
pygount --format=json .
# Pipe-friendly: Language, file count, code, docs, empty, string
pygount --format=summary . 2>/dev/null
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
- Always exclude .git, node_modules, venv β without
--folders-to-skip, pygount will crawl everything and may take minutes or hang on large dependency trees. - Markdown shows 0 code lines β pygount classifies all Markdown content as comments, not code. This is expected behavior.
- JSON files show low code counts β pygount may count JSON lines conservatively. For accurate JSON line counts, use
wc -ldirectly. - Large monorepos β for very large repos, consider using
--suffixto target specific languages rather than scanning everything.
FAQ
Does it need special software?
It needs pygount, which the skill installs with pip if it is missing.
Why skip some folders?
The skill says to skip dependency and build folders, because scanning them can take a very long time.
Can it count only one language?
Yes. The skill has a section for filtering results to a specific language.
Details
Original description by the author
Inspect codebases w/ pygount: LOC, languages, ratios.
Popularity
- GitHub stars
- 260k
- Ranking position
- #619
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-merge-conflict-arbiter
260kSettles a git merge conflict between two agents' branches as a neutral third party, producing one merged result for the repo.
antigravity-cli
260kGuides you through installing, updating, and troubleshooting the Antigravity command line tool, including its plugins, sign-in, and sandbox.
blackbox
260kLets your agent hand a coding task to the Blackbox AI command line tool, which runs several AI models and picks the best result.
dynamic-workflow
260kTeaches your agent to run large batches of similar work as a saved script, so only verified results return to the main conversation.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.