codebase-inspection

Inspect repositories with pygount to report LOC, language breakdown, and code-to-comment ratios.

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill codebase-inspection-chensihakniroth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-inspection
Source: https://github.com/Chensihakniroth/ANAKOT-AGENT/tree/main/skills/github/codebase-inspection
Command: npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill codebase-inspection-chensihakniroth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pygount.

What problem does it solve? Answering questions about repository size, language composition, and code-to-comment ratios normally requires manual counting or ad-hoc scripts. This Skill provides ready-to-use pygount commands that produce accurate lines-of-code metrics for any codebase. ## Core Features & Use Cases - Language Breakdown: Generate a summary table of files, code lines, and comment lines per programming language. - Targeted Counting: Filter analysis by file suffix (e.g., only Python or YAML) or produce detailed per-file reports sorted by code size. - Safe Scanning: Built-in folder exclusion patterns prevent pygount from crawling .git, node_modules, or virtualenv directories. - Use Case: A user asks "how big is this repo and what languages does it use?" Run the summary command with proper exclusions and report the language percentages, total LOC, and comment ratios. ## Quick Start Use the codebase-inspection skill to count the lines of code and show the language breakdown of this repository.

Frequently Asked Questions about codebase-inspection

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

FAQPage Schema
How do I count lines of code in a repository?▼

Run pygount with the summary format from the repository root to get a per-language table of file counts, code lines, and comment lines. Always pass --folders-to-skip to exclude .git, node_modules, and virtualenv directories.

How to count LOC for only one programming language?▼

Use the --suffix flag with pygount to restrict analysis to specific file extensions, such as --suffix=py for Python only or --suffix=py,yaml,yml for multiple types. This also speeds up scans on large repositories.

Why does pygount hang or take a long time on my repo?▼

Pygount crawls every directory by default, including .git, node_modules, and virtualenvs, which can contain millions of files. Fix this by passing --folders-to-skip with an exclusion list matching your project type.

Why does pygount show zero code lines for Markdown files?▼

Pygount classifies all Markdown content as comments rather than code, so Markdown files always report zero code lines. This is expected behavior, not a bug in the counting.

Can pygount output results as JSON for scripts?▼

Yes, pygount supports --format=json for programmatic consumption alongside the default summary table and per-file detailed output. JSON output is useful when piping metrics into other tools or reports.