Sandbox
@crafter-station/skill-kit

Local skill analytics for Claude Code and other agents

skillkit scans local agent session data, tracks skill invocations, and estimates the context budget those skills consume. It then surfaces stats, health checks, audits, receipts, and prune suggestions so you can clean up unused skills.

78 stars10 forksTypeScriptUpdated 17d ago
Who it's for

Builders who want their agent sessions and skill usage measured locally.

What it delivers

You can see which skills matter, which ones waste context, and which ones to prune.

What it does

Usage stats

Shows skill invocation counts and sparkline trends from local session data with the `stats` command.

Context budget checks

Measures metadata budget, context tax, and MCP tool schema cost with `health` and `context`.

Skill auditing

Audits skills or packs for dead weight, overlaps, broken pointers, and disclosure gaps with `audit`.

Pruning unused skills

Finds skills that have not been used recently and removes them with `prune`.

Private receipts

Creates reviewable records grouped by skill, agent, and session with `receipts`.

Multi-agent session scanning

Reads local session files from Claude Code, Cursor, Codex, Gemini CLI, Copilot, Windsurf, and others.

Installable skill stub

Includes a thin `skillkit` skill that points the agent to the matching CLI workflow and commands.

Portable snapshot API

Exports `@crafter/skillkit/agentfiles` for loading the versioned snapshot without the Bun CLI.

How to get it

  1. 1Local-first analytics for AI agent skills. Track usage, measure context budget, and…
    bunx @crafter/skillkit stats
  2. 2The installable skillkit skill is a thin discovery stub. It asks the agent to load the…
    skillkit skills get core
    skillkit skills get core --full
  3. 3Install skillkit as a skill so the agent can run analytics commands for you
    bunx skills add crafter-station/skill-kit --skill skillkit
  4. 4Checks context budget usage and flags unused skills.
    $ npx @crafter/skillkit health
      [████████░░] 78% metadata budget (12.5K / 16.0K)
      ! 3 skills unused in 30d - run skillkit prune
  5. 5Audits one skill, multiple skill paths, or an entire repository without installing it.…
    skillkit audit ./skills
    skillkit audit ./skills/testing ./skills/release
    skillkit audit ./skills --include "rn-*"
    skillkit audit ./skills --json --strict
  6. 6Removes skills that haven't been used in the last 30 days.
    $ npx @crafter/skillkit prune
      x scaffold (0.9K)
      x lint (2.1K)
    
      2 skills - 3.0K context reclaimable
    
      Run with --yes to confirm deletion.

README

skillkit

Local-first analytics for AI agent skills. Track usage, measure context budget, and prune what you don't use.

bunx @crafter/skillkit stats

npx -y @crafter/skillkit stats also works when Bun is installed and available on PATH, because the executable uses the Bun runtime.

Auto-discovers your skills, indexes sessions, and shows what matters. No setup needed.

Why

AI coding agents load skills into their context window on every session. More skills = less room for your actual code. But which skills do you actually use? Which ones are wasting context budget?

skillkit answers these questions by scanning your session files, tracking invocations, and surfacing actionable insights - all locally on your machine.

Commands

CommandDescription
skillsLoad guidance matched to the installed CLI version
autoAuto-scan after Claude Code sessions
statsUsage analytics with sparklines (auto-scans on first run)
receiptsPrivate, reviewable records grouped by skill, agent, and session
listList installed skills with size and context budget
healthHealth check: unused skills, context budget, DB
auditAudit any skill or pack against Agent Skills best practices
traceRun and record skill execution traces
conflictsTest skills for trigger collisions
coverageAnalyze dead weight in a skill
pruneRemove unused skills to reclaim context budget
contextContext tax: tokens and cost loaded on every API call
burnToken burn rate and cost across agents
sessionsDaily usage across all agents
graph52-week contribution heatmap
scanForce re-scan (runs automatically, rarely needed)
snapshotRefresh the versioned Agentfiles analytics snapshot

Flags

FlagApplies toDescription
--fullskillsInclude the complete bundled command reference
--mcpcontextMeasure MCP server tool schemas (spawns each server)
--mcp-timeout NcontextPer-server probe timeout in seconds (default: 20)
--compare <name>contextDiff against a saved baseline
--save-baseline <name>contextSave the current measurement
--days NstatsTime range in days (default: 30)
--allstatsShow all skills, not just top 10
--include-commandsscanAlso track slash commands
--include <glob>auditAudit only matching skills in a pack
--strictauditExit 1 when warnings or errors are found
--remote <host.ts.net>receiptsScan and export receipts from a Mac over Tailscale SSH
--claudeanyOnly scan Claude Code
--opencodeanyOnly scan OpenCode

When an MCP server does not answer within --mcp-timeout, it is skipped and reported as timed out; the command does not hang waiting for it.

Install skills via skills.sh: bunx skills add <owner/repo>

Programmatic Agentfiles API

The @crafter/skillkit/agentfiles export is portable JavaScript for Node and Electron. It loads the versioned snapshot without importing Bun SQLite or spawning the CLI.

import { loadAgentfilesSnapshot } from "@crafter/skillkit/agentfiles";

const snapshot = loadAgentfilesSnapshot();

skillkit scan and skillkit snapshot refresh ~/.skillkit/agentfiles-snapshot.json. The analytics engine remains Bun-based for now. The API gives native consumers a stable read boundary while the database layer is extracted behind a portable adapter.

