codebase-inspection

Generate codebase size and composition metrics with pygount.

Updated May 5, 2026
One-click install
npx skills add https://github.com/Z43L/zeus-agent --skill codebase-inspection-z43l
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-inspection
Source: https://github.com/Z43L/zeus-agent/tree/main/skills/github/codebase-inspection
Command: npx skills add https://github.com/Z43L/zeus-agent --skill codebase-inspection-z43l

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you quickly understand how large a codebase is and how it’s structured by producing reliable LOC counts, language breakdowns, and code-versus-comment ratios.

Core Features & Use Cases

  • Repository metrics with pygount: counts files by detected language and reports code lines, comment lines, and percentages.
  • Configurable exclusions: avoids long scans by skipping build, dependency, and cache directories using --folders-to-skip.
  • Flexible output formats: supports human-friendly summary, detailed per-file breakdown, and JSON for programmatic analysis.
  • Use case: Before planning a refactor, quantify the dominant languages and estimate effort by comparing code vs comment density across the repository.

Quick Start

Run the codebase-inspection skill to generate a language and LOC summary for your repository while skipping dependency and build folders.

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 get a language breakdown for my repository?▼

You can count lines of code and get a language breakdown by running a pygount-based analysis on your repository. It computes file counts, LOC metrics, and code-to-comment ratios while skipping build and dependency directories for accurate repository metrics.

What's the best way to measure code-to-comment ratio across a codebase?▼

The best way to measure code-to-comment ratio is using pygount to analyze your codebase, which calculates the percentage of comment lines versus actual code lines. You can output the documentation density results as a summary, per-file breakdown, or JSON.

Can I export repository language metrics to JSON for programmatic analysis?▼

Yes, you can export repository language metrics to JSON for programmatic analysis. The codebase inspection supports flexible output formats including human-friendly summaries, detailed per-file breakdowns, and JSON outputs for tracking codebase growth over time.

When do I need to perform a codebase inspection and estimate refactor scope?▼

You need to perform a codebase inspection to estimate refactor scope when you are planning structural changes and must quantify dominant languages. Analyzing the line-of-code counts and code-to-comment ratios helps you assess the effort required for the repository.

Why does my repository metrics scan take so long on large codebases?▼

Your repository metrics scan may take long because it is traversing large dependency or build directories. Applying the --folders-to-skip option with pygount avoids long scans by excluding these cache and dependency folders from the line-of-code count.