skill-stats

skill-stats is a command for Claude Code from Jewgah/claude-code-skills. It costs 18 tokens per session (983 once invoked), scanned A, original, MIT.

A usage leaderboard for skills and slash commands based on a durable activity log. It can also inspect older session transcripts when historical usage is requested.

In plain words
What is it for?
Use it to view a ranked list of commonly used skills, filter usage by recent days or project, or include usage from before the durable log began.
Why use it?
It shows which tools are used most often instead of requiring you to estimate usage from memory. Filters can narrow the results by time or project.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; names the ExitPlanMode tool; positional $N argument.

Good fit Use it to view a ranked list of commonly used skills, filter usage by recent days or project, or include usage from before the durable log began.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jewgah/claude-code-skills/skill-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/Jewgah/claude-code-skills

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 skill-stats

README.md
[![agentmods](https://agentmods.dev/badge/commands/jewgah/claude-code-skills/skill-stats.svg)](https://agentmods.dev/commands/jewgah/claude-code-skills/skill-stats)
Your own site
<a href="https://agentmods.dev/commands/jewgah/claude-code-skills/skill-stats"><img src="https://agentmods.dev/badge/commands/jewgah/claude-code-skills/skill-stats.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 983 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00018 $0.00983
Opus 5 $0.00009 $0.00491
Sonnet 5 $0.00004 $0.00197
Haiku 4.5 $0.00002 $0.00098

Measured 7d ago against content hash c18006311c8a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

skill-stats scanned grade A with 0 findings 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 7d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/skill-stats.md · 44 lines

What it actually says

Show a ranked leaderboard of skill / slash-command usage.

Source of truth: the durable log at ~/.claude/skill-usage.log, written by the log-skill.sh hooks (UserPromptSubmit = typed /cmd, PreToolUse:Skill = natural-language-triggered). It survives the 365-day transcript cleanup, so it only grows. The log begins the day you install the hooks — anything earlier lives only in transcripts.

Steps:

  1. If the log is missing/empty, say it's only been accumulating since the hooks were installed and there's nothing logged yet. Then offer the history mode below.

  2. Parse $ARGUMENTS for optional filters:

    • days N → keep only entries from the last N days
    • project <name> → keep only entries whose cwd contains <name> (case-insensitive)
    • history → ALSO count usage from BEFORE the log started, by scanning transcripts (entries dated before the log's first line, so no double-count with the log).
    • --all (or all) → show the FULL ranking with no cutoff (drop the head -25 in the commands below). Default is top 25.

    Artifact filter (always on): real skill names match ^[A-Za-z0-9:_-]+$. The transcript scan can pick up its own diagnostic grep patterns recorded in transcripts (e.g. \?toy-repos, \?\(jira\|review\|...\)), so every pipeline below pipes through grep -E '^[A-Za-z0-9:_-]+$' to drop them. (The durable log is already clean — log-skill.sh only writes parsed names — but apply it uniformly.)

  3. Tally the log by skill name. Base command (adapt for the days/project filters; drop | head -25 when --all):

    log="$HOME/.claude/skill-usage.log"
    awk -F'\t' '$2 ~ /^[A-Za-z0-9:_-]+$/ {c[$2]++; t[$2"\t"$3]++; if($1>last[$2]) last[$2]=$1}
      END{for(k in c) printf "%d\t%s\t%s\n", c[k], k, last[k]}' "$log" | sort -rn | head -25
    
  4. For history mode, prepend transcript-derived counts (only for the window before the log's earliest timestamp) using BOTH invocation paths — this is the corrected method:

    cd ~/.claude/projects
    { find . -name '*.jsonl' -print0 | xargs -0 grep -ho '<command-name>/\?[^<]*</command-name>' 2>/dev/null
      find . -name '*.jsonl' -print0 | xargs -0 grep -ho '"name":"Skill","input":{"skill":"[^"]*"' 2>/dev/null | sed 's/.*"skill":"//; s/"$//'
    } | sed -E 's#</?command-name>##g; s#^/##' \
      | grep -E '^[A-Za-z0-9:_-]+$' \
      | grep -vE '^(model|compact|resume|rename|exit|clear|plan|effort|mcp|status|doctor|context|EnterPlanMode|ExitPlanMode|init)$' \
      | sort | uniq -c | sort -rn | head -25
    

    The grep -E '^[A-Za-z0-9:_-]+$' drops self-referential grep-pattern artifacts. Drop | head -25 when --all. Note in the output that transcript history is approximate (compaction drops some) and is a floor.

  5. Present a markdown table: Skill | Uses | Share % | Last used (and typed-vs-nl split when interesting). With --all, show every skill (no truncation) and append a count of distinct skills. End with total invocations and the date range covered. Exclude built-in CLI commands (model, compact, resume, rename, exit, clear, plan, effort, mcp, status, doctor, context) unless the user asks for them.

$ARGUMENTS

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. 7d ago First seen · 44 lines · 18 tokens per session scan A c18006311c8a

Subscribe to this mod's changes

skill-stats is a command published in the GitHub repository Jewgah/claude-code-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 983 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.