agentsclimarketplace

Deslop

Skill SID-SURANGE/cursor-team-ops/skills/core/deslop

Enforcement & release-hygiene layer for Cursor agents β€” blocking git/DB/license guardrails, commit hygiene, and docs-ops.

Install
npx -y skills add SID-SURANGE/cursor-team-ops --skill deslop

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Strip redundant comments, dead variables/imports, and defensive try/catches wrapping trivially safe operations. Triggered by "deslop", "clean this up", "remove dead code", "clean up AI-generated code", "remove noise", "tidy this", "remove unnecessary code", "clean the output", "simplify this", "remove boilerplate".

SKILL.md

3.1 KB, as published. Nobody here has run it

🧹 Skill: deslop

Purpose

Remove low-value noise from code: comments that narrate what the code already says, unused variables and imports, and try/catch blocks that add no recovery logic. Makes the codebase easier to read and maintain.

Trigger phrases

  • "deslop"
  • "clean this up"
  • "remove dead code"
  • "strip unnecessary comments"
  • "remove unused imports"

Steps

1. Determine scope

  • If the user points at a file or selection, scope to that.
  • If no scope given, ask: "Which file or directory should I deslop?"
  • Do not deslop the entire repo unsolicited.

2. Scan for slop categories

A. Narrating comments

Comments that restate what the code does with no additional insight:

# Bad β€” obvious from the code
i = i + 1  # Increment i

# Bad β€” restates the function name
def get_user(id):
    # Get the user by ID
    return db.query(User, id)

Keep comments that explain why (non-obvious intent, trade-offs, constraints, workarounds).

B. Dead variables and imports

  • Variables assigned but never read.
  • Imports that are never referenced.
  • Function parameters that are accepted but ignored (note: may be interface-required β€” flag, don't auto-delete).

C. Defensive try/catches with no recovery

# Slop β€” try/except that only re-raises or swallows silently
try:
    x = int(value)
except:
    pass  # no recovery, no logging

# Also slop β€” wraps a trivially safe operation
try:
    name = obj.name
except AttributeError:
    name = None  # could just use: name = getattr(obj, 'name', None)

Keep try/catches that: log the error, transform the exception type, implement real recovery, or wrap genuinely unsafe I/O.

D. Commented-out code blocks

  • Remove blocks of code that have been commented out.
  • Exception: leave a comment if the block includes a TODO or a link to an issue explaining why it's disabled.

3. Apply changes

  • Make minimal edits β€” only remove what's clearly slop.
  • Do not refactor logic, rename variables, or restructure code in a deslop pass.
  • If something is ambiguous (e.g. an import that might be used dynamically), leave it and note it.

4. Report

Deslopped: <filename>

Removed:
- <count> narrating comments
- <count> unused imports: <list>
- <count> dead variables: <list>
- <count> empty/pointless try/catches

Left in place (flagged for review):
- <item> β€” reason

Output

Cleaned file(s) + a brief removal summary. No behaviour changes β€” only noise removal.

Guardrails

  • Never remove the only comment explaining a non-obvious algorithm or business rule.
  • Never remove imports/variables without confirming they're unused (use static analysis or grep first).
  • Never change logic β€” if a cleanup requires a logic decision, stop and ask.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.