deslop skill
A cleanup skill for agent-written code: finds surplus tests, self-checks and fallbacks and deletes them, keeping behavior
- 140 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Modes with `apply` delete tests and code in the repository, though by default the skill only reads.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/deslopDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Modes with `apply` delete tests and code in the repository, though by default the skill only reads.
This is third-party code. Review the repository files before installing.
What it does
deslop reviews code that an agent has piled up over dozens of edit cycles and looks for three kinds of surplus. The first is tests that duplicate each other or guard the same failure. The second is checks where the producer of a result also confirms it, for example a checksum with no outside consumer. The third is fallback layers that hide an unexpected internal error instead of handling a real case. Every deletion rests on independent evidence: current requirements, real callers, public contracts, trust and persistence boundaries. When evidence is thin, the code stays. Security, transactions, concurrency, supported legacy formats and scientific invariants are preserved by default. By default the skill only reads and returns a report with HIGH and PRESERVE labels. Only the `apply` argument makes edits. Extra modes: `tests apply` for tests, `current branch apply` for the current branch and `deep` for an audit of the whole repository. Commits, pushes and branch changes must be allowed separately.
Who it is for. Developers whose repository has been driven by Codex or Claude Code for months, with tests and fallback layers growing faster than the logic itself.
Good fit when
- The test suite has swollen, and editing one function breaks a dozen near-identical checks.
- An agent added checksums and receipts that it creates and verifies itself.
- The code is wrapped in nested fallback layers, and the real cause of a failure is invisible in the log.
- A task branch is finished, and its changes are checked for surplus machinery before the merge with `current branch apply`.
- A team wants to see the cleanup plan in advance and accept every deletion on evidence.
Not a fit when
- The goal is formatting or tidying style: deslop removes surplus machinery and does no formatting.
- The aim is a lower test count for its own sake: the skill reduces test surface and keeps behavior.
- People left the extra tests in the repository, and only the team knows the reasons.
- The project wants an architecture redesign: the skill cleans code without new design.
Example request
/deslop deep: audit the whole repository, change nothing, and show what you would delete and what you would keep.Limitations
The version is 0.3.4, and the author calls the project evolving and makes no production-ready claim. The skill is tested on small teaching repositories and one hand-adjudicated case, so there is no general claim of superiority over other cleanup methods. In Claude Code the default invocation does not forbid the model from choosing the skill itself, so its description says to run it explicitly. Modes with `apply` change files, and the agent commits and pushes only with separate permission.
How to disable. In Claude Code run `/plugin uninstall deslop` or delete the `~/.claude/skills/deslop` link. In Codex delete the `~/.agents/skills/deslop` folder.
FAQ
How do I install deslop in Claude Code?
Add the repository as a marketplace with `/plugin marketplace add MrZoyo/deslop-GPT` and install the plugin: `/plugin install deslop@deslop`. The plugin command is `/deslop:deslop`.
How do I install deslop in Codex?
Call `$skill-installer` and give it `https://github.com/MrZoyo/deslop-GPT/tree/v0.3.4/skills/deslop`. Alternatively clone the v0.3.4 tag and link `skills/deslop` to `~/.agents/skills/deslop`. In Codex the command is `$deslop`.
Does deslop change files without asking?
No, by default it only reads and reports. The `apply` argument makes edits, while staging commits, pushing and switching branches need separate permission.
Which run modes exist?
With no argument or with `audit` it audits the selected scope, `apply` makes the verified cleanup, `tests apply` works on tests and `current branch apply` cleans the current branch. `deep` audits the whole repository and `deep apply` cleans it without a redesign.
What does the skill always keep?
Distinct success, rejection and error scenarios, checks across real storage and network boundaries, supported compatibility and data integrity. With incomplete evidence the code stays.
Discussion
No questions or reviews yet.
Related
SkillsThe /improve skill: a strong model audits a repository and writes self-contained fix plans, and you hand the execution to a cheaper model
kyy-logs code-review-skill
code-review-skill
A code review skill with four independent probes, evidence-backed findings and a merge gate derived from JSON
An evidence-first development skill: the agent wraps code in a spec and a gauntlet of checks so line-by-line review becomes optional
Methods for an agent in one CLI: comparing options, solving problems and changing code in steps, 20 slash commands in all.
A skill that explains and audits code, telling you what it does and why instead of just accepting it
14 skills that find the gaps in a task before the code: interviews, plans, assumption tests and proof that a bug fix works
README in short
The documentation lays out cleanup priorities as percentages that reflect the author's design intent, plus a remove-or-preserve table. Next come a table of checks on Codex and Claude Code across skill versions, a field trial on a real repository and links to the design document.
README badge
Original SKILL.md
--- name: deslop description: Audit or apply evidence-backed, test-first subtractive cleanup for accumulated agent-created test bloat, verification theater, and defensive or fallback bloat while preserving independent external behavior. Invoke explicitly for semantic simplification, not generic refactoring. --- # Deslop Deslop removes complexity accumulated during repeated coding-agent implementation and correction cycles. It is a semantic cleanup policy, not a beautifier, dead-code sweeper, generic refactoring tool, or redesign assistant. ## Priority order Work in this order. Do not let an easy dead-code deletion displace a higher-priority cluster. 1. **Test-suite bloat.** Treat tests as production code that can accumulate after every agent correction. Remove duplicate, self-referential, implementation-detail, and obsolete tests while retaining a minimum sufficient set of independent behavioral evidence. 2. **Verification theater.** Investigate checksums, receipts, manifests, validators, recomputation, and result envelopes whose producer and verifier share the same information and failure domain. 3. **Defensive and fallback bloat.** Investigate broad catches, catch-and-fallback paths, speculative compatibility branches, repeated validation, and recovery machinery that masks errors without a current contract. Generic dead code, wrappers, abstractions, comments, and ordinary duplication are secondary. Touch them only when they belong to one of the three target clusters or have direct high-confidence evidence. **Reduce test surface, not behavior surface.** Evidence that a test is redundant or accumulated test-suite bloat justifies deleting or consolidating that test; it is not independent evidence for changing the production behavior the test exercises. When test-suite bloat is the active target, keep distinct externally observable production semantics—including public success, rejection, error, edge-case, and supported compatibility behavior—outside the deletion target unless the production construct is separately justified for removal by another target cluster, or direct evidence from current requirements, real callers, specifications, or history establishes that the behavior is obsolete or incorrect. Do not reclassify tested behavior as defensive or validation bloat merely because deleting its test leaves nothing else requiring it; the test may be its clearest executable specification. Adding tests is not the default response to cleanup. When production slop is deleted, tests whose only purpose is to protect that slop should normally be deleted in the same change. ## Test-first evidence pass When tests are in scope, complete this pass before changing production behavior: 1. Inventory collected test nodes plus their fixtures, fakes, helper stacks, generated inputs, output targets, skips, and deselection rules. 2. Map each test to `current owner -> production branch -> observable result -> independent oracle -> failure domain`. 3. Group tests by failure domain. Consolidate inputs that reach the same branch and result; preserve separate rejection, safety, persistence, protocol, resource, and numerical semantics. 4. Choose the strongest surviving evidence root for each group: a public seam where possible, an independently specified low-level invariant where necessary, and one hermetic cross-layer root for each current delivery path. 5. Remove fixtures and test-only support with the tests they serve. Remove production code in that cluster only when separate caller, contract, history, and reachability evidence also justify it. 6. Re-collect and run the remaining suite. Record skips and deselections, and compare worktree state before and after tests that may generate files. Do not use coverage, test count, or a test-created configuration as an owner. The output of this pass is a smaller evidence set with the same real failure domains, not a target number of tests. ### Test decision contrast - **HIGH cleanup:** several tests reach the same public success branch; one asserts the exact externally visible result while the others only repeat construction, type, or non-empty checks. Keep the strongest behavioral root and remove the dominated tests plus support used only by them. - **PRESERVE:** one test covers successful output and another covers externally visible rejection, safety, persistence, or supported compatibility behavior. They protect different results or failure domains; do not merge or delete one merely to reduce the count. ## Closed justification loops Production code does not justify a test merely because the test exercises it. A test does not justify production code merely because the production code exists. Follow justification chains outward until they reach an independent evidence root.