stats

stats is a command for Claude Code from jayvee/aigon. It costs 0 tokens per session (937 once invoked), scanned A, original, Apache-2.0.

A project statistics command that reports measures such as lines of code, token use, and feature delivery speed.

In plain words
What is it for?
Use it to inspect code volume, test and documentation size, token usage, or feature velocity.
Why use it?
It gives you a quick view of the size and development activity of a codebase without counting generated files and dependencies.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

Good fit Use it to inspect code volume, test and documentation size, token usage, or feature velocity.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jayvee/aigon/stats
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/jayvee/aigon

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for stats

README.md
[![agentmods](https://agentmods.dev/badge/commands/jayvee/aigon/stats/github.svg)](https://agentmods.dev/commands/jayvee/aigon/stats)
Your own site
<a href="https://agentmods.dev/commands/jayvee/aigon/stats"><img src="https://agentmods.dev/badge/commands/jayvee/aigon/stats/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for stats

Your own site · 80×15
<a href="https://agentmods.dev/commands/jayvee/aigon/stats"><img src="https://agentmods.dev/badge/commands/jayvee/aigon/stats.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 937 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00937
Opus 5.5 $0.00000 $0.00375
Sonnet 5.5 $0.00000 $0.00187
Haiku 4.5 $0.00000 $0.00094

Measured 1mo ago against content hash 0dc5a46e4b81, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

stats scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://127.0.0.1:4100/api/analytics 2>/dev/null
templates/generic/commands/stats.md · 103 lines

How it starts

The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.

aigon-stats

Show codebase and development statistics for the current project.

Usage

aigon stats              # Full report
aigon stats --loc        # Lines of code only
aigon stats --tokens     # Token usage only
aigon stats --velocity   # Feature velocity only
aigon stats --oneliner   # One-line summary

What to do

Lines of Code (LOC)

Count lines in the current project, broken down by category. Exclude node_modules, .next, dist, build, .git, and lock files.

# Application code (TS/JS/TSX/JSX)
find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) \
  -not -path "*/node_modules/*" -not -path "*/.next/*" -not -path "*/dist/*" -not -path "*/build/*" \
  -not -path "*/.git/*" -not -name "*.test.*" -not -name "*.spec.*" \
  | xargs wc -l 2>/dev/null | tail -1

# Tests
find . -type f \( -name "*.test.*" -o -name "*.spec.*" \) \
  -not -path "*/node_modules/*" \
  | xargs wc -l 2>/dev/null | tail -1

# Styles (CSS/SCSS)
find . -type f \( -name "*.css" -o -name "*.scss" \) \
  -not -path "*/node_modules/*" \
  | xargs wc -l 2>/dev/null | tail -1

# Markdown/Docs
find . -type f -name "*.md" -not -path "*/node_modules/*" \
  | xargs wc -l 2>/dev/null | tail -1

Break down application code by top-level directory, showing lines per directory.

Token Usage

Read Claude Code's session metadata to estimate token usage for this project:

# Find sessions for this project
PROJECT_PATH=$(pwd)
ls ~/.claude/usage-data/session-meta/*.json 2>/dev/null | head -5

For each session JSON in ~/.claude/usage-data/session-meta/, check if projectPath matches the current project. Sum up:

  • inputTokens — tokens sent to the model
  • outputTokens — tokens generated by the model
  • totalMessages — conversation turns
  • toolUseCount — tool calls made

Also check ~/.claude/stats-cache.json for aggregate model usage data (tokensByModel).

Read the full file on GitHub · 103 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 103 lines · 0 tokens per session scan A 0dc5a46e4b81

Subscribe to this mod's changes

stats is a command published in the GitHub repository jayvee/aigon (26 stars, last pushed 12d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 937 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.