indrasvat/claude-code-skills · Archived

deslop

Clean AI-generated slop from code — remove unnecessary comments, dead code, redundant logic, and rename for self-documentation. Use when the user says "clean this up", "deslop", "remove slop", "clean code", "remove unnecessary comments", "simplify", "code hygiene", "polish this", "remove noise", or after an agent has generated code that needs cleanup.

First seen Jun 15, 2026

Installation

$ npx skills add indrasvat/claude-code-skills --skill deslop

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from indrasvat/claude-code-skills · top by installs.

npx skills add indrasvat/claude-code-skills

Browse all from indrasvat/claude-code-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 3
License LICENSE
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsRead, Edit, Write, Glob, Grep
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,344 B
  • docs SUMMARY.md 369 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

Deslop

Strip AI-generated noise. Make code speak for itself.

1. Scope

If $ARGUMENTS specifies files or directories, use those. Otherwise, target files changed since last commit:

git diff --name-only HEAD

If no uncommitted changes, use the last commit:

git diff --name-only HEAD~1

Read every in-scope file before making any edits.

2. Remove

  • Comments restating what the code does ("what" comments, not "why" comments)
  • Outdated comments that no longer match the code
  • Comments masking unclear code -- fix the code instead of keeping the comment
  • Commented-out code blocks
  • Stale TODOs with no actionable context
  • Unused imports, variables, functions, types
  • Redundant type assertions the compiler already infers

3. Transform

  • Rename variables/functions for self-documentation instead of adding comments
  • Extract well-named functions instead of commenting code blocks
  • Flatten nesting with early returns
  • Make implicit behavior explicit

4. Preserve (DO NOT TOUCH)

  • "Why" comments explaining non-obvious decisions
  • External constraints, business rules, regulatory notes
  • Edge case warnings
  • Public API docs (godoc, JSDoc, docstrings)
  • License headers

5. Language-specific

  • Go: stale godoc restating the signature, // handle error noise, unjustified // nolint directives
  • Python: # type: ignore without reason, stale docstrings that contradict the signature
  • JS/TS: // eslint-disable without reason, @ts-ignore without reason
  • Rust: #[allow(dead_code)] on items that are actually used

6. Idempotency

Running deslop on already-clean code produces zero edits. Do not reformat, reorder, or restructure code that has no slop.

7. Arguments

$ARGUMENTS -- files or directories to clean. Default: uncommitted changed files.