deslop
Skill2 starsChanged 6 months agoMITView on GitHub
Run a metric-driven Swift quality pass — measure with `make metrics` (lizard cyclomatic complexity + function length, swiftlint if present) into metrics/quality.json, pick the top offenders, refactor under green `make build && make test` with no behaviour change, and re-run metrics to verify every change actually improved. Activates when the user types `/deslop`, when `/work` hits the deslop checkpoint, or when code feels crusty.
59 other projects use a version of this.
Adopted by
Most recently taken up by
- RichieHakim/agent_skillstheir own version, first seen Oct 5, 2026
- kontourai/stationtheir own version, first seen Oct 4, 2026
- kreid415/claude-science-skillstheir own version, first seen Oct 3, 2026
- dhanji4U/skillstheir own version, first seen Oct 2, 2026
- Rvey/agent-engineering-kittheir own version, first seen Oct 1, 2026
- compozy/compozytheir own version, first seen Oct 1, 2026
Used with
Projects with it also use verify-this, thermo-nuclear-code-quality-review and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnastasiyaWSkillverify-this
Prove a concrete behavior, performance, UI, CLI, API, or memory claim with fresh baseline-versus-treatment evidence and one explicit verdict. Use when asked to verify, prove, compare before and after, show evidence, or confirm that a fix works. Do not use for vague claims such as cleaner code, a full plan-based release verification, or a known bug that needs a red-to-green reproducer.
Also in 4 projects that use this
AnastasiyaWSkillthermo-nuclear-code-quality-review
Run an opt-in strict maintainability review for giant files, spaghetti growth, misplaced logic, weak boundaries, unnecessary abstractions, and missed structural simplifications. Use for a thermonuclear review, harsh code-quality audit, code-judo review, or a file approaching 1000 lines. Do not use as an automatic rewrite mandate or for cosmetic cleanup.
Also in 3 projects that use this
Hugging FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 4 projects that use this
AWSSkillteach
Teach the user a new skill or concept, within this workspace.
Also in 5 projects that use this
nicodianskSkillbrainstorm
Use when starting creative work - creating features, building components, adding functionality, or modifying behavior. Explores requirements through Socratic dialogue before any implementation.
Also in 4 projects that use this
MicrosoftSkillunslop
Cut AI tells from any writing. Must always apply.
Also in 4 projects that use this
Other versions59 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 59
- rohitg00/pro-workflow★ 2.9ksame name
- compozy/compozy★ 2.8ksame name
- Jwuthri/Tracely-ai★ 1.5ksame name
- pedronauck/skills★ 633same name
- brianlovin/agent-config★ 375same name
- automagik-dev/genie★ 345same name
- ninehills/skills★ 280same name
- AnastasiyaW/codex-claude-code-config★ 153same name
- MrZoyo/deslop-GPT★ 136same name
- jjanczur/tyran★ 81same name
49 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- dreamSkill
- queueSkill
- self-reflectionSkill
- workSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 58 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Never touch files outside the target group.
- Very specific: line 37
Read metrics/quality.json and store the baseline.
- Distinctive: line 53
No behaviour change. Allowed refactors: extract private helpers.
- Distinctive: line 56
Never change observable behaviour — refactor only.
- Distinctive: line 57
Never add or remove public API surface.
- Distinctive: line 58
Only touch files in the target group.
- Very specific: line 65
After each change: make build && make test (must stay green), then make metrics and re-read quality.json.
- Distinctive: line 71
No priority 1–3 candidates remain that haven't already failed this run.
- Distinctive: line 72
Every remaining candidate would require touching a known false positive (see Codebase notes).
- Very specific: line 90
Trust a refactor you didn't re-measure: Every change is verified against quality.json.
- Distinctive: line 91
Suppress lint: instead of fixing the code.
“Common” is measured: kept by at least 6 in 10 of the 58 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/deslop — metric-driven quality-drift sweep (Swift)
Quality drift compounds quietly. When the trigger fires, the next implementer waits and this runs first. Every change must be verified against metrics — not vibes.
0. When to run
- Counter tripped — ≥10 substantive commits since the last deslop pass:
LAST=$(git log --extended-regexp --grep='^(refactor|fix|chore|feat)\(deslop\)' -1 --format=%H) git rev-list --count $LAST..HEAD --no-merges - User asks —
/desloptyped directly, or "feels crusty". - End of a long
/workrun.
Arguments
--target code— only modify production code (Sources/,Engram/Engram/). Default.--target tests— only modify test files (Tests/,Engram/EngramTests/,Engram/EngramUITests/).--iterations N— make N successful improvements before stopping. Default: 3.
Never touch files outside the target group.
1. Baseline
make metrics # → metrics/quality.json
make build && make test # must be green before you startRead metrics/quality.json and store the baseline. Print a one-line summary: code file count, total lines, mean/max complexity, top hotspot. If make build/make test is red at baseline, stop — fix or report; never deslop on a broken tree.
2. Identify offenders (orchestrator picks — this is judgment, don't delegate it)
From metrics/quality.json, for the selected target only, pick the highest-leverage issues in this priority order:
hotspots.by_complexitywithccn > 4— multiple branching paths; split or simplify.hotspots.by_lengthwithlength > 20— functions doing several things; split by responsibility.- Lint violations (if
swiftlintpresent) — tackle the most frequent rule first. Fix the code, never suppress. - Entries in
DESLOP_HINTS.md(repo root, if present) — each line is a named refactor target; take the first uncompleted one. - Comment ratio outliers —
< 2%(underdocumented non-obvious logic) or> 30%(over-commented obvious code).
Pick the worst 3–5 (or up to --iterations). Read the full file before changing anything.
3. Refactor under green checks (delegate fixes to a subagent)
No behaviour change. Allowed refactors: extract private helpers; replace nested conditionals with guard/early-return; rename unclear identifiers to be explicit; remove redundant comments / add comments only where logic is non-obvious; fix lint by correcting code.
Hard rules:
- Never change observable behaviour — refactor only.
- Never add or remove public API surface.
- Only touch files in the target group.
- One logical change at a time, not a sweeping rewrite.
Delegate to a general-purpose subagent with a brief that pastes the offender file(s) inline and states: "No behaviour change. make build && make test must stay green. Touch only <paths>. Scope-creep budget is zero." A bug uncovered during the pass gets its own implementer brief (commit fix(deslop): ...).
4. Verify each change against metrics
After each change: make build && make test (must stay green), then make metrics and re-read quality.json.
- Improved or held: count it as a successful iteration. Print
✓ <what changed> — <metric> before → after. - Got worse: revert with
git checkout -- <path>, note the failed attempt, pick the next candidate. Do not count it.
Stopping conditions (stop without asking)
- The requested number of successful iterations is complete.
- No priority 1–3 candidates remain that haven't already failed this run.
- Every remaining candidate would require touching a known false positive (see Codebase notes).
5. Commit
Conventional commit subject must match the deslop-counter grep:
refactor(deslop): .../fix(deslop): .../chore(deslop): ...
Body:
- One line per metric moved (e.g.
complexity max 10→7; MemoryStore.update split). - Offenders fixed (
file:function). - Accepted offenders + reasoning.
Stage by path (git add <paths>), never git add .. After committing, run make build && make test && make metrics once more — all green, metrics written.
What you must NOT do
- Behaviour change in a deslop pass. Queue it via
/queue. - Fix every finding. Pick 3–5 /
--iterations. - Trust a refactor you didn't re-measure. Every change is verified against
quality.json. - Suppress lint instead of fixing the code.
- Use
git add .— stage by path. - Skip the commit body — future passes rely on it to reconstruct accepted offenders.
- Run deslop mid-task. Finish the current task first.
- Delegate offender selection. Picking is judgment (orchestrator); fixing is delegated.
Codebase notes (Swift / SwiftUI refactoring-safety; carried from handla-app)
These are lizard/SwiftUI artefacts — verify before acting on a hotspot:
<!-- learned --> Adding a helper only improves the distribution when the code it replaces is already lizard-tracked (inside a named `func`, not a SwiftUI `body` property, `@ViewBuilder` closure, or `.alert`/`.sheet` content). Adding a helper to simplify *untracked* SwiftUI modifier content adds a function without removing tracked lines → metrics regress. Verify call sites are in tracked functions first.<!-- learned --> `@ViewBuilder` computed properties score high `ccn` from `if/else` that is purely declarative layout — do not extract; the branches express view structure, not logic. Named `@ViewBuilder func` methods (parameter-taking) are different: extraction IS safe and reduces tracked length.<!-- learned --> `@Bindable var model` and `private(set)`/`@Observable` cause lizard to emit a phantom `set` entry with inflated ccn/length that maps to no real function — skip it; look at the real `init`/body.<!-- learned --> lizard can fuse consecutive `async func` declarations, attributing the second's lines to the first. Before acting on a suspicious `by_length` hotspot, count the actual lines in the file.<!-- learned --> `make test` (SwiftPM) does NOT compile the Xcode app target under `Engram/Engram/` — only `Sources/`+`Tests/`. So a refactor of an app-only function (e.g. `EngramModel.runBundledEngram`) can't be verified by `make build && make test`; it needs `make app` (xcodebuild, slow). Prefer `Sources/` hotspots; defer app-target hotspots unless you budget an app build to verify them.<!-- learned --> Tests use swift-testing (`@Test` macros), so `swift test`/`make test` prints a spurious `Executed 0 tests` line from the empty XCTest harness. Trust the swift-testing summary (`Test run with N tests ... passed`) instead — `Executed 0` does not mean tests failed to run.Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

