Remove LLM-generated artifacts from code. Cleans unnecessary comments and defensive checks. Use when asked to "clean up the code", "remove AI slop", "deslop this", or after AI-assisted coding sessions to remove artifacts that don't match codebase style.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
skills listSkill Instructions
name: deslop description: | Remove LLM-generated artifacts from code. Cleans unnecessary comments and defensive checks. Use when asked to "clean up the code", "remove AI slop", "deslop this", or after AI-assisted coding sessions to remove artifacts that don't match codebase style. license: MIT metadata: author: howells argument-hint: <codebase|branch>
Deslop Workflow
Remove AI-generated slop from the codebase. Based on Cursor team's approach.
Modes
- Branch mode (default): Check diff against main, clean this branch only
- Codebase mode: Scan entire codebase
Process
Step 1: Determine Mode
If argument is "codebase":
# Scan all files
git ls-files '*.ts' '*.tsx' '*.js' '*.jsx'
Otherwise (default):
# Get changed files vs main
git diff --name-only main...HEAD
Step 2: For Each File, Detect Slop
What to look for:
-
Extra comments inconsistent with the file
- Comments a human wouldn't add
- Comments that state the obvious
- Comments inconsistent with file's style
-
Defensive checks abnormal for the codebase
- Try/catch blocks in trusted codepaths
- Null checks where types guarantee non-null
- Extra validation already handled upstream
-
Type escapes
as any// @ts-ignore!assertions that shouldn't be needed
-
Style inconsistencies
- Different naming conventions than the file
- Different formatting patterns
- Verbose where file is terse (or vice versa)
Step 3: Context-Aware Analysis
For each potential issue:
- Read surrounding code
- Check if pattern exists elsewhere in file
- Only flag if genuinely inconsistent
Good comment (keep):
// Retry logic handles transient network failures
Slop comment (remove):
// This function processes the user data and returns the result
function processUserData(data: UserData): Result {
Step 4: Fix Issues
For each confirmed slop:
- Remove or fix it
- Don't add new code, just clean
Step 5: Report
## Deslop Summary
Cleaned [N] files:
- Removed [X] unnecessary comments
- Removed [Y] defensive checks
- Fixed [Z] type escapes
[1-3 sentence summary]
<progress_append> After cleaning the codebase, append to progress journal:
## YYYY-MM-DD HH:MM — /arc:deslop
**Task:** Clean [scope]
**Outcome:** Complete
**Files:** [N] files cleaned
**Decisions:**
- Removed: [X] comments, [Y] checks, [Z] escapes
**Next:** Continue working
---
</progress_append>
What Deslop Does NOT Do
- Add new functionality
- Refactor working code
- Change behavior
- Make "improvements"
It only removes things that shouldn't be there.
More by howells
View allPersistent task backlog that survives across sessions. Git-committed, always available. Use when asked to "add a task", "show my tasks", "update the backlog", "prioritize", or when managing what needs to be done across sessions.
Create or review a high-level vision document capturing project goals and purpose. Use when asked to "define the vision", "what is this project", "set goals", or when starting a new project that needs clarity on purpose and direction.
Create distinctive, non-generic UI designs with aesthetic direction and ASCII wireframes. Use when asked to "design the UI", "create a layout", "wireframe this", or when building UI that should be memorable rather than generic. Avoids AI slop patterns.
Execute an implementation plan task-by-task with TDD and continuous quality checks. Use when asked to "implement the plan", "execute the tasks", "start building from the plan", or after /arc:detail has created an implementation plan ready for execution.
