Deslop
AI-assisted development leaves three kinds of slop. Code slop compiles but
reads as machine-written. Product slop ships but feels unfinished to a
paying customer. Prose slop is writing with AI tells: puffery, em-dash
habits, chatbot phrases, voiceless neutrality. This skill removes all three.
Code slop is the default. --product adds the product pass. prose runs the
writing pass. ui runs only the design-system pass.
Edits and removes code, so it runs behind a confirmation gate and prefers the
branch diff. For a read-only pass that only flags, use structural-review /
/review. For a layered doc standard (Diátaxis, STE, Global English), use
technical-writing and then apply the prose catalog here.
Other skills that need the prose catalog point at
references/prose-slop.md. They do not fire this
skill.
Authorized Scope
Apply this engine only within the user's requested task and existing explicit
authorization. Loading or delegating to it grants no additional authority.
Preserve report-only restrictions and the caller's target, host, provider, and
cost limits. Existing approval satisfies a gate only for the same actions and
scope; obtain approval before expanding them. Forward these limits to delegates.
Contract
Inputs:
- A package, repo, or prose surface to clean; optional scope (
--changed,
all, dry-run) and dimension (--product, ui, prose).
Outputs:
- Applied edits (or, in
dry-run, a grouped report of what would change), plus
a short count of artifacts removed by type.
Creates/Modifies:
- Edits source files or named prose. Never deletes entry points, configs, or
READMEs.
External Side Effects:
- None beyond local file edits. Runs type-check and tests after code edits.
Confirmation Required:
- Before sweeping the whole tree (
all) or rewriting product copy whose intent
is ambiguous.
Delegates To:
polish for the final micro-detail pass after the structural slop is gone.
refactor-code when a fix is a real refactor, not a mechanical strip.
technical-writing when the ask is a docs, RFC, README, PR, or commit
standard rather than a slop strip.
Code slop (default)
Remove, matching the surrounding file's existing style:
- Console statements → the project logger.
any types → real types or unknown + a type guard.
- Unused imports / variables → delete.
- Commented-out code → delete (git remembers it).
- Debug / temporary code → delete leftover TODO/FIXME debug lines.
- Redundant comments — remove those that restate what; keep those that
explain why.
- Needless defensive checks — drop try-catch and null guards on trusted
internal paths that cannot fail; keep guards on real external boundaries.
- Over-nesting — collapse deep if/else pyramids into early returns.
Prose slop (prose)
When the first argument is prose, or when the target is a reply, README,
RFC, PR description, commit message, or other writing surface, apply
references/prose-slop.md.
- Scan for the 31 patterns.
- Rewrite. Preserve meaning. Match intended tone.
- Add soul: opinions, varied rhythm, specific facts.
- Self-audit: "What makes this obviously AI generated?" Fix remaining tells.
--product copy cleanup also runs this catalog. Do not invent product voice
when the intended copy is unclear; flag it.
Product slop (--product)
The layer that decides whether an app feels finished. See
references/product-slop.md for the full Incorrect
→ Correct catalog; the three families:
- Copy — marketing filler, generic AI phrasing, empty-states and error
messages that say nothing useful. Run the prose catalog on every string.
- UI — the untouched-shadcn-plus-purple-gradient look, inconsistent
spacing/radius, loading and error states left unstyled or absent.
- UX — buttons wired to nothing, flows that dead-end, placeholder pages
behind real-looking nav, forms with no validation or success feedback.
Product slop needs judgment, not just deletion. Flag anything ambiguous rather
than guessing at intended copy or behavior.
UI slop (ui)
When the first argument is ui, run only the UI pass. Do not run the code
cleanup workflow first.
Do not encode component-specific styling rules in this skill. Derive them from
the target project.
Before judging taste, inspect the local source of truth:
- Design docs, tokens, theme files, CSS variables, Tailwind config, or equivalent.
- Shared UI primitives such as cards, buttons, inputs, dialogs, tables, tabs,
nav, badges, tooltips, menus, and loading states.
- Three nearby good examples in the same app or package.
- The target screen/component code and rendered output when available.
Create a short working inventory:
- Approved tokens and spacing/radius/shadow patterns.
- Shared primitives and their variants.
- UI-role map for the audited surface: primitive, documented recipe, or missing.
- Local examples that already look production-ready.
- Target files and routes affected.
For each UI role present on the audited surface, identify whether the project
has a shared primitive or documented recipe:
- Surface, card, panel.
- Button or action.
- Link or navigation.
- Input, select, textarea.
- Checkbox, radio, switch.
- Badge or status.
- Modal, dialog, drawer, popover, tooltip.
- Table, list, grid.
- Tabs or segmented controls.
- Empty, loading, error states.
- App shell, navigation, layout sections.
If a primitive exists:
- Use it instead of raw HTML, copied markup, or local styling.
- Use only its public props, variants, slots, and documented composition
patterns.
- Do not override its core visual contract from call sites: background, border,
radius, shadow, typography, spacing, focus, disabled, loading, or state
styling.
- If the needed variant does not exist, add a named variant to the primitive
only when the need is clear and reusable. Otherwise defer with a finding.
If no primitive exists:
- Follow the documented design recipe or the strongest nearby local pattern.
- If the same recipe appears repeatedly, recommend extracting a primitive or
named variant.
- Do not invent a one-off visual treatment unless the user explicitly requested
a bespoke design.
Raw semantic HTML is fine for document structure and prose. Raw HTML is not
fine when it is acting as a design-system control or surface.
Fix objective design-system drift before subjective taste. Keep changes scoped
to the audited surface and defer product-judgment calls with a concrete finding
instead of inventing intent.
Workflow
Route mode — ui runs the UI pass and stops. prose runs the prose
catalog and stops. --product adds product + prose after code slop.
Detect structure — monorepo vs single package
(ls packages/ 2>/dev/null). Process each package separately.
Scope — in --changed, limit edits to the branch diff:
BASE="$(git merge-base HEAD origin/HEAD 2>/dev/null || git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)"
git diff --name-only "$BASE"..HEAD # files this branch touched
Touch only those files/hunks; do not clean pre-existing slop elsewhere in
this mode.
Strip by the categories above.
Verify — a code change must still build and pass:
bun run type-check || bunx tsc --noEmit
bun run test
Document — log packages cleaned and per-type counts in the current
repository's session log when one exists.
Modes
- default — code slop, current package, edits applied.
ui — run the UI/design-system primitive pass.
prose — run the writing-tell catalog only.
--changed — only the files/hunks this branch introduced (safest for a PR).
--product — add the product-slop pass (copy/UI/UX) and the prose catalog.
all — sweep every package in a monorepo, each processed separately.
dry-run — detect only; report every artifact grouped by type with
counts, edit nothing. Combines with any scope.
Anti-Patterns
- Cleaning the whole tree when a branch scope was meant —
--changed
keeps a PR reviewable; whole-tree edits need confirmation.
- Deleting side-effect imports (CSS, polyfills) or critical files
(README, configs, entry points).
- Removing a "why" comment because it looks redundant — only
what-restating comments go.
- Guessing at product copy or intended behavior — flag ambiguous product
slop for the user instead of inventing a fix.
- Rewriting logic under the banner of cleanup — a behavior change is a
refactor (
refactor-code), not deslop.
- Leaving voiceless prose after the strip — sterile writing is still slop.
Deslop procedure
Read deslop procedure for the code mode only.
Apply the authorized scope and mode of this entry point to every step.
Resolve other skills through this distribution’s active catalog; resolve
resources relative to the installed skill directory.
Unslop procedure
Read unslop procedure for prose mode or the prose portion of product cleanup only.
Apply the authorized scope and mode of this entry point to every step.
Resolve other skills through this distribution’s active catalog; resolve
resources relative to the installed skill directory.
1---2name: deslop3description: Strip AI-generated slop from a codebase, product, and prose. Code slop — console statements, `any` types, unused imports, commented-out code, redundant comments, needless defensive try-catch on trusted paths, over-nesting. Product slop (with --product) — marketing-filler copy, generic AI phrasing, default-shadcn look, unstyled loading/error states, dead buttons and half-wired flows. UI slop (`ui`) runs a project-derived design-system primitive pass. Prose slop (`prose`) cuts AI tells from writing. Can scope to the current branch's diff or sweep the whole tree. Use when asked to clean up AI-generated code, unslop writing, remove slop, or make an app feel finished before shipping to customers.4---5
6# Deslop
7
8AI-assisted development leaves three kinds of slop. **Code slop** compiles but
9reads as machine-written. **Product slop** ships but feels unfinished to a
10paying customer. **Prose slop** is writing with AI tells: puffery, em-dash
11habits, chatbot phrases, voiceless neutrality. This skill removes all three.
12Code slop is the default. `--product` adds the product pass. `prose` runs the
13writing pass. `ui` runs only the design-system pass.
14
15Edits and removes code, so it runs behind a confirmation gate and prefers the
16branch diff. For a read-only pass that only flags, use `structural-review` /
17`/review`. For a layered doc standard (Diátaxis, STE, Global English), use
18`technical-writing` and then apply the prose catalog here.
19
20Other skills that need the prose catalog point at
21[references/prose-slop.md](references/prose-slop.md). They do not fire this
22skill.
23
24## Authorized Scope
25
26Apply this engine only within the user's requested task and existing explicit
27authorization. Loading or delegating to it grants no additional authority.
28Preserve report-only restrictions and the caller's target, host, provider, and
29cost limits. Existing approval satisfies a gate only for the same actions and
30scope; obtain approval before expanding them. Forward these limits to delegates.
31
32## Contract
33
34Inputs:
35
36- A package, repo, or prose surface to clean; optional scope (`--changed`,
37 `all`, `dry-run`) and dimension (`--product`, `ui`, `prose`).
38
39Outputs:
40
41- Applied edits (or, in `dry-run`, a grouped report of what would change), plus
42 a short count of artifacts removed by type.
43
44Creates/Modifies:
45
46- Edits source files or named prose. Never deletes entry points, configs, or
47 READMEs.
48
49External Side Effects:
50
51- None beyond local file edits. Runs type-check and tests after code edits.
52
53Confirmation Required:
54
55- Before sweeping the whole tree (`all`) or rewriting product copy whose intent
56 is ambiguous.
57
58Delegates To:
59
60- `polish` for the final micro-detail pass after the structural slop is gone.
61- `refactor-code` when a fix is a real refactor, not a mechanical strip.
62- `technical-writing` when the ask is a docs, RFC, README, PR, or commit
63 standard rather than a slop strip.
64
65## Code slop (default)
66
67Remove, matching the surrounding file's existing style:
68
691. **Console statements** → the project logger.
702. **`any` types** → real types or `unknown` + a type guard.
713. **Unused imports / variables** → delete.
724. **Commented-out code** → delete (git remembers it).
735. **Debug / temporary code** → delete leftover TODO/FIXME debug lines.
746. **Redundant comments** — remove those that restate *what*; keep those that
75 explain *why*.
767. **Needless defensive checks** — drop try-catch and null guards on trusted
77 internal paths that cannot fail; keep guards on real external boundaries.
788. **Over-nesting** — collapse deep if/else pyramids into early returns.
79
80## Prose slop (`prose`)
81
82When the first argument is `prose`, or when the target is a reply, README,
83RFC, PR description, commit message, or other writing surface, apply
84[references/prose-slop.md](references/prose-slop.md).
85
861. Scan for the 31 patterns.
872. Rewrite. Preserve meaning. Match intended tone.
883. Add soul: opinions, varied rhythm, specific facts.
894. Self-audit: "What makes this obviously AI generated?" Fix remaining tells.
90
91`--product` copy cleanup also runs this catalog. Do not invent product voice
92when the intended copy is unclear; flag it.
93
94## Product slop (`--product`)
95
96The layer that decides whether an app feels finished. See
97[references/product-slop.md](references/product-slop.md) for the full Incorrect
98→ Correct catalog; the three families:
99
100- **Copy** — marketing filler, generic AI phrasing, empty-states and error
101 messages that say nothing useful. Run the prose catalog on every string.
102- **UI** — the untouched-shadcn-plus-purple-gradient look, inconsistent
103 spacing/radius, loading and error states left unstyled or absent.
104- **UX** — buttons wired to nothing, flows that dead-end, placeholder pages
105 behind real-looking nav, forms with no validation or success feedback.
106
107Product slop needs judgment, not just deletion. Flag anything ambiguous rather
108than guessing at intended copy or behavior.
109
110## UI slop (`ui`)
111
112When the first argument is `ui`, run only the UI pass. Do not run the code
113cleanup workflow first.
114
115Do not encode component-specific styling rules in this skill. Derive them from
116the target project.
117
118Before judging taste, inspect the local source of truth:
119
120- Design docs, tokens, theme files, CSS variables, Tailwind config, or equivalent.
121- Shared UI primitives such as cards, buttons, inputs, dialogs, tables, tabs,
122 nav, badges, tooltips, menus, and loading states.
123- Three nearby good examples in the same app or package.
124- The target screen/component code and rendered output when available.
125
126Create a short working inventory:
127
128- Approved tokens and spacing/radius/shadow patterns.
129- Shared primitives and their variants.
130- UI-role map for the audited surface: primitive, documented recipe, or missing.
131- Local examples that already look production-ready.
132- Target files and routes affected.
133
134For each UI role present on the audited surface, identify whether the project
135has a shared primitive or documented recipe:
136
137- Surface, card, panel.
138- Button or action.
139- Link or navigation.
140- Input, select, textarea.
141- Checkbox, radio, switch.
142- Badge or status.
143- Modal, dialog, drawer, popover, tooltip.
144- Table, list, grid.
145- Tabs or segmented controls.
146- Empty, loading, error states.
147- App shell, navigation, layout sections.
148
149If a primitive exists:
150
151- Use it instead of raw HTML, copied markup, or local styling.
152- Use only its public props, variants, slots, and documented composition
153 patterns.
154- Do not override its core visual contract from call sites: background, border,
155 radius, shadow, typography, spacing, focus, disabled, loading, or state
156 styling.
157- If the needed variant does not exist, add a named variant to the primitive
158 only when the need is clear and reusable. Otherwise defer with a finding.
159
160If no primitive exists:
161
162- Follow the documented design recipe or the strongest nearby local pattern.
163- If the same recipe appears repeatedly, recommend extracting a primitive or
164 named variant.
165- Do not invent a one-off visual treatment unless the user explicitly requested
166 a bespoke design.
167
168Raw semantic HTML is fine for document structure and prose. Raw HTML is not
169fine when it is acting as a design-system control or surface.
170
171Fix objective design-system drift before subjective taste. Keep changes scoped
172to the audited surface and defer product-judgment calls with a concrete finding
173instead of inventing intent.
174
175## Workflow
176
1771. **Route mode** — `ui` runs the UI pass and stops. `prose` runs the prose
178 catalog and stops. `--product` adds product + prose after code slop.
1792. **Detect structure** — monorepo vs single package
180 (`ls packages/ 2>/dev/null`). Process each package separately.
1813. **Scope** — in `--changed`, limit edits to the branch diff:
182
183 ```bash
184 BASE="$(git merge-base HEAD origin/HEAD 2>/dev/null || git merge-base HEAD main 2>/dev/null || git merge-base HEAD master)"
185 git diff --name-only "$BASE"..HEAD # files this branch touched
186 ```
187
188 Touch only those files/hunks; do not clean pre-existing slop elsewhere in
189 this mode.
1904. **Strip** by the categories above.
1915. **Verify** — a code change must still build and pass:
192
193 ```bash
194 bun run type-check || bunx tsc --noEmit
195 bun run test
196 ```
197
1986. **Document** — log packages cleaned and per-type counts in the current
199 repository's session log when one exists.
200
201## Modes
202
203- **default** — code slop, current package, edits applied.
204- **`ui`** — run the UI/design-system primitive pass.
205- **`prose`** — run the writing-tell catalog only.
206- **`--changed`** — only the files/hunks this branch introduced (safest for a PR).
207- **`--product`** — add the product-slop pass (copy/UI/UX) and the prose catalog.
208- **`all`** — sweep every package in a monorepo, each processed separately.
209- **`dry-run`** — detect only; report every artifact grouped by type with
210 counts, edit nothing. Combines with any scope.
211
212## Anti-Patterns
213
214- **Cleaning the whole tree when a branch scope was meant** — `--changed`
215 keeps a PR reviewable; whole-tree edits need confirmation.
216- **Deleting side-effect imports** (CSS, polyfills) or critical files
217 (README, configs, entry points).
218- **Removing a "why" comment** because it looks redundant — only
219 *what*-restating comments go.
220- **Guessing at product copy or intended behavior** — flag ambiguous product
221 slop for the user instead of inventing a fix.
222- **Rewriting logic under the banner of cleanup** — a behavior change is a
223 refactor (`refactor-code`), not deslop.
224- **Leaving voiceless prose after the strip** — sterile writing is still slop.
225
226## Deslop procedure
227
228Read [deslop procedure](references/deslop-procedure.md) for the code mode only.
229Apply the authorized scope and mode of this entry point to every step.
230Resolve other skills through this distribution’s active catalog; resolve
231resources relative to the installed skill directory.
232
233## Unslop procedure
234
235Read [unslop procedure](references/unslop-procedure.md) for prose mode or the prose portion of product cleanup only.
236Apply the authorized scope and mode of this entry point to every step.
237Resolve other skills through this distribution’s active catalog; resolve
238resources relative to the installed skill directory.