code-stats

Analyze codebases for size, language distribution, and semantic diffs.

29|6|Updated Nov 27, 2025
One-click install
npx skills add https://github.com/0xDarkMatter/claude-mods --skill code-stats
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-stats
Source: https://github.com/0xDarkMatter/claude-mods/tree/main/skills/code-stats
Command: npx skills add https://github.com/0xDarkMatter/claude-mods --skill code-stats

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tokei, difft.

What problem does it solve?

This Skill eliminates manual code counting and provides semantic diff analysis for better code reviews.

Frequently Asked Questions about code-stats

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

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

Code statistics analysis counts lines of code by language using tokei, providing instant breakdowns of codebase composition across all file types. This replaces manual counting and delivers machine-readable JSON output suitable for CI pipelines and reporting.

Can I compare code changes semantically between branches?

Semantic diff analysis using difft reveals meaningful changes beyond line counts, showing refactoring impact and actual logic modifications. This enables better code reviews by distinguishing cosmetic changes from functional ones.

Does this work with projects of any size and language?

Yes. The Skill applies to projects of all sizes and languages by leveraging tokei's multi-language support and difft's semantic parsing. Per-language statistics and JSON output integrate seamlessly with any CI pipeline regardless of project scale.

How do I get code statistics output in a machine-readable format?

Line counts and language distribution are generated as JSON, enabling automated processing, integration with dashboards, and CI pipeline workflows. This format eliminates manual parsing and supports downstream analysis tools.

What's the best way to assess refactoring impact on a codebase?

Compare codebases or branches using semantic diffs to measure actual logic changes separate from formatting. Combined with line count snapshots, this quantifies refactoring scope and identifies unintended modifications before merge.