# Deslop

> Deslop is an open-source agent skill for developer tools. Has the agent review a branch diff and strip AI-generated code clutter. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/michael-denyer/pstack-claude/tree/main/plugins/pstack/skills/deslop
- **Repository:** https://github.com/michael-denyer/pstack-claude
- **GitHub stars:** 5,057
- **License:** MIT
- **Skill name:** deslop
- **Collection:** https://github.com/michael-denyer/pstack-claude
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

Deslop asks the agent to look at the changes a branch introduces relative to its base branch, including uncommitted edits, and to remove patterns that typically come from AI code generation. The base is resolved in order: the pull request's base branch, the branch the current one was cut from, or the repository's default branch.

The skill gives the agent a focus list: redundant or out-of-style comments, defensive checks and try/catch blocks that are unusual for trusted code paths, casts to any used only to get past type errors, deeply nested logic that could use early returns, and other spots that do not match the surrounding file. Edits are meant to be small and focused, and behavior should stay the same unless a clear bug is being fixed.

After editing, the agent is told to rerun whatever checks verified the change, such as tests or a type check, and to revert any edit that causes a failure. It finishes with a short summary. The skill ships as a single SKILL.md with no scripts, so it relies on the project's own test and build tooling.

## When your agent uses it

> Remove AI-generated code slop and clean up code style

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/michael-denyer/pstack-claude/tree/HEAD/plugins/pstack/skills/deslop)
- [License: MIT](https://github.com/michael-denyer/pstack-claude/tree/HEAD/plugins/pstack/skills/deslop)

## Features

- **Branch diff review:** Scopes cleanup to changes introduced on the current branch, including uncommitted work.
- **Comment cleanup:** Removes extra comments that are unnecessary or do not match the local style.
- **Defensive code trimming:** Flags try/catch blocks and checks that are unusual for trusted code paths.
- **Type cast removal:** Targets casts to any that only exist to bypass type errors.
- **Nesting simplification:** Suggests early returns to flatten deeply nested code.
- **Verified edits:** Reruns the relevant checks after editing and reverts any change that fails them.

## Good for

- Clean up AI-generated slop in my current branch before opening a pull request
- Remove unnecessary try/catch blocks from code I just generated
- Strip redundant comments added during this feature work
- Replace any casts that were only used to silence type errors
- Flatten deeply nested logic in the files I changed

## Install

### Claude Code

This skill ships in the `pstack` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add michael-denyer/pstack-claude
/plugin install pstack@pstack-claude
```

Or copy only this skill to `~/.claude/skills/deslop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/deslop &&
cp -R "$tmp/plugins/pstack/skills/deslop" ~/.claude/skills/deslop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/deslop` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/deslop` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/deslop &&
cp -R "$tmp/plugins/pstack/skills/deslop" ~/.agents/skills/deslop &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/deslop` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/deslop` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/deslop &&
cp -R "$tmp/plugins/pstack/skills/deslop" ~/.cursor/skills/deslop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/deslop` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/michael-denyer/pstack-claude.git --path plugins/pstack/skills/deslop
```

Or copy the folder to `~/.gemini/skills/deslop` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/deslop`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/deslop &&
cp -R "$tmp/plugins/pstack/skills/deslop" ~/.copilot/skills/deslop &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/deslop` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git
```

Then copy `pstack-claude/plugins/pstack/skills/deslop` into your agent's skills folder as `deslop`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill change?

It edits code introduced in the branch's diff to remove slop such as extra comments, unnecessary defensive checks, any casts and deep nesting, keeping behavior the same unless fixing a clear bug.

### How does Deslop decide what to compare against?

The base is the PR's base branch if one exists, otherwise the branch this one was cut from, otherwise the repository's default branch. Uncommitted changes are included.

### Does Deslop run any scripts?

No scripts are included. It asks the agent to rerun existing checks such as tests or a type check, and the driver skill for UI work, and to revert edits that fail.

### Does Deslop need any special tools?

The skill does not set allowed tools. It assumes the project has tests or a type check the agent can run.

### How do I install Deslop in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/deslop to use it in all your projects, or to .claude/skills/deslop in one project. Or install the pstack plugin, which includes it: /plugin marketplace add michael-denyer/pstack-claude, then /plugin install pstack@pstack-claude.

### Does Deslop run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Deslop?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Deslop?

The closest alternatives to Deslop are Code simplifier, Code review expert, No comments, Review PR and Principle laziness protocol.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Code simplifier](https://ai-powered.com/skills/code-simplifier): Code simplifier is an open-source agent skill for developer tools.
- [Code review expert](https://ai-powered.com/skills/code-review-expert): Code review expert is an open-source agent skill for developer tools.
- [No comments](https://ai-powered.com/skills/no-comments): No comments is an open-source agent skill for developer tools.
- [Review PR](https://ai-powered.com/skills/review-pr): Review PR is an open-source agent skill for developer tools.
- [Principle laziness protocol](https://ai-powered.com/skills/principle-laziness-protocol): Principle laziness protocol is an open-source agent skill for developer tools.
- [Project review](https://ai-powered.com/skills/project-review): Project review is an open-source agent skill for developer tools.
- [Make PR easy to review](https://ai-powered.com/skills/make-pr-easy-to-review): Make PR easy to review is an open-source agent skill for developer tools.
- [Antislop code](https://ai-powered.com/skills/antislop-code): Antislop code is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/deslop
