deslop
Remove AI-generated code slop that a branch added and match the code around it.
by majiayu000★ 31 GitHub stars
Install deslop in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Deslop
Read the branch's diff and remove the code slop it added. This skill edits code only. Comments belong to the no-comments skill, which runs before review, and prose belongs to the unslop skill. Leave both alone here.
Scope
Use the caller's files or diff. Otherwise use the current branch's diff against its base branch, default main, including the working tree. Change only lines the branch added or changed.
What to remove
- Defensive checks,
try/catchblocks, and fallbacks that are unusual for a trusted code path. Find where the value comes from first. A check on input from a user, a file, or the network stays. - Casts to
any, or the language's own escape hatch, used only to get past a type error. Fix the type. - Deep nesting that early returns would flatten.
- Other code that does not match its file and the code around it, such as naming, error handling, or a helper the codebase already has.
Rules
- Keep behavior the same, unless the edit fixes a clear bug.
- Make small, local edits. Do not rewrite a function to remove one line.
- Reply in one to three sentences. Say what you removed, and name any bug you fixed.
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- metadata.json
FAQ
What does the deslop skill do?
Remove AI-generated code slop that a branch added and match the code around it.
How do I install the deslop skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the deslop skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…