codebase-inspection

Analyze codebases with pygount to quantify lines of code and language composition.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inspect and analyze codebases using pygount for LOC counting, language breakdown, and code-vs-comment ratios. Use when asked to check lines of code, repo size, language composition, or codebase stats.

Core Features & Use Cases

  • Analyze language breakdown with file counts, code lines, and comment lines
  • Count total lines of code and identify code-vs-comment ratios across a repository
  • Provide quick repository sizing and language-mosaic insights for audits or migrations

Quick Start

Run pygount on your repository to generate a language and codebase metrics report

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 using pygount?

You can count lines of code in a repository by running pygount to analyze source files, which calculates total lines and presents structured metrics for codebase sizing. It parses repository contents while excluding non-source directories to provide accurate LOC metrics.

What is the best way to analyze codebase language composition for an audit?

The best way to analyze codebase language composition for an audit is to use pygount metrics, which provide a language breakdown with file counts, code lines, and comment lines. This generates a ready-to-consume report showing the language mosaic across your repository.

Can I calculate code-vs-comment ratios across a codebase of varying sizes?

Yes, you can calculate code-vs-comment ratios across repositories of varying sizes using pygount. It identifies code lines and comment lines per language, delivering structured metrics that help developers assess documentation density during refactors or migrations.

How do I exclude non-source directories when analyzing repository metrics?

To exclude non-source directories when analyzing repository metrics, pygount automatically filters out non-source files during the parsing process. This ensures the generated metrics report only counts actual source code, providing a clean language breakdown and accurate LOC data.

Does pygount work without external dependencies for codebase analysis?

Yes, pygount works without external dependencies for codebase analysis. The skill requires no additional components to parse repository contents, quantify lines of code, and present structured metrics in a ready-to-consume format for language assessments and audits.