The Exact `deslop` Skill I Run Before Commit

The raw skill file, plus what it is actually for and the kind of cleanup it is meant to force before commit.

Apr 9, 2026

I posted a screenshot of my current deslop skill on X, and a few people asked for the exact file. The original post is here.

So this post is simple: the raw skill, unchanged, and then a short explanation of what I actually use it for.

This is the exact file as of April 9, 2026.

1---
2name: deslop
3description: Run a multi-agent review-readiness pass on a nearly finished change
4 before commit; fan out parallel review agents across rule conformance, type
5 safety, and overengineering, then synthesize and apply the worthwhile fixes.
6---
7
8# Deslop
9
10Use this skill after the change is functionally correct and before `commit`. The PR should be describing already-deslopped code, not code that still needs cleanup.
11
12## Goals
13
14- Leave the smallest clear diff that still solves the issue.
15- Run multiple focused review passes in parallel instead of relying on one final subjective read.
16- Preserve behavior while improving readability, type safety, and alignment with repo rules.
17
18## Required review vectors
19
20Launch exactly these 3 parallel subagents as soon as the context bundle is ready. Give all of them the same context bundle, but assign each a different review vector:
21
221. Rules and documentation conformance
23 - Are we following `AGENTS.md`, nested `AGENTS.md`, design docs, and core beliefs?
24 - Did we drift from documented repo patterns or ownership boundaries?
252. Type safety and source of truth
26 - Are we preserving canonical types?
27 - Did we cast, redefine existing types, widen things unnecessarily, or break inference flow?
28 - Could a mistake slip to deploy time instead of build time?
29 - Prefer compile-time guarantees over runtime defensive programming inside typed repo-owned code. Validate or parse only at untrusted boundaries. Once data has crossed a validator-owned boundary or is carried by an inferred repo-owned type, trust it downstream and do not re-parse it.
30 - Use boundary validation only. Do not add defense-in-depth revalidation inside internal TypeScript helpers unless the input is truly untrusted or the operation is irreversible.
313. Overengineering and simplification
32 - Did we write more code than needed?
33 - Did we create helpers, abstractions, factories, wrappers, or indirection without enough payoff?
34 - Could the same result be expressed more directly?
35
36## Required context bundle
37
38Before delegating, collect and pass the exact paths the reviewers need:
39
40- repo root `AGENTS.md`
41- nested `AGENTS.md` files for the changed areas
42- `docs/index.md`
43- `docs/PLANS.md`
44- `docs/design-docs/index.md`
45- `docs/design-docs/core-beliefs.md`
46- any design doc directly relevant to the changed area
47- the relevant active exec plan when one exists for the current work
48- the changed files and enough nearby context to review them properly
49
50If you're working on an ExecPlan, also include:
51
52- inspect `docs/exec-plans/active/`
53- if one clearly matches the current task, inform the sub agent to study it extensively before starting their focused review as often it contains relevant context, constraints, and acceptance criteria that are not captured in the ticket or design docs.
54
55## Delegation protocol
56
571. Read the context bundle yourself first so the delegation is precise.
582. Spawn the 3 required parallel subagents immediately.
59 - Do not wait to run local linting or slop checks before delegating.
60 - The point is to let the reviewers work in parallel while you do local
61 verification.
623. Give each agent:
63 - the same context bundle, plus any critical user context that is not captured in the files
64 - one assigned review vector
65 - clear instructions to return findings first, ordered by severity, with file
66 references
674. Wait for all review agents to return.
68 - While they run, start with `pnpm -w lint:slop:delta` to prime yourself on
69 the highest positive deltas, newly introduced hotspots, and the largest
70 improvements.
715. Read all responses and synthesize them into one balanced report with these
72 headings:
73 - `How did we do?`
74 - `Feedback to keep`
75 - `Feedback to ignore`
76 - `Plan of attack`
776. Prefer the balanced synthesis over any one subagent's extreme take.
78
79## What to fix automatically
80
81If you are in an unattended implementation flow, apply the worthwhile feedback immediately before commit. Prioritize:
82
83- type drift, casting, or duplicated type definitions
84- violations of documented repo boundaries or design beliefs
85- dead helpers, dead code, debug leftovers, placeholder text
86- unnecessary wrappers or indirection that can be removed locally without widening scope
87
88If feedback is speculative, conflicts across reviewers, or would widen scope materially, leave it out and mention it briefly in the synthesis/workpad.
89
90## Steps
91
921. Gather the context bundle.
932. Launch the 3 required review agents in parallel.
943. While they run, use `pnpm -w lint:slop:delta` to identify the biggest regressions and improvements, then run any other narrow local checks you need.
954. Wait for their responses and synthesize them.
965. Apply the worthwhile feedback that is clearly in scope.
976. Rerun the narrowest affected validation immediately.
987. Update workpad, commit text, and PR-facing text so they describe the final
99 post-deslop state rather than the earlier draft state.
100
101## Stop rules
102
103- Do not turn this into a refactor unrelated to the ticket.
104- Do not churn stable code outside the changed area just to make it prettier.
105- If a cleanup is subjective and not clearly better, leave it alone.
106- Do not blindly apply every subagent suggestion.

