If you've accumulated dozens of K-skills but only use a handful, this interviews you about which agent you run, which skills are sacred, and which you know you never touch, then scans local transcripts and logs from Claude Code, Codex, OpenCode, and others to count actual trigger events over the past 30, 90, or 180 days. It ranks removal candidates by combining your answers with real usage evidence, produces a JSON report with remove/review/keep buckets, and only deletes directories after you approve the shortlist. The helper script handles agent-specific log formats and warns you when an agent has no readable local transcripts so you can export usage stats manually instead of guessing.
npx -y skills add nomadamas/k-skill --skill k-skill-cleaner --agent claude-codeInstalls into .claude/skills of the current project.
Use this skill when the user wants to slim down a K-skill bundle, find skills they never use, or make an evidence-backed deletion shortlist instead of deleting directories by guesswork.
Ask a compact interview before scanning or recommending deletion:
--days 또는 --since로 반영합니다.| Agent | Where to check | Reliability | Notes |
|---|---|---|---|
| Claude Code | ~/.claude/projects/**/*.jsonl, ~/.claude/transcripts/**/*.jsonl | best-effort | Look for skill-trigger events, $skill-name mentions, and SKILL.md loads. |
| Codex | ~/.codex/sessions/**/*.jsonl, ~/.codex/log/**/*.log, .omx/logs/**/*.log | best-effort | Look for routed skill names, explicit $skill invocations, and skill file reads. |
| OpenCode | ~/.local/share/opencode/**/*.jsonl, ~/.config/opencode/**/*.jsonl | best-effort | If local schema differs, ask the user for an exported transcript or usage JSON. |
| OpenClaw/ClawHub | ~/.openclaw/**/*.jsonl, ~/.clawhub/**/*.jsonl if present | manual-confirm | No stable public local trigger-count schema is assumed; prefer exported stats when available. |
| Hermes Agent | ~/.hermes/**/*.jsonl, ~/.config/hermes/**/*.jsonl if present | manual-confirm | No stable public local trigger-count schema is assumed; prefer exported stats when available. |
From an installed standalone skill, run the deterministic helper from the k-skill-cleaner skill directory. In a full repository checkout, the compatibility wrapper at scripts/k_skill_cleaner.py accepts the same options.
python3 scripts/k_skill_cleaner.py \
--skills-root . \
--scan-default-logs \
--days 90 \
--never-use blue-ribbon-nearby,lotto-results \
--keep k-skill-setup,k-skill-cleaner
For agent exports or hand-curated counts, pass a JSON object mapping skill name to trigger count:
python3 scripts/k_skill_cleaner.py --skills-root . --usage-json usage-counts.json --days 90
--days and --since filter scanned log records only. --usage-json values are already-aggregated counts, so prepare/export that JSON for the same time window before passing it to the helper.
The helper prints JSON with:
skill_count: number of root-level skills discovered.candidates: ranked remove or review candidates with trigger_count and reasons.agent_usage_sources: the agent-specific paths and caveats above.time_window: the effective --since/--days cutoff and mtime fallback caveat.usage_json: whether imported counts were merged and the pre-windowing caveat.scanned_logs: how many readable log files were scanned and which paths contributed best-effort evidence.safety: reminder that no files were deleted.remove: user explicitly marked the skill as never used. Mention any zero/low trigger evidence as supporting context.review: trigger count is zero or below the selected low-usage threshold, but the user did not explicitly ask to remove it.keep: user-protected skills and actively triggered skills.When reporting, group recommendations like this:
docs/features/<skill>.md links.docs/install.md --skill <skill> entries.npm run lint, npm run typecheck, and npm run test (or npm run ci for packaging/release changes).juliusbrussee/caveman
mattpocock/skills
shadcn/improve
obra/superpowers
forrestchang/andrej-karpathy-skills
vercel-labs/skills