k-skill-cleaner
nomadamas/k-skill
Interview-driven skill auditor that identifies and safely removes unused K-skills based on trigger counts.
What is k-skill-cleaner?
k-skill-cleaner helps you declutter your K-skill bundle by interviewing you about usage patterns, scanning agent logs for trigger evidence, and producing a ranked deletion recommendation before any files are removed. Use it when you want to identify and safely remove skills you no longer use.
- Conducts a structured interview to understand your agent setup, protected skills, and time window for analysis
- Scans agent-specific log directories (Claude Code, Codex, OpenCode, OpenClaw, Hermes) for skill trigger counts
- Ranks skills as remove/review/keep candidates with supporting evidence from trigger counts
- Generates a JSON report with skill statistics, recommendations, and safety reminders before deletion
- Supports both local log scanning and imported usage JSON for manual or exported trigger counts
- Executes approved deletions with cleanup of README entries, docs links, and package references
How to install k-skill-cleaner
npx skills add https://github.com/nomadamas/k-skill --skill k-skill-cleaner- Python 3.6+
- Access to your coding agent's local log directories (or exported usage JSON)
- K-skill bundle or repository with root-level skill directories
How to use k-skill-cleaner
- 1.Run the skill and answer the compact interview questions about your primary agent, protected skills, and time window
- 2.Review the generated JSON report showing skill counts, candidates ranked by trigger evidence, and agent-specific caveats
- 3.Examine the remove/review/keep groupings and any agents with no readable logs that require manual export
- 4.Approve the deletion shortlist explicitly before proceeding
- 5.Run the helper with --skill names to execute deletions, which will remove directories and clean up README/docs/package references
- 6.Run npm run lint, typecheck, and test to verify the repository integrity after deletion
Use cases
- Reduce a large K-skill bundle to only the skills you actively use, based on trigger evidence from the past 30/90/180 days
- Identify zero-trigger skills that are safe candidates for removal without guesswork
- Audit which agent (Claude Code, Codex, OpenCode, etc.) is actually using your installed skills
- Prepare a deletion shortlist for team review before removing skills from a shared repository
- Export usage statistics from your agent and import them for analysis across multiple machines
- Developers managing large K-skill collections who want data-driven cleanup
- Teams maintaining shared K-skill repositories and needing evidence-based removal decisions
- Users of multiple coding agents (Claude Code, Codex, OpenCode, OpenClaw, Hermes) who want unified skill auditing
- Anyone concerned about accidentally deleting actively-used skills and wanting a safety-first workflow
k-skill-cleaner FAQ
No. k-skill-cleaner produces a ranked recommendation first and only executes deletions after you explicitly approve the shortlist. It treats trigger counts as best-effort signals, not absolute truth.
Claude Code, Codex, OpenCode, OpenClaw/ClawHub, and Hermes Agent. Each has different log locations and reliability levels. If an agent has no readable logs, you can export usage counts as JSON and import them.
You can specify --days 30, 90, or 180 (or use --since with a date) to filter log records. The helper respects your time window when scanning logs and aggregating trigger counts.
Mark them as 'keep' during the interview or pass them via --keep flag. The skill will protect them from removal recommendations even if their trigger count is zero.
The skill removes the skill directory and cleans up README table entries, docs/features links, docs/install.md entries, and package/workspace references. It then runs npm lint, typecheck, and test to verify integrity.
Full instructions (SKILL.md)
Source of truth, from nomadamas/k-skill.
name: k-skill-cleaner description: Interview the user and inspect coding-agent skill trigger counts to recommend unused K-skills for removal.
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 | ~/.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. |
Local helper
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: rankedremoveorreviewcandidates withtrigger_countandreasons.agent_usage_sources: the agent-specific paths and caveats above.time_window: the effective--since/--dayscutoff 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.
Recommendation policy
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:
- 삭제 후보 — 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
docs/features/<skill>.mdlinks. - Remove
docs/install.md --skill <skill>entries. - Remove package/workspace/test references only if the skill owns those files.
- Run
npm run lint,npm run typecheck, andnpm run test(ornpm run cifor packaging/release changes).
Related skills
More from nomadamas/k-skill and the wider catalog.

k-skill-setup
Configure credentials, verify runtime, and optionally enable update checks and GitHub starring for k-skill.

kakao-bar-nearby
Find nearby bars on Kakao Map by location, showing open status, menus, seating, and phone numbers.

kakao-map
Kakao Local (장소 검색·주소-좌표 변환) + Kakao Mobility (자동차 길찾기) 를 k-skill-proxy 경유로 조회한다. 사용자 키 불필요.

kakaotalk-mac
Search local KakaoTalk archives on Apple Silicon macOS using the katok CLI.

kbl-results
Query Korean professional basketball (KBL) game results and team standings by date or team.

kbo-results
Fetch KBO game schedules and results for any date using the kbo-game package.