skill-cleanerlisted
Install: claude install-skill Leo-maomao/pm-copilot
# Skill Cleaner
## Goal
Keep PM Copilot's skill layer small, discoverable, and safe to load by auditing prompt-budget usage, duplicate skill copies, unused candidates, and frontmatter description bloat.
## Workflow
1. Identify the roots to inspect:
- Default roots are this repository's `skills/`, `~/.codex/skills`, `~/.codex/plugins/cache`, and `~/.agents/skills` when present.
- Add extra roots with `--root <path>` when auditing archives, forks, or external skill collections.
2. Run the analyzer:
```bash
python3 skills/skill-cleaner/scripts/skill_cleaner.py --months 3
```
Useful variants:
```bash
python3 skills/skill-cleaner/scripts/skill_cleaner.py --no-logs
python3 skills/skill-cleaner/scripts/skill_cleaner.py --months 6 --max-log-mb 800
python3 skills/skill-cleaner/scripts/skill_cleaner.py --context-tokens 272000 --budget-percent 2
python3 skills/skill-cleaner/scripts/skill_cleaner.py --root /path/to/other/skills --no-logs
```
3. Read the report in this order:
- `Skill Budget`: rendered skill-list token estimate, 2% budget pressure, and minimum no-description cost.
- `Description Candidates`: long frontmatter descriptions that may be shortened without losing trigger nouns.
- `Duplicates`: same skill name or identical bodies across repo, Codex, plugin cache, and user skill roots.
- `Unused Candidates`: skills with no recent `$skill`, `SKILL.md` read, or skill-path evidence in scanned Codex logs.
- `Root Summary`: which roots supplied skills and