Agent skill

Code Stats

by aiskillstore in aiskillstore/marketplace

Analyze codebase with tokei (fast line counts by language) and difft (semantic AST-aware diffs).

MITAuto-check: notesData & Analytics

Install Code Stats

skills CLI
$ npx skills add aiskillstore/marketplace --skill code-stats -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aiskillstore/marketplace code-stats --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aiskillstore/marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/0xdarkmatter/code-stats .claude/skills/code-stats && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-stats
GitHub stars
430
Used in
2 other repos
Token cost
~697 tokens
SKILL.md length
116 words
Files
6 (incl. scripts, references, assets)
Skills in repo
1,085
Repo updated
First seen
Licence
MIT

At a glance

Analyze codebase with tokei (fast line counts by language) and difft (semantic AST-aware diffs).

  • : how big is codebase
  • SKILL.md covers tokei - Line Counts, difft - Semantic Diffs, Quick Reference and When to Use, plus 1 more section
  • Calls git and jq
  • Count lines of code

What it does

Code Stats is an agent skill from aiskillstore/marketplace. Analyze codebase with tokei (fast line counts by language) and difft (semantic AST-aware diffs). Get quick project overview without manual counting. Triggers on: how big is codebase, count lines of code, what languages, show semantic diff, compare files, code statistics.

Its SKILL.md is about 700 tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including scripts, reference files and assets (for example `references/difft-advanced.md`, `references/tokei-advanced.md` and `skill-report.json`). Compatibility notes: Requires tokei and difft CLI tools. Install: brew install tokei difft (macOS) or cargo install tokei difftastic (cross-platform).

It sits in Data & Analytics, covering Statistics. It works with Git. The repository describes itself as: Security-audited skills for Claude, Codex & Claude Code. One-click install, quality verified. The licence is MIT.

When your agent uses it

  • : how big is codebase
  • Count lines of code
  • Show semantic diff
  • Code statistics

Example prompts

  • “/code-stats”

Requirements

  • Compatibility (from SKILL.md): Requires tokei and difft CLI tools. Install: brew install tokei difft (macOS) or cargo install tokei difftastic (cross-platform).
  • Pre-approved tools (allowed-tools): Bash

What it can do on your machine

Read from SKILL.md and the folder at commit 4ac52da. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires tokei and difft CLI tools. Install: brew install tokei difft (macOS) or cargo install tokei difftastic (cross-platform).

    From compatibility in the SKILL.md frontmatter.

Context cost

Code Stats loads about 697 tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 71 tokens; SKILL.md has 116 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~71
When it runs · the whole SKILL.md, loaded when a task matches
~697
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aiskillstore/marketplace at commit 4ac52da, republished under its MIT licence (© aiskillstore). 116 words, ~697 tokens.

Download SKILL.mdSave it as .claude/skills/code-stats/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
code-stats
description
Analyze codebase with tokei (fast line counts by language) and difft (semantic AST-aware diffs). Get quick project overview without manual counting. Triggers on: how big is codebase, count lines of code, what languages, show semantic diff, compare files, code statistics.
allowed-tools
Bash
compatibility
Requires tokei and difft CLI tools. Install: brew install tokei difft (macOS) or cargo install tokei difftastic (cross-platform).
license
MIT
metadata.author
claude-mods

Code Statistics

Quickly analyze codebase size, composition, and changes.

tokei - Line Counts

bash
# Count all code
tokei

# Compact output sorted by code
tokei --compact --sort code

# Specific languages
tokei --type=TypeScript,JavaScript

# Exclude directories
tokei --exclude node_modules --exclude dist

# JSON output for scripting
tokei --output json | jq '.Total.code'
Sample Output
===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 TypeScript             45        12847         9823         1456         1568
 JavaScript             12         2341         1876          234          231
-------------------------------------------------------------------------------
 Total                  57        15188        11699         1690         1799
===============================================================================

difft - Semantic Diffs

bash
# Compare files
difft old.ts new.ts

# Inline mode
difft --display=inline old.ts new.ts

# With git
GIT_EXTERNAL_DIFF=difft git diff
GIT_EXTERNAL_DIFF=difft git show HEAD~1
Why Semantic?
Traditional diffdifft
Line-by-lineAST-aware
Shows moved as delete+addRecognizes moves
Whitespace sensitiveIgnores formatting

Quick Reference

TaskCommand
Count all codetokei
Compact outputtokei --compact
Sort by codetokei --sort code
TypeScript onlytokei -t TypeScript
JSON outputtokei --output json
Exclude dirtokei --exclude node_modules
Semantic diffdifft file1 file2
Git diffGIT_EXTERNAL_DIFF=difft git diff

When to Use

  • Getting quick codebase overview
  • Comparing code changes semantically
  • Understanding project composition
  • Reviewing refactoring impact
  • Tracking codebase growth

Additional Resources

For detailed patterns, load:

  • ./references/tokei-advanced.md - Filtering, output formats, CI integration
  • ./references/difft-advanced.md - Display modes, git integration, language support

© aiskillstore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references, assets) in skills/0xdarkmatter/code-stats of aiskillstore/marketplace.

  • SKILL.md
  • assets/.gitkeep
  • references/difft-advanced.md
  • references/tokei-advanced.md
  • scripts/.gitkeep
  • skill-report.json

