momenbasel

Skill Usage Counter — Development skill for Claude Code

Development community

Measure which Claude Code/Codex skills you actually invoke.

How to install Skill Usage Counter

This entry records only its repository, not the path inside it, so there is no exact command to give. Open momenbasel/skill-usage-counter and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Skill Usage Counter does

Measure which Claude Code/Codex skills you actually invoke. Hook + backfill + report; privacy-safe.

Alternatives in Development

  • Ccusage — CLI for analyzing Claude Code/Codex usage from local JSONL files 11.8k ★
  • Codexbar — Show usage stats for OpenAI Codex and Claude Code, without having to login 8.8k ★
  • Privacy Policy — Draft privacy policies with GDPR compliance considerations 7.8k ★

README

skill-usage-counter

Find out which Claude Code / Codex **skills you actually use** - and which of the hundreds installed have never once been invoked - so you can trim the library that loads into every session's context.

Why

Every installed skill's name and description load into the model's context at session start. A large library is a per-session token tax. Claude Code has no built-in usage counter, and the injected skill list means grepping transcripts naively gives false positives. This tool matches the exact tool-call signature, so counts are real.

What it does

  • Live hook - a PostToolUse hook records each Skill invocation as it happens.
  • Backfill - parses existing transcripts to seed historical counts.
  • Report - top used, and installed-but-never-invoked (archive candidates).
  • Export - emits a usage file other audit tools can consume.

Privacy

Stores only: skill name, count, first/last timestamp, and a salted SHA-1 hash of the project path (so "used in N projects" works without revealing which). Never stores prompts, tool args, file paths, or usernames. The data file is git-ignored.

Install

git clone https://github.com//skill-usage-counter.git
cp skill-usage-counter/scripts/counter.py ~/.claude/hooks/skill-usage-counter.py
# add the PostToolUse snippet from examples/settings-hook-snippet.json to ~/.claude/settings.json
python3 ~/.claude/hooks/skill-usage-counter.py backfill
python3 ~/.claude/hooks/skill-usage-counter.py report

Usage

python3 scripts/counter.py backfill          # seed from ~/.claude/projects
python3 scripts/counter.py report --top 30   # ranked usage + never-used list
python3 scripts/counter.py export            # machine-readable usage json

Environment overrides: `SKILL_USAGE_FILE`, `SKILL_USAGE_PROJECTS`, `SKILL_USAGE_SKILLS_DIR`, `SKILL_USAGE_SALT`.

Tests

pytest -q tests/

License

MIT