How I use it

I use deslop at one very specific moment: after the change works and before I let it become durable in git.

It is not a planning tool. It is not there to help discover the solution. It is not a generic "clean this up" pass. It is the pass I run when the code is basically done and I want pressure on the last 10% of the diff.

What I want from it is pretty specific:

  • Did I invent a repo-local convention when a normal one would do?
  • Did I widen or duplicate a type instead of preserving the source of truth?
  • Did I leave behind a helper, wrapper, or abstraction that does not earn its keep?
  • Did the code drift from the docs, beliefs, or boundaries the repo already claims to follow?

If deslop is finding product work, I used it too early. If it is deleting ceremony, restoring source of truth, and tightening the final story the PR tells, it is doing its job.

I also do not want one grand final reviewer. The whole point is parallel specialization. The current skill fixes that shape at 3 reviewers: rules and docs conformance, type safety and source of truth, and overengineering and simplification. While they run, the parent agent also runs pnpm -w lint:slop:delta locally.

The synthesis step is the important part. I do not want the most aggressive reviewer to win by default. I want a balanced read on what to keep, what to ignore, and what is actually worth changing before the commit text and PR text get updated.

What the traces show

The code usually works already. That is the point.

deslop is not there to save a broken implementation. It is there to pressure the shape of a nearly-finished one.

In the better traces, the mechanics are pretty consistent: same path-heavy context bundle to 3 fixed reviewers, each looking through a different lens, while the parent agent runs pnpm -w lint:slop:delta and waits to synthesize. The output I care about is not "more feedback." It is a smaller final diff.

More concretely, I want it asking:

  • Did I leave behind a fake seam?
  • Did I invent a repo-local protocol?
  • Did I widen a type or split the source of truth?
  • Did I add more code than the change actually needed?

That is why the traces should show sloppy code first. If the code is already clean, the tool has nothing to do.

Two better examples

The smallest kind of deslop fix is deleting a helper that only exists to make the code look more designed than it is.

Before:

1export function createToolContext(params: {
2 actor: ToolContext['actor'];
3 channel: ToolContext['channel'];
4 invokerKind: ToolContext['invokerKind'];
5}): ToolContext {
6 return params;
7}
8
9return createToolContext({
10 actor,
11 channel,
12 invokerKind: 'agent',
13});

After:

1return {
2 actor,
3 channel,
4 invokerKind: 'agent',
5} satisfies ToolContext;

Same behavior. One less fake seam.

The other kind is more important: kill the custom protocol.

Before:

1export const bootstrapHeaderName = "x-bootstrap-secret";
2
3hooks: {
4 before: createAuthMiddleware((ctx) => {
5 const suppliedSecret = ctx.headers?.get(bootstrapHeaderName);
6 if (suppliedSecret !== options.bootstrapSecret) {
7 return Promise.reject(new APIError("UNAUTHORIZED"));
8 }
9 return Promise.resolve();
10 }),
11},
12
13await auth.api.signUpEmail({
14 body: { email, name, password },
15 headers: new Headers({
16 [bootstrapHeaderName]: bootstrapSecret,
17 }),
18});

After:

1emailAndPassword: {
2 autoSignIn: false,
3 disableSignUp: options.disableEmailSignUp ?? true,
4 enabled: true,
5},
6
7const auth = initAuth({
8 baseUrl: authBaseUrl,
9 disableEmailSignUp: false,
10 productionUrl: authBaseUrl,
11 secret: process.env.AUTH_SECRET,
12});
13
14await auth.api.signUpEmail({
15 body: { email, name, password },
16});

Same capability. Less weirdness. Bootstrap stays local. The runtime goes back to boring.

That is what I want this skill doing before every commit. Not refactor theater. Not beautification. Just catching the parts of a diff that still feel invented, then stripping them out before they harden into the repo.