$npx -y skills add transilienceai/communitytools --skill skill-pruneIdentify and remove negative-ROI skill content — orphan files, never-read entries, duplicates, content reintroducing challenge-specific lore. Inverse of /skill-update. Use during quarterly maintenance or after the linter flags issues.
| 1 | # Skill Prune |
| 2 | |
| 3 | Inverse of `/skill-update`. Removes content rather than adding it. Run during quarterly maintenance, after engagements, or when `scripts/skill_linter.py` reports orphans / duplicates. |
| 4 | |
| 5 | ## When to invoke |
| 6 | |
| 7 | - Quarterly cadence. |
| 8 | - After `scripts/skill_linter.py --check-orphans` reports orphan reference files. |
| 9 | - After a SKILL.md or reference file grows past its cap and needs trimming. |
| 10 | - After a de-specialization sweep, to drop content tied to retired challenges. |
| 11 | |
| 12 | ## Prune criteria (the four signals — same shape as /skill-update, inverted) |
| 13 | |
| 14 | A reference / scenario / line is a **prune candidate** when it satisfies any of: |
| 15 | |
| 16 | 1. **Orphan** — not linked from any SKILL.md or other reference file in the last 60 days. |
| 17 | 2. **Referenced only by failed engagements** — appeared in `attack-chain.md` of runs that ended `status=BLOCKED`, never in a successful chain. |
| 18 | 3. **Contradicted by newer content** — a later scenario / pattern supersedes it; the older entry no longer reflects current technique. |
| 19 | 4. **Redundant with newer content** — same technique covered more clearly elsewhere. |
| 20 | |
| 21 | Removing content fails any of these → keep it. |
| 22 | |
| 23 | ## Safety rules |
| 24 | |
| 25 | - **Never** prune a file with `<!-- KEEP: <reason> -->` annotation. |
| 26 | - **Never** prune content cited in a still-open engagement's `OUTPUT_DIR/attack-chain.md`. |
| 27 | - **Never** prune the canonical-home file for a single-owner rule (brute-force, output-discipline, env-reader, skill-update). |
| 28 | - Bias toward keeping technique-rich content over operational lore. |
| 29 | |
| 30 | ## Procedure |
| 31 | |
| 32 | 1. Run `scripts/skill_linter.py --check-orphans` to surface orphans. |
| 33 | 2. For each candidate file or block, evaluate the four signals. |
| 34 | 3. Build a deletion plan — show files / lines to remove with one-line rationale per item. |
| 35 | 4. Apply deletions only after the plan is approved (skill-prune does not auto-delete during invocation). |
| 36 | 5. Re-run `scripts/skill_linter.py` to confirm the change broke no other links and didn't reintroduce duplicates. |
| 37 | |
| 38 | ## Output |
| 39 | |
| 40 | Concise change report: |
| 41 | |
| 42 | - **Removed.** File or block + one-line rationale per item. |
| 43 | - **Kept (flagged for follow-up).** Items that failed all four signals but are worth revisiting next quarter. |
| 44 | - **No prunes.** State explicitly when nothing warranted removal. |
| 45 | |
| 46 | ## Anti-Patterns |
| 47 | |
| 48 | - Pruning content because it's old — age alone is not a signal; relevance is. |
| 49 | - Pruning a reference because its parent SKILL.md is bloated — fix the SKILL.md instead. |
| 50 | - Removing a single-owner canonical file (brute-force / output-discipline / env-reader). |
| 51 | - Pruning during an active engagement that may still cite the content. |