code-stats

Analyze codebases with tokei language statistics and difft semantic diffs.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kamushadenes/nix --skill code-stats-kamushadenes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-stats
Source: https://github.com/kamushadenes/nix/tree/main/home/common/ai/resources/claude-code/skills/code-stats
Command: npx skills add https://github.com/kamushadenes/nix --skill code-stats-kamushadenes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps developers quickly measure the size and composition of a codebase by counting lines, files, and language distribution, and compare changes using semantic diffs.

Core Features & Use Cases

  • Tokei-based language and line statistics across the project.
  • Difft-based semantic diffs highlight meaningful changes (not just lines).
  • Use Case: Assess impact of a refactor by comparing before/after stats to guide decisions.

Quick Start

Analyze the repository with tokei to get language distribution and total lines, then run difft to compare the latest commit with its predecessor and summarize the semantic changes.

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 stats for a project health check?

Codebase stats for a project health check are analyzed by running the tokei tool locally within the project directory to count lines and map language distribution, providing a clear picture of repository composition.

What is a semantic diff and how does it highlight meaningful code changes?

A semantic diff highlights meaningful code changes by analyzing structural logic rather than just modified lines. It uses the difft tool to identify actual functional impacts during change impact analysis across repositories.

How do I assess the impact of a refactor using code metrics?

You assess the impact of a refactor by comparing before and after codebase metrics. Generate language statistics with tokei and run semantic diffs with difft to evaluate change impact and guide refactoring decisions.

Do I need tokei and difft installed locally to analyze codebase metrics?

Yes, you need both tokei and difft installed locally to analyze codebase metrics. These tools must be present and run within the project directory to produce language statistics and semantic diffs.

What's the best way to compare code changes across multiple repositories?

The best way to compare code changes across repositories is using difft to generate semantic diffs. This approach highlights meaningful structural changes rather than superficial line modifications, directly supporting change impact analysis.