k-skill-cleaner
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Interview the user and inspect coding-agent skill trigger counts to recommend unused K-skills for removal.
11installs
Sourcenomadamas/k-skill
Added on
NPX Install
npx skill4agent add nomadamas/k-skill k-skill-cleanerTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →k-skill-cleaner
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.
Safety contract
- Do not delete skills automatically. Produce a ranked recommendation first, then make deletions only after the user explicitly approves the shortlist.
- Treat trigger counts as best-effort signals, not absolute truth. Different agents store transcripts differently and may rotate or omit logs.
- Protect any skill the user marks as "keep", even if its trigger count is zero.
- Prefer removing whole root-level skill directories only after checking README/docs/install references in the same change.
Interview first
Ask a compact interview before scanning or recommending deletion:
- 어떤 에이전트를 주로 쓰나요? (Claude Code, Codex, OpenCode, OpenClaw/ClawHub, Hermes Agent, 기타)
- 절대 지우면 안 되는 스킬은 무엇인가요?
- 본인이 절대로 쓰지 않는다고 확신하는 스킬은 무엇인가요?
- 최근 30/90/180일 중 어떤 기간의 사용 흔적을 우선 볼까요? helper 실행 시 또는
--days로 반영합니다.--since - 추천만 원하나요, 아니면 승인 후 실제 삭제까지 원하나요?
Trigger count sources by agent
| Agent | Where to check | Reliability | Notes |
|---|---|---|---|
| Claude Code | | best-effort | Look for skill-trigger events, |
| Codex | | best-effort | Look for routed skill names, explicit |
| OpenCode | | best-effort | If local schema differs, ask the user for an exported transcript or usage JSON. |
| OpenClaw/ClawHub | | manual-confirm | No stable public local trigger-count schema is assumed; prefer exported stats when available. |
| Hermes Agent | | manual-confirm | No stable public local trigger-count schema is assumed; prefer exported stats when available. |
Local helper
From an installed standalone skill, run the deterministic helper from the skill directory. In a full repository checkout, the compatibility wrapper at accepts the same options.
k-skill-cleanerscripts/k_skill_cleaner.pybash
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-cleanerFor agent exports or hand-curated counts, pass a JSON object mapping skill name to trigger count:
bash
python3 scripts/k_skill_cleaner.py --skills-root . --usage-json usage-counts.json --days 90--days--since--usage-jsonThe helper prints JSON with:
- : number of root-level skills discovered.
skill_count - : ranked
candidatesorremovecandidates withreviewandtrigger_count.reasons - : the agent-specific paths and caveats above.
agent_usage_sources - : the effective
time_window/--sincecutoff and mtime fallback caveat.--days - : whether imported counts were merged and the pre-windowing caveat.
usage_json - : how many readable log files were scanned and which paths contributed best-effort evidence.
scanned_logs - : reminder that no files were deleted.
safety
Recommendation policy
- : user explicitly marked the skill as never used. Mention any zero/low trigger evidence as supporting context.
remove - : trigger count is zero or below the selected low-usage threshold, but the user did not explicitly ask to remove it.
review - : user-protected skills and actively triggered skills.
keep
When reporting, group recommendations like this:
- 삭제 후보 — interview says never used, with trigger evidence.
- 검토 후보 — zero/low trigger count only.
- 보존 후보 — protected or recently used.
- 통계 한계 — which agents had no readable logs and require manual export.
If deletion is approved
- Remove the skill directory.
- Remove README table/list entries and links.
docs/features/<skill>.md - Remove entries.
docs/install.md --skill <skill> - Remove package/workspace/test references only if the skill owns those files.
- Run ,
npm run lint, andnpm run typecheck(ornpm run testfor packaging/release changes).npm run ci