{"id":50412294,"url":"https://github.com/cskwork/skill-usage-stats","last_synced_at":"2026-05-31T04:04:52.853Z","repository":{"id":360452808,"uuid":"1250213315","full_name":"cskwork/skill-usage-stats","owner":"cskwork","description":"Audit Claude Code and Codex skill usage from local transcripts; interactive dashboard with KEEP/REVIEW/DELETE verdicts and a reversible archive workflow. Site: https://cskwork.github.io/skill-usage-stats/","archived":false,"fork":false,"pushed_at":"2026-05-26T12:45:48.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T14:24:41.778Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cskwork.github.io/skill-usage-stats/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cskwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-26T12:13:54.000Z","updated_at":"2026-05-26T12:45:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cskwork/skill-usage-stats","commit_stats":null,"previous_names":["cskwork/skill-usage-stats"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cskwork/skill-usage-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fskill-usage-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fskill-usage-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fskill-usage-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fskill-usage-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cskwork","download_url":"https://codeload.github.com/cskwork/skill-usage-stats/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fskill-usage-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33718494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-31T04:04:51.887Z","updated_at":"2026-05-31T04:04:52.841Z","avatar_url":"https://github.com/cskwork.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# skill-usage-stats\n\nTwo cross-platform (macOS / Linux / Windows) skills that answer two simple questions about your Claude Code and Codex installations:\n\n1. **Which skills do I actually use?**\n2. **Which ones can I safely clean up?**\n\nBoth work entirely offline against your local transcript history — no telemetry, no network calls.\n\n---\n\n## Why this exists\n\nAfter installing dozens of marketplace skills, plugins, and personal scripts, the catalog gets noisy fast. Auto-triggered skills load through `Read` or shell access to `SKILL.md` (not always through the explicit `Skill` tool), so a simple grep undercounts. This pair:\n\n- Scans every Claude Code transcript (`~/.claude/projects/**/*.jsonl`) and Codex session (`~/.codex/sessions/**/*.jsonl`).\n- Reconciles invocations against the on-disk skill catalog: global, project, plugin (marketplaces + cache), Codex skills, Codex prompts.\n- Renders an interactive HTML dashboard you can sort, filter, and export from.\n- Provides a reversible archive workflow — never deletes, just renames `SKILL.md` so the harness stops surfacing it.\n\n---\n\n## What gets counted\n\n| Source | Pattern detected |\n|---|---|\n| Claude Code explicit | `tool_use` with `name=\"Skill\"`, `input.skill=\u003cname\u003e` |\n| Claude Code slash command | `\u003ccommand-name\u003e/name\u003c/command-name\u003e` in user messages only |\n| Claude Code auto-trigger | `Read` of `*/skills/\u003cname\u003e/SKILL.md` |\n| Claude Code shell auto-trigger | `Bash` command containing `*/skills/\u003cname\u003e/SKILL.md` |\n| Codex slash command | User `input_text` whose first line is `/name` |\n| Codex auto-trigger | `function_call(exec_command/shell)` arguments containing `*/skills/\u003cname\u003e/SKILL.md` |\n\nEach event credits the skill once. Source is decided from the `SKILL.md` path containing `.claude` vs `.codex`. Same-named skills across global / project / plugin are merged into one row with summed count and a list of sources.\n\n---\n\n## Install\n\n```bash\ngit clone https://github.com/cskwork/skill-usage-stats.git\ncd skill-usage-stats\n\n# macOS / Linux\ncp -R skills/skill-usage-stats ~/.claude/skills/\ncp -R skills/skill-cleanup     ~/.claude/skills/\n\n# Windows (PowerShell)\nCopy-Item -Recurse skills/skill-usage-stats $HOME\\.claude\\skills\\\nCopy-Item -Recurse skills/skill-cleanup     $HOME\\.claude\\skills\\\n```\n\nBoth skills auto-trigger from natural-language phrases (Korean / English), or you can invoke them directly via `python3` (see below).\n\n---\n\n## skill-usage-stats — usage\n\n```bash\n# Generate the HTML dashboard (default: scan all transcripts, open in browser)\npython3 ~/.claude/skills/skill-usage-stats/analyze.py\n\n# Flags\n#   --days N          only count invocations in the last N days\n#   --project \u003csubstr\u003e restrict to transcripts whose cwd matches\n#   --out \u003cpath\u003e      output HTML path (default: ~/.claude/skill-stats.html)\n#   --no-open         generate but don't open the browser\n\n# Terminal-only views (after the HTML exists)\npython3 ~/.claude/skills/skill-usage-stats/summary.py overview\npython3 ~/.claude/skills/skill-usage-stats/summary.py top -n 20\npython3 ~/.claude/skills/skill-usage-stats/summary.py zero\npython3 ~/.claude/skills/skill-usage-stats/summary.py stale --days 90\n```\n\nDashboard columns: `name · verdict · sources · count · sessions · last used · days since · size (KB) · description`.\n\nThe `verdict` column auto-classifies each skill as **KEEP / REVIEW / DELETE** with a one-line reason:\n\n| Verdict | Rule |\n|---|---|\n| `KEEP` | count \u003e 0 and last used ≤ 90 days, **or** never used but installed ≤ 30 days (recent install, likely intentional) |\n| `REVIEW` | never used but installed 31–60 days ago, or used long ago (≤ 180 days) |\n| `DELETE` | never used and installed \u003e 60 days, or last used \u003e 180 days |\n\nUse the filters at the top of the dashboard (only KEEP / REVIEW / DELETE, only zero-use, only stale) to drill into a decision view.\n\n---\n\n## skill-cleanup — usage\n\n```bash\n# Always dry-run by default\npython3 ~/.claude/skills/skill-cleanup/archive.py\n\n# Apply (move skills under ~/.claude/skills-archive/\u003csource\u003e/\u003cname\u003e/)\npython3 ~/.claude/skills/skill-cleanup/archive.py --apply\n\n# Wider criteria\npython3 ~/.claude/skills/skill-cleanup/archive.py --verdict DELETE,REVIEW --days 90 --apply\n\n# Restrict to one source\npython3 ~/.claude/skills/skill-cleanup/archive.py --source claude-project --apply\n\n# Reversible\npython3 ~/.claude/skills/skill-cleanup/archive.py list-archive\npython3 ~/.claude/skills/skill-cleanup/archive.py restore \u003cskill-name\u003e\n```\n\n### Archive guarantees\n\n- **Never deletes**. Skills are moved under `~/.claude/skills-archive/\u003csource\u003e/\u003cname\u003e/` (or `~/.codex/skills-archive/...`).\n- **Renames `SKILL.md` → `SKILL.md.archived`** inside the archived directory. Since the harness only auto-discovers `SKILL.md`, the agent loses access to that skill, but every file is recoverable.\n- **Single-file prompts** (e.g. `~/.codex/prompts/\u003cname\u003e.md`) are wrapped in a `\u003csource\u003e/\u003cstem\u003e/` directory with the file renamed to `\u003cname\u003e.md.archived`, keeping the same restore semantics as directory-based skills.\n- Writes `.archived-meta.json` next to each archived skill with the original path, archive date, and stats-report reason.\n- Refuses to operate on `~/.claude/plugins/cache/...` — those are managed by the marketplace and would be re-installed.\n- Restore is a single command; the dry-run mode lets you preview every move before committing.\n\n---\n\n## Cross-platform notes\n\n- Tested on macOS. Pure stdlib Python 3.10+ — should work on Linux and Windows.\n- Path-comparison logic normalizes backslashes to forward slashes, so Windows-style logged paths in transcripts match correctly.\n- HTML is opened via `Path.as_uri()`, which produces a valid file URI on all platforms.\n\n---\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcskwork%2Fskill-usage-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcskwork%2Fskill-usage-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcskwork%2Fskill-usage-stats/lists"}