cloc

Count lines of code and language distribution across directories and git references.

32|3|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/asynkron/asynkron-skills --skill cloc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloc
Source: https://github.com/asynkron/asynkron-skills/tree/main/skills/cloc
Command: npx skills add https://github.com/asynkron/asynkron-skills --skill cloc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Count lines of code, analyze codebase size and composition, and compare code between git refs to reveal metrics for project reviews and refactor planning.

Core Features & Use Cases

  • Analyze directories, archives, and git references to produce a language breakdown and line counts (blank, comment, and physical lines).
  • Compare code between versions to spot changes in composition and size.
  • Output results in machine-readable formats (JSON, YAML, CSV, Markdown tables, XML) for downstream tooling.

Quick Start

Run cloc on a project directory or git ref to generate a comprehensive codebase report.

Frequently Asked Questions about cloc

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

FAQPage Schema
How do I count lines of code and analyze language distribution in a git repository?

To count lines of code and analyze language distribution, you can run this Skill on a project directory or git reference to produce a comprehensive report of blank, comment, and physical lines broken down by programming language.

Can I compare codebase size and composition between different git commits or branches?

Yes, you can compare codebase metrics between git references, branches, and commits to reveal changes in composition and size, which is useful for tracking project growth and refactor planning.

What output formats are supported for codebase statistics and metrics?

Codebase statistics and metrics can be emitted in machine-readable formats including JSON, YAML, CSV, Markdown tables, and XML to support downstream processing and tooling integration.

Do I need to install cloc to measure codebase size and language mix?

Yes, you need to have the cloc utility installed locally to calculate codebase size, language distribution, and code statistics across your repositories and commits.

What is the best way to track code changes between versions for project reviews?

The best way to track code changes between versions is to compare code between git references to spot changes in composition and size, generating line counts and language breakdowns for review.

Can I analyze directories and archives to get a language breakdown and line counts?

Yes, you can analyze directories, archives, and git references to produce a detailed language breakdown and line counts including blank, comment, and physical lines for project sizing.