analyze-size

Analyze codebases with cloc to compute total lines of code and language distribution.

4|Updated Oct 6, 2025
One-click install
npx skills add https://github.com/otrebu/agents --skill analyze-size
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyze-size
Source: https://github.com/otrebu/agents/tree/main/skills/analyze-size
Command: npx skills add https://github.com/otrebu/agents --skill analyze-size

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cloc.

What problem does it solve?

Understanding the scale, primary languages, and overall composition of a codebase can be a time-consuming manual effort, especially when onboarding to new projects or performing technical audits. This Skill automates that analysis.

Core Features & Use Cases

  • Codebase Metrics: Provides total lines of code (LOC), excluding boilerplate, comments, and blank lines, using cloc.
  • Language Distribution: Breaks down the codebase by programming language, showing file counts, code lines, and percentage distribution.
  • Complexity Assessment: Categorizes the codebase size (e.g., tiny, small, medium, large) and offers key insights into its composition and characteristics.
  • Use Case: When you join a new project or need to quickly assess a repository, ask Claude to "analyze the codebase size." You'll receive an immediate, comprehensive overview of its scale and technology stack, helping you prioritize your learning and planning.

Quick Start

Analyze the size and language distribution of the current codebase.

Frequently Asked Questions about analyze-size

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze codebase size and language distribution quickly?

Codebase size analysis computes total lines of code, language breakdown, and complexity category using cloc. The Skill scans your project, excludes common build directories like node_modules and .git, and returns a structured report with per-language metrics and composition insights.

Can I use cloc to measure code across multiple programming languages in one project?

Yes, cloc supports dozens of languages and automatically detects each file's language. This Skill runs cloc across your entire codebase and produces a language distribution report showing file counts, lines of code, and percentage for each language detected.

What directories does the codebase analyzer exclude by default?

The analyzer excludes node_modules, .git, dist, build, and coverage directories to focus on source code metrics. These exclusions prevent inflated counts from dependencies, version control data, and generated artifacts.

How do I categorize my project's complexity based on codebase size?

Codebase size analysis assigns a complexity category (tiny, small, medium, large) based on total lines of code. The report includes key insights about your project's composition and technology stack to help prioritize onboarding or technical audits.

What happens if cloc isn't installed on my system?

The Skill gracefully informs you that cloc is not available and cannot proceed with analysis. You'll need to install cloc first; the error message guides you toward installation steps for your operating system.

Can I get raw cloc output in addition to the human-readable report?

Yes, the Skill produces both a human-readable report and an optional raw cloc table. The raw output preserves detailed metrics for further processing or comparison if needed.