codebase-inspection

Counts lines of code and language breakdown using pygount.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/musical-basics/hermes-build-2 --skill codebase-inspection-musical-basics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-inspection
Source: https://github.com/musical-basics/hermes-build-2/tree/main/skills/github/codebase-inspection
Command: npx skills add https://github.com/musical-basics/hermes-build-2 --skill codebase-inspection-musical-basics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the challenge of manually estimating codebase metrics like lines of code, language distribution, and comment ratios, providing fast and accurate analysis without tedious counting.

Core Features & Use Cases

  • LOC and Language Breakdown: Counts files, code lines, and comments per language while excluding irrelevant directories.
  • Code-vs-Comment Ratios: Delivers percentages to evaluate documentation density and codebase health.
  • Use Case: When onboarding to a new project, use this to instantly understand its scale, primary languages, and maintainability before diving into the code.

Quick Start

Analyze the repository at /path/to/project for lines of code, language breakdown, and comment ratios using pygount.

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 and get a language breakdown?

You can count lines of code and get a language breakdown by analyzing the repository with pygount. This provides accurate metrics for code lines, file counts, and comments per language while excluding dependency folders.

What is a code-vs-comment ratio and how is it calculated for a codebase?

A code-vs-comment ratio measures documentation density by comparing comment lines to code lines. This analysis calculates percentages per language using pygount to help evaluate codebase health and maintainability.

Can I exclude dependency folders when analyzing repository size and composition?

Yes, you can exclude dependency folders when analyzing repository size. The inspection automatically excludes irrelevant directories to ensure accurate stats and a true reflection of your project's code composition.

How do I output codebase metrics as JSON or filtered reports?

You can output codebase metrics as JSON or filtered reports by configuring the analysis format. The tool supports summary, JSON, and filtered outputs to integrate repository composition data into your existing workflows.

What is the best way to assess a codebase before onboarding to a new project?

The best way to assess a codebase before onboarding is to run an automated composition analysis. This instantly reveals project scale, primary languages, and comment ratios, helping you understand maintainability before reading the code.

Does pygount work for evaluating documentation density across multiple programming languages?

Yes, pygount works for evaluating documentation density across multiple programming languages. It counts files, code lines, and comments per language to deliver code-vs-comment ratio percentages for the entire repository.