codebase-inspection

Calculate lines of code, language composition, and code-to-comment ratios using pygount.

247|22|Updated Dec 11, 2024
One-click install
npx skills add https://github.com/graniet/kheish --skill codebase-inspection-graniet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-inspection
Source: https://github.com/graniet/kheish/tree/main/skills/github/codebase-inspection
Command: npx skills add https://github.com/graniet/kheish --skill codebase-inspection-graniet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually counting lines of code, analyzing language composition, and calculating code-to-comment ratios across large codebases is time-consuming and error-prone, especially when needing to exclude dependency, build, and cache directories to get accurate metrics.

Core Features & Use Cases

  • Automated LOC and Language Breakdown: Instantly count lines of code, file counts, and comment lines for every programming language in a repository.
  • Noise Exclusion: Automatically skips common dependency, build, and cache directories to avoid skewed results from third-party code.
  • Use Case: Quickly assess the size and composition of a new open source project, track code growth across versions of your internal codebase, or generate metrics for technical debt reporting.

Quick Start

Use the codebase-inspection skill to analyze the lines of code and language breakdown for the current repository.

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 a repository?

To count lines of code and get a language breakdown, this skill automates LOC calculation, file counts, and comment lines for every programming language in your repository. It automatically excludes dependency, build, and cache directories to prevent skewed metrics.

What is the best way to calculate code-to-comment ratios across large codebases?

Calculating code-to-comment ratios across large codebases is automated by this skill using the pygount command-line tool. It accurately generates metrics while skipping common dependency and cache directories, solving the time-consuming and error-prone nature of manual analysis.

Do I need pygount to analyze codebase size and language composition?

Yes, you need the pygount command-line tool installed to analyze codebase size and language composition. The skill requires pygount to generate accurate lines of code, file count, and code-to-comment ratio metrics for your software repositories.

How are dependency and build directories handled when counting LOC?

Dependency, build, and cache directories are automatically excluded when counting LOC to eliminate skewed results from third-party code. This noise exclusion ensures your codebase size assessment and technical debt tracking reflect only your actual project code.

Can I use this for technical debt tracking across any programming language?

Yes, you can use this for technical debt tracking across any programming language codebase. It assesses project size, tracks code growth across versions, and generates code-to-comment ratio metrics suitable for technical debt reporting.