Version-matched agent guidance

The installable skillkit skill is a thin discovery stub. It asks the agent to load the canonical workflow from the installed CLI, so guidance cannot silently drift from command behavior:

skillkit skills get core
skillkit skills get core --full

The first command returns the operating workflow. --full adds exact flags, JSON behavior, safety notes, data locations, and the complete command catalog. Both bundled skill files are checked against the CLI package version during release.

Use as a Skill

Install skillkit as a skill so the agent can run analytics commands for you:

bunx skills add crafter-station/skill-kit --skill skillkit

Then ask your agent things like "which skills do I use the most?" or "clean up unused skills" and it will run the right commands.

How It Works

Stats

Auto-discovers skills on first run, parses session data from supported connectors, and shows sparkline trends.

$ npx @crafter/skillkit stats
  First run detected, scanning skills...
  Found 12 skills.

  SKILL-KIT ANALYTICS (last 30 days)

  Total invocations: 419
  Unique skills:     66
  Most active day:   Monday

  TOP SKILLS

  react-best-practices  ████████████████████   109  ▁▅▂▁▂▂█▅▁▂
  agent-browser         ██████████              56  ▂█▇▃▁▁▁▂▁▁▃▂▂▃▂
  pulse                 ██████                  32  ▁▁█▁▁▁▁▁

Health

Checks context budget usage and flags unused skills.

$ npx @crafter/skillkit health
  [████████░░] 78% metadata budget (12.5K / 16.0K)
  ! 3 skills unused in 30d - run skillkit prune

Audit

Audits one skill, multiple skill paths, or an entire repository without installing it. Reports eager metadata cost, activation cost, on-demand reference cost, bundled files, broken pointers, unreferenced files, progressive disclosure gaps, and possible description overlaps.

skillkit audit ./skills
skillkit audit ./skills/testing ./skills/release
skillkit audit ./skills --include "rn-*"
skillkit audit ./skills --json --strict

--strict is intended for CI. Token counts are local estimates based on character length.

Prune

Removes skills that haven't been used in the last 30 days.

$ npx @crafter/skillkit prune
  x scaffold (0.9K)
  x lint (2.1K)

  2 skills - 3.0K context reclaimable

  Run with --yes to confirm deletion.

Data Storage

All data stays on the machine that owns the sessions. Analytics live in that machine's ~/.skillkit/analytics.db; every agent source below is read-only. receipts --remote runs Skillkit on a Tailscale MagicDNS host and transports only its private receipt JSON, never its raw session files or database.

Supported Agents

Session connectors (skill invocations tracked from local session data):

AgentFormatSession source
Claude CodeJSONL~/.claude/projects/**/*.jsonl
OpenCodeSQLiteopencode.db (XDG data dir)
CursorJSONL~/.cursor/projects/**/*.jsonl
CodexJSONL~/.codex/sessions/**/*.jsonl
Gemini CLIJSON~/.gemini/tmp/**/chats/session-*.json
AmpJSON$XDG_DATA_HOME/amp/threads/*.json (legacy; modern Amp stores threads server-side)
ClineJSONVS Code globalStorage/saoudrizwan.claude-dev/tasks + ~/.cline/data/tasks
Roo CodeJSONVS Code globalStorage/RooVeterinaryInc.roo-cline/tasks
Kilo CodeSQLite + JSONkilo.db (XDG data dir) + legacy globalStorage tasks
ContinueJSON~/.continue/sessions/*.json
GooseSQLite + JSONLsessions.db (XDG data dir) + legacy *.jsonl
GitHub Copilot CLIJSONL~/.copilot/session-state/*/events.jsonl
OpenHandsJSON~/.openhands/{conversations,v1_conversations}
WindsurfSQLitestate.vscdb (Windsurf globalStorage)

Filter any command by agent, e.g. --claude, --opencode, --cursor.

Not trackable yet: Trae (closed-source, no documented local conversation storage). Windsurf's native Cascade trajectories (~/.codeium/windsurf/cascade/*.pb) are encrypted at rest; the connector reads the VS Code state database instead.

Skill discovery (which skills are installed where) covers all 75 agents in the skills.sh ecosystem via a vendored registry (agent-registry.generated.json, re-synced with bun run scripts/sync-agent-registry.ts).

Adding a connector

Each agent is an isometric adapter implementing the Connector interface (packages/cli/src/scanner/connector.ts): count(), scan(), plus a parse* function tested against fixtures faithful to the agent's real session schema. Register it in packages/cli/src/scanner/registry.ts - no other wiring needed.

Project Structure

skill-kit/
├── apps/web/          # Landing page (Next.js)
├── packages/cli/      # CLI and bundled version-matched skill content
└── skills/skillkit/   # Thin installable discovery stub

Development

bun install

# Run CLI locally
bun run packages/cli/src/bin.ts stats

# Run landing page
bun run --filter '@crafter/skillkit-web' dev

# Type check
bun run --filter '*' type-check

# Lint
biome check --write .

License

MIT

Files in the repo

Repository payload12 top-level entries
  • .github
  • apps
  • packages
  • scripts
  • skills
  • .gitignore
  • biome.json
  • bun.lock
  • context7.json
  • package.json
  • README.md
  • tsconfig.base.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k