deslop

Removes excess comments, defensive checks, and type casts from AI-generated code diffs.

Updated May 22, 2026
One-click install
npx skills add https://github.com/viniciuscs84/sdd-toolkit --skill deslop-viniciuscs84
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deslop
Source: https://github.com/viniciuscs84/sdd-toolkit/tree/main/skills/deslop
Command: npx skills add https://github.com/viniciuscs84/sdd-toolkit --skill deslop-viniciuscs84

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI coding assistants often add unnecessary comments, redundant defensive checks, and type casts that clutter the codebase and diverge from its established style. This Skill cleans up that slop so the branch reads like human-written code. ## Core Features & Use Cases - Diff-Based Cleanup: Reviews the diff against main and removes only the slop introduced in the current branch. - Style Consistency: Strips extra comments, abnormal try/catch blocks, defensive null checks on trusted codepaths, and casts to any. - Use Case: After an AI assistant generates a feature branch full of verbose comments and over-cautious error handling, run this Skill before opening a pull request to restore the codebase's natural style. ## Quick Start Review the diff of my current branch against main and remove all AI-generated slop such as redundant comments and unnecessary defensive checks.

Frequently Asked Questions about deslop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up AI-generated code before a pull request?

Run the deslop skill on your branch to check the diff against main and remove AI slop such as extra comments, unnecessary try/catch blocks, and casts to any. It finishes with a short summary of what was changed.

What counts as AI code slop?

AI slop includes comments a human would not add, defensive checks or try/catch blocks abnormal for that area of the codebase, casts to any to bypass type issues, and any style inconsistent with the surrounding file.

Can I use this for general code refactoring?

No. The skill is scoped to removing slop introduced in the current branch's diff against main, not general refactors. It only targets patterns inconsistent with the existing codebase style.

Does deslop remove all comments from my code?

No. It only removes comments that a human would not add or that are inconsistent with the rest of the file. Legitimate comments matching the codebase style are preserved.

When should I not remove defensive checks?

Keep defensive checks when code is called from untrusted or unvalidated inputs. The skill targets checks that are abnormal for that area, especially on trusted or already validated codepaths.