codebase-inspection

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

1|Updated Jun 17, 2026
One-click install
npx skills add https://github.com/specdog/collar --skill codebase-inspection-specdog
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-inspection
Source: https://github.com/specdog/collar/tree/main/skills/github/codebase-inspection
Command: npx skills add https://github.com/specdog/collar --skill codebase-inspection-specdog

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pygount.

What problem does it solve? Answering questions about repository size, language composition, and code-to-comment ratios requires running line-counting tools correctly, and naive scans that crawl .git, node_modules, or venv directories can hang or produce misleading numbers. ## Core Features & Use Cases - Language Breakdown: Produces a summary table of files, code lines, and comment lines per programming language using pygount. - Targeted Counting: Filters analysis by file suffix (e.g., only Python or YAML) and supports JSON output for programmatic use. - Safe Scanning Defaults: Provides curated --folders-to-skip exclusion lists for Python, JavaScript/TypeScript, and general projects to avoid crawling dependency directories. - Use Case: When asked "how big is this repo?", run pygount with the recommended exclusions to get an accurate per-language LOC summary in seconds. ## Quick Start Ask the agent to count the lines of code and show the language breakdown for the repository at a given path.

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 --format=summary in the repository root to get a per-language table of files, code lines, and comment lines. Always pass --folders-to-skip to exclude .git, node_modules, and venv directories.

How to count LOC for only one programming language?▼

Use the --suffix flag to filter by file extension, for example pygount --suffix=py --format=summary . counts only Python files. Multiple suffixes can be comma-separated, such as py,yaml,yml.

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. Add --folders-to-skip with the appropriate exclusion list for your project type to fix this.

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

pygount classifies all Markdown content as comments rather than code, so Markdown files always show zero code lines. This is expected behavior, not a bug.

Can pygount output results as JSON for scripts?▼

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