codebase-inspection

Compute line counts, language distribution, and code-vs-comment ratios with pygount.

11|Updated May 17, 2026
One-click install
npx skills add https://github.com/StarryCod/cogitum --skill codebase-inspection-starrycod
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-inspection
Source: https://github.com/StarryCod/cogitum/tree/main/cogitum/data/skills/github/codebase-inspection
Command: npx skills add https://github.com/StarryCod/cogitum --skill codebase-inspection-starrycod

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Quickly quantify a codebase's size, language mix, and code-density using pygount, enabling informed decisions for refactoring, onboarding, and quality initiatives.

Core Features & Use Cases

  • Language breakdown: per-language file counts, code lines, and comment lines.
  • Size and composition: total files, total code lines, and comment density across a repository or workspace.
  • Use Case: Before a migration, assess language dominance and identify hotspots to prioritize improvements.

Quick Start

Run pygount on the repository root to generate a language breakdown, file counts, and code-vs-comment metrics.

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 and analyze language distribution in a repository?

To count lines of code and analyze language distribution in a repository, you can use pygount to compute total code lines, per-language file counts, and comment density across the codebase.

What is a good way to measure code-to-comment ratios for refactoring planning?

Measuring code-to-comment ratios for refactoring planning is done by calculating code-density metrics with pygount, which outputs comment lines and code lines to identify hotspots for quality improvements.

Does pygount work for analyzing multiple repositories across different programming languages?

Yes, pygount works for analyzing multiple repositories across different programming languages by generating language breakdowns and code metrics applicable to both single repositories and multi-repo projects.

Can I integrate codebase LOC analysis into automated code review workflows?

You can integrate codebase LOC analysis into automated code review workflows because pygount metrics generation requires a working Python environment and can be incorporated into automated review pipelines.

How do I assess language dominance before a codebase migration or onboarding?

To assess language dominance before a codebase migration or onboarding, run pygount on the repository root to generate a per-language breakdown of file counts and code lines to prioritize improvements.

Do I need Python installed to compute code metrics with pygount?

Yes, you need a working Python environment installed to compute code metrics with pygount, as the tool requires Python to generate lines of code and comment density outputs.