skills/skill-cleaner/SKILL.md
Improves how an existing skill reads and flows — tightens wording, removes redundancy, fixes structure, and resolves instructions that contradict each other across sections — so it's easy to follow for both humans and the agent executing it. Reducing length is incidental, not the aim; a skill that's long because it carries important detail can stay long. Edits the skill in place, then reports what changed and why. Use when the user asks to "clean up", "simplify", "tighten", "refactor", or "improve the flow/structure" of a skill, says it's "too long", "bloated", "cumbersome", "hard to follow", or "has conflicting instructions", or when another skill (e.g. skill-improver) flags a target for a cleanup pass. Also use when the user wants a second opinion on whether a skill reads well or is doing too much.
npx skillsauth add ilamanov/skills skill-cleanerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A focused editing pass over a single skill. The goal is a version that reads easily and flows well — for both a human and the agent executing it — with no instructions that contradict each other, while staying thorough and protecting every behavior. Often that means less prose, but not always: a skill that's long because it carries genuinely important information should stay that way. Length is not the enemy — confusion is. Tightening wordy passages, fixing structure that reads out of order, and reconciling instructions that fight across sections all serve that goal. Raw line-count reduction is a side effect, never the objective.
Skills accrete over time. Each incident adds a sentence, each correction adds a hedge, each new edge case adds a paragraph. After enough rounds the skill grows past the point where the model can hold it all in working memory, and ironically starts following it worse than the original draft. This skill is the counterweight: an honest pass that asks of every line "is this still pulling its weight?"
Accretion also breeds contradictions: a fix bolted onto a late step can quietly conflict with a rule written for an early one, or a "see the X skill / see Step Y" pointer can lead somewhere that undercuts the instruction that sent you there. Those are the most damaging defects to leave in — the agent can't tell which instruction wins, so it guesses, and the guess is what ships. Finding and resolving them matters as much as trimming filler.
The user (or calling skill) names a target skill — usually by path (skills/<name>/SKILL.md) or short name (ship, ticket, etc.). If only a short name is given, find it under skills/ at the repo root. If multiple skills are named, clean them one at a time and produce one report per skill.
If the target is in .agents/skills/ or .claude/skills/, stop and tell the user. Those are external meta-skills installed via npx skills update and any edit will be overwritten on the next update. They are out of scope.
Self-cleanup is supported and expected. skills/skill-cleaner/SKILL.md is a valid target like any other user-owned skill — if the user asks you to clean yourself, or if skill-improver's cleanup mode (see skill-improver Step 4b) picks this skill as the candidate, run the same workflow on it. The one wrinkle: you're reading the instructions and editing the file those instructions live in. Read the whole file into context before making the first edit so subsequent edits aren't operating on a stale view, and re-read the relevant section if you're more than a couple of edits in. Otherwise the process is identical — Step 0 still applies (consult skill-creator), the same trim/keep criteria apply, and the report goes back to the user (or caller) the same way. Self-cleanup tends to be the highest-leverage cleanup: every other skill in the repo is judged through these criteria, so keeping this skill itself tight directly affects every future cleanup pass.
Before judging the target skill, read .agents/skills/skill-creator/SKILL.md — specifically the "Skill Writing Guide" and "Writing Style" sections. That's the house style this repo's skills are meant to follow: explain the why behind instructions, avoid stacks of MUST/NEVER, keep prompts lean, prefer reframing over heavy-handed constraints, bundle scripts for repeated work, use progressive disclosure for large reference files. Those principles are exactly what you're enforcing — if you don't have them fresh, you'll either trim too aggressively (cutting why explanations because they look like filler) or not aggressively enough (leaving MUST stacks alone because they "look authoritative").
If .agents/skills/skill-creator/ isn't present in this repo, fall back to what the user describes as the house style, but flag in the report that you ran without the canonical reference.
Read SKILL.md end to end, plus any bundled scripts/, references/, or assets/ referenced from it. You can't judge whether a paragraph is redundant until you know what else the skill (and its supporting files) already say. Pay attention to:
description — this is load-bearing for triggering and almost never the right thing to shorten.git log -p -- skills/<name>/SKILL.md). Recent additions are often defensive reactions to a specific incident — those have a why you don't want to trim away.Walk through the skill and form an opinion on each chunk. The categories below are what to look for. Note them — don't act yet.
Trim candidates (usually safe to remove or shorten):
Conflicts & flow problems (the highest-value things to catch — fix these):
Restructure candidates — you have real latitude here. Moving a section up or down, merging two, or splitting one is fully in scope whenever it makes the skill easier to read or easier for the agent to execute. Don't leave a known flow problem in place just to preserve the existing order. Look for:
When a move clearly improves the reading or execution order, make it. Two things to respect while you do: keep every cross-reference working (a "see Step N" or a section referenced by name must still resolve after the move — fix both ends), and reorder for a genuine reading/comprehension win, never for taste. A reorder that just shuffles already-fine sections is wasted churn.
Do not touch:
name: field in frontmatter.description: field unless it's literally wrong or contains stale references — triggering accuracy lives there, and shortening it usually makes triggering worse, not better.Apply the trims directly to SKILL.md (and any bundled files if applicable). Use the Edit tool, not Write — preserve everything you're not actively changing.
Guidelines while editing:
Before reporting, scan the diff and check:
If anything is off, fix it before writing the report.
After the edits, produce a report. Concise but specific — the user needs to be able to skim it and immediately spot anything they disagree with so they can revert. Use this structure:
## Cleaned: skills/<name>/SKILL.md
**Reads better because:** <one-line summary of the net effect on flow, clarity, and consistency — this is the headline>
**Size:** <before> → <after> words/lines (secondary — note it, don't lead with it; "no net reduction, and that's fine" is a valid line)
### Conflicts resolved
- <the contradiction or astray-pointer you found, with the two sections involved> — <how you reconciled it, and which rule won>
(omit this section entirely if none were found)
### What got tightened
- <one-line description of the change> — <one-line why>
- ...
### What got removed
- <what was cut, with a short verbatim snippet or section name> — <why it wasn't pulling its weight>
- ...
(omit this section entirely if nothing was removed)
### What got restructured
- <what moved or merged> — <why it reads better this way>
(omit this section entirely if nothing was restructured)
### Left alone on purpose
- <anything you considered trimming but decided to keep> — <why>
(use this for non-obvious calls — don't list every untouched paragraph; the point is to show the user where you exercised restraint so they trust the calls you did make)
### Notes
- <anything you noticed but didn't act on — e.g. a workflow bug, an outdated reference, a section that might be a candidate for promotion to a separate skill>
(omit if nothing to flag)
The "Left alone on purpose" section is the most important part of the report for trust-building. If you considered removing a paragraph but kept it because it explains the why behind a safety check, say so — that tells the user you read carefully and made deliberate calls, not just a mechanical word-count pass.
If invoked by skill-improver (or any other automation) rather than directly by a human:
A good run usually:
A bad run:
If a target skill is genuinely fine, that's a successful run too. Say so and stop.
tools
Generally-applicable conventions for how code is written and arranged — tooling/package manager, import style, file & component naming, comments, and where files live (colocation vs. global folders). Use whenever creating, naming, moving, or importing a file, running project commands, or deciding where a new module belongs. Consult BEFORE writing the code so the conventions are baked in, not retrofitted. If a convention below matches the work, apply it — don't ask, just follow it (call out the choice in one line so the user can override).
development
Generally-applicable frontend/UI best practices. Use whenever building, modifying, or reviewing UI — adding a form/button/dialog/modal, wiring keyboard shortcuts, creating any interactive surface that submits a form, or any time TSX/JSX is being written or edited. Consult BEFORE writing the code so the patterns are baked in, not retrofitted. If a scenario described in the skill body matches the work, apply the pattern — don't ask, just follow it (call out the choice in one line so the user can override).
tools
Generally-applicable backend/data best practices. Use whenever writing or modifying backend/data code — API routes, server actions, DB writes, background jobs, agent tools, import flows, webhooks, paste handlers, or anywhere data enters the system. Consult BEFORE writing the code so the patterns are baked in, not retrofitted. If a scenario described in the skill body matches the work, apply the pattern — don't ask, just follow it (call out the choice in one line so the user can override).
development
Runs on a schedule to mine recent Codex and Claude Code conversations across configured projects, find moments where things went off plan (the user had to steer, correct, abort, or re-explain), and propose targeted improvements to the specific skills that were in use at the time. Opens one pull request per run against the skills repo, with each proposed edit annotated with the concrete steering moment that motivated it. Also analyzes its own runs (the `skills` repo is one of the configured projects) so it iteratively improves itself. Use this skill when the user asks to "analyze recent conversations", "find what went wrong", "improve skills based on past runs", or sets up a scheduled run of skill-improver. Make sure to use this skill whenever the user mentions recursive skill improvement, post-mortem analysis of agent conversations, or automating skill quality based on real usage.