codebase-inspection

Calculate repository lines of code and language distribution with pygount.

87|20|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/openaeon/OpenAEON --skill codebase-inspection-openaeon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-inspection
Source: https://github.com/openaeon/OpenAEON/tree/main/skills/codebase-inspection
Command: npx skills add https://github.com/openaeon/OpenAEON --skill codebase-inspection-openaeon

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pygount.

What problem does it solve?

Codebase Inspection with pygount turns an ambiguous question like “how big is this repo?” into clear, actionable metrics about lines of code, language composition, and code-vs-comment ratios.

Core Features & Use Cases

  • LOC and composition reporting: produce file counts and language breakdowns for a repository.
  • Code vs comment visibility: quantify how much of the repo is executable/declarative code versus comments/docs.
  • Practical exclusions for accuracy: skip dependency, build, cache, and VCS folders to avoid hangs and misleading results.
  • Use cases: estimating maintenance effort, benchmarking architectural choices, or preparing a refactor plan for a large repo.

Quick Start

Run this on the target repository by excluding dependency and build directories: pygount --format=summary --folders-to-skip=".git,node_modules,venv,.venv,pycache,.cache,dist,build,.next,.tox,.eggs,*.egg-info" .

Frequently Asked Questions about codebase-inspection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate lines of code and language breakdown for a repository?

To calculate lines of code and language breakdown for a repository, use pygount to analyze file counts, language distribution, and code-to-comment ratios. This provides clear metrics for estimating maintenance effort and reporting codebase composition.

What is the code-to-comment ratio and why does it matter for software analytics?

The code-to-comment ratio quantifies how much of a repository is executable code versus comments and documentation. Measuring this ratio helps audit documentation density and assess codebase maintainability before planning a refactor.

How do I exclude dependency and build folders when scanning a monorepo?

Exclude dependency and build folders when scanning a monorepo by passing directory names like .git, node_modules, venv, and dist to the folders-to-skip parameter. This prevents pygount from hanging and avoids misleading repository metrics.

Does pygount support JSON output for repository metrics?

Yes, pygount supports JSON output for repository metrics alongside summary formats. You can generate lines of code and language distribution reports in JSON to integrate codebase sizing data into automated software analytics pipelines.

Can I filter the language breakdown by specific file suffixes?

Yes, you can filter the language breakdown by specific file suffixes using optional language filtering. This allows you to target specific programming languages and exclude others when analyzing codebase composition with pygount.

What are the limitations of using pygount for codebase sizing on large repositories?

A key limitation of using pygount for codebase sizing is that scanning large repositories without excluding VCS, cache, and build directories can cause hangs. Proper folder exclusions are required to ensure accurate repository metrics.