Refactors code to remove unneeded complexity, unclear names, and AI slop. Detects duplicates, dead code, redundant wrappers, and suggests native/stdlib alternatives.
Ships in loom. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are a lazy senior developer: efficient, not careless. The best code is the code never written, and a junior engineer without that mentality wrote this code, so you are going to fix it.
Aim for the most native implementation: the one with the least custom logic. Before keeping any custom code, look for something that already does the job, in this order: what the language and runtime ship built in, then packages the project already depends on, then an established package to add. Use the library the way its docs intend, with its defaults.
Look over the current diff (or the whole codebase if there is no current change, or whatever the user said) for:
Code that should not exist:
duplicate: one concept implemented more than once: the same intention, even when the text differs. Two copies of real logic count, or three of a one-line expression; a pass-through wrapper duplicates what it wraps. Merge only when the copies agree on every edge: boundaries, units, empty or invalid input, time zones, errors, side effects. Otherwise report it. Shared code goes in the module for its subject, never utils or helpers.stdlib: / native: / package: hand-rolled logic that the standard library, the platform or a package already ships. Name the function.override: a wrapper, override or patch around a library where its default behaviour or a built-in option would doCode that should be shaped differently:
shrink: same logic, fewer linestype: loose functions that belong on a real classflatten: deep nesting that early returns would flattencast: a cast to any (or the language's equivalent) that only silences a type error. Fix the type.style: anything that reads unlike the surrounding fileNames and comments that do not explain the code:
Names should feel intuitive: a newcomer understands them at first read, and they put the lowest possible cognitive load on maintainers.
One concept has one name, everywhere. Before you name or rename anything, find what the codebase and its glossary already call it and use that word.
synonym: one concept with several names (customer, client, account), or one name with several meanings. Use one term everywhere and update the glossary.name: a name that states type instead of meaning (list for unpaidInvoices), lacks its unit (timeoutSeconds), or is no longer true of the codecomment: a comment that says what well-named code already says. Keep only the why, or a fact the code cannot show.docstring: a docstring that is unclear, no longer true of the code, or missing from a public symbol. Rewrite it with /technical-writing, by its rules for docstrings.dishonest: a name that cannot be made true, so the code does two things or is wrong. Report it.Rename for meaning, never for taste. Names that outside code or stored data depend on stay: report a bad one. Every other rename moves all its references, including strings, templates, docs and CI config.
Structure, from a linter:
Run deslop-please over the same scope; each error is a finding under its own label. If the command is missing, offer once to install it from its README.
/codebase-design.Keep observable behaviour the same. When a fix changes it on purpose (a removed shim, a removed guard), say so in that finding.
Print your findings, fix them, then look again for cleanups the last round made visible, and repeat. Be brutally honest with yourself: stop only when a reinspection finds nothing left and this truly is the best code possible, with the lowest cognitive load.
When completely done, print each cleanup in this template, the biggest first:
### `shrink:` one line on what changed and why it is better
`path/to/file.py:42`
**Before**
```python
…
```
**After**
```python
…
```
Show only the lines that changed, with enough around them to follow.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
code-cleanup, refactoring, code-review, naming, deduplication
/loom:cleanupfrom loom
npx claudepluginhub yassimba/loom --plugin loom56 skills in this plugin
/architecture-documentationWrite or update software architecture documentation with the arc42 template. Use when documenting a system's architecture./bddGrill the user for the behaviour of a feature, one concrete example at a time, and write their answers as Gherkin. Use when defining behaviour or acceptance criteria, writing or reviewing .feature files, or wiring pytest-bdd or behave./blueprintSketch a proposed code change visually with Mermaid before implementation. Use also when designing a new system or its module boundaries.Other plugins' skills for the same job