Open the folder on GitHubat commit 4ac52da

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in aiskillstore/marketplace, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Code Stats next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Stats compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Stats this skillaiskillstore/marketplace4302 repos~697Automated safety check: NotesMIT
Echoes Statuspsinetron/echoes-vault-codex132—~596Automated safety check: PassMIT
Gsd StatsSpillwaveSolutions/agent-brain1203 repos~620Automated safety check: PassMIT
Clocmanagedcode/dotnet-skills486—~1.5kAutomated safety check: NotesMIT
Mcaf Dotnet Clocmanagedcode/Storage138—~1.4kAutomated safety check: NotesMIT
Statistical Analysisspacering-net/codeg3.8k3 repos~5kAutomated safety check: PassMIT

Similar skills

  • Echoes Status

    psinetron/echoes-vault-codex

    Show a compact EchoesVault status card and report protocol, adapter, storage, metadata, index, conflict, and scalability health.

    132 GitHub stars~596 tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Gsd Stats

    SpillwaveSolutions/agent-brain

    Display project statistics — phases, plans, requirements, git metrics, and timeline

    120 GitHub starsUsed in 3 repos~620 tokens
    Data & AnalyticsAuto-check passed
  • Cloc

    managedcode/dotnet-skills

    Use the open-source free cloc tool for line-count, language-mix, and diff statistics in .NET repositories.

    486 GitHub stars~1.5k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Mcaf Dotnet Cloc

    managedcode/Storage

    Use the open-source free cloc tool for line-count, language-mix, and diff statistics in .NET repositories.

    138 GitHub stars~1.4k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Statistical Analysis

    spacering-net/codeg

    Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting.

    3.8k GitHub starsUsed in 3 repos~5k tokens
    Data & AnalyticsAuto-check passed
  • Statsmodels

    zLanqing/codex-claude-academic-skills

    Statistical models library for Python. An agent skill from zLanqing/codex-claude-academic-skills.

    4.6k GitHub starsUsed in 16 repos~4.9k tokens
    Data & AnalyticsAuto-check passed

More from aiskillstore/marketplace

All 1,085 skills in this repo
  • Data Processing

    aiskillstore/marketplace

    Process JSON with jq and YAML/TOML with yq. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~720 tokens
    Auto-check: notes
  • Doc Scanner

    aiskillstore/marketplace

    Scans for project documentation files (AGENTS.md, CLAUDE.md, GEMINI.md, COPILOT.md, CURSOR.md, WARP.md, and 15+ other formats) and synthesizes guidance.

    430 GitHub starsUsed in 1 repo~644 tokens
    Auto-check: notes
  • File Search

    aiskillstore/marketplace

    Modern file and content search using fd, ripgrep (rg), and fzf.

    430 GitHub starsUsed in 1 repo~598 tokens
    Auto-check: notes
  • Find Replace

    aiskillstore/marketplace

    Modern find-and-replace using sd (simpler than sed) and batch replacement patterns.

    430 GitHub starsUsed in 1 repo~527 tokens
    Auto-check: notes
  • Investigating Codebases

    aiskillstore/marketplace

    Automatically activated when user asks how something works, wants to understand unfamiliar code, needs to explore a new codebase, or asks questions like "where is X implemented?", "how does Y…

    430 GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check: notes
  • Project Planner

    aiskillstore/marketplace

    Detects stale project plans and suggests session commands. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~504 tokens
    Auto-check passed

Works with

Questions about Code Stats

What does Code Stats do?

Analyze codebase with tokei (fast line counts by language) and difft (semantic AST-aware diffs). Code Stats is an agent skill from aiskillstore/marketplace. Analyze codebase with tokei (fast line counts by language) and difft (semantic AST-aware diffs).

When should I use Code Stats?

Code Stats fits situations like: : how big is codebase; count lines of code; show semantic diff; code statistics.

How do I install Code Stats in Claude Code?

Run `npx skills add aiskillstore/marketplace --skill code-stats -a claude-code`. Or copy the skill folder (skills/0xdarkmatter/code-stats in aiskillstore/marketplace) into .claude/skills/code-stats in your project. Claude Code loads it when a task matches its description.

How do I install Code Stats in Codex?

Run `npx skills add aiskillstore/marketplace --skill code-stats -a codex`. Or copy the skill folder (skills/0xdarkmatter/code-stats in aiskillstore/marketplace) into .agents/skills/code-stats in your project. Codex loads it when a task matches its description.

Can I use Code Stats in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aiskillstore/marketplace --skill code-stats -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-stats, .gemini/skills/code-stats, .github/skills/code-stats and .opencode/skills/code-stats in your project.

What does Code Stats need to run?

Going by SKILL.md and its folder, Code Stats needs the command-line tools its instructions call (git and jq). Its frontmatter pre-approves these tools: Bash. Compatibility (from SKILL.md): Requires tokei and difft CLI tools. Install: brew install tokei difft (macOS) or cargo install tokei difftastic (cross-platform)..

Does Code Stats access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Stats safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Code Stats use?

Code Stats is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Stats use?

About 697 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.6k tokens, read only when the agent opens those files.

What are the alternatives to Code Stats?

Skills that share tags, products or a category with Code Stats: Echoes Status (psinetron/echoes-vault-codex, 132 stars), Gsd Stats (SpillwaveSolutions/agent-brain, 120 stars), Cloc (managedcode/dotnet-skills, 486 stars) and Mcaf Dotnet Cloc (managedcode/Storage, 138 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Stats?

aiskillstore (a GitHub organization) maintains it in aiskillstore/marketplace, which has 430 GitHub stars. The repository holds 1,085 skills in this directory. The repository was last updated on October 7, 2026.

Source: aiskillstore/marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.