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