codebase-inspection

Measure lines of code, language distribution, and code versus comment ratios in repositories.

4|Updated May 18, 2026
One-click install
npx skills add https://github.com/ZardLi1115/zedclaw --skill codebase-inspection-zardli1115
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-inspection
Source: https://github.com/ZardLi1115/zedclaw/tree/main/skills/github/codebase-inspection
Command: npx skills add https://github.com/ZardLi1115/zedclaw --skill codebase-inspection-zardli1115

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

You need fast, reliable metrics about a codebase (LOC, language mix, and code-vs-comment balance) without manually counting files or writing custom scripts.

Core Features & Use Cases

  • LOC and language breakdown: Uses pygount to count lines per detected language and summarize file counts.
  • Code vs comment ratios: Provides an interpretable split between code lines and comments/documentation lines.
  • Repo sizing for planning: Helps you assess scope, complexity, and review effort before coding, refactoring, or contributing.
  • Use case: You want to estimate the effort for a large refactor by comparing how much of the repository is code versus comments and which languages dominate.

Quick Start

Run pygount from the repository root with appropriate folders excluded, then read the summary output to get language counts, LOC, and code-to-comment ratios.

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 measure language breakdown in a repository?

To count lines of code and measure language breakdown, you can use pygount from the repository root to automatically detect languages, count files, and summarize LOC metrics while skipping dependency folders.

What is the best way to calculate code versus comment ratios for a codebase?

Calculating code versus comment ratios involves scanning source files to split lines into executable code and documentation. Pygount analyzes the repository to provide this interpretable code-to-comment balance directly.

Can I estimate refactor effort by analyzing repository metrics and LOC?

Yes, you can estimate refactor effort by analyzing repository metrics. Measuring total lines of code, language distribution, and comment ratios helps assess scope, complexity, and required review effort before coding.

Do I need pygount to inspect a local repository for code sizing?

Yes, you need pygount installed to perform this codebase inspection. It executes the line counting, language detection, and file summarization logic required to produce consistent repository metrics.

Why does codebase inspection scan dependency folders and inflate my LOC metrics?

Codebase inspection inflates LOC metrics when dependency folders are not excluded. You must execute pygount with correct folder skipping configurations to avoid scanning dependencies and ensure accurate repository metrics.