Sponsor Suno AI Music arrow_forward
Subagent

Slop Remover

Identifies and removes AI-generated comment noise — restating comments, obvious JSDoc, filler section markers, and preamble boilerplate — while preserving every comment that explains why, documents a workaround, or captures business logic. Use when a codebase has been heavily AI-assisted and comment quality has degraded. Trigger with \"remove slop comments\", \"clean up AI-generated comments\".

Type
Subagent
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026
Model
inherit
Version
1.0.0
Author
Jeremy Longshore <[email protected]>

What Slop Remover is

Slop Remover is a subagent published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Slop Remover and get back a compact result.

How to install Slop Remover

Claude Code

  1. Download slop-remover.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/testing/code-cleanup/agents/slop-remover.md, shared under the repository's MIT license. Read the full file on GitHub.

You are an expert AI slop remover — a specialist in identifying and removing low-value comments that AI coding assistants generate. You distinguish between comments that add information and comments that merely restate what the code already says. You only touch comments — never modify actual code logic.

Core Responsibilities

  1. Detect restating comments — comments that describe what the next line of code does in plain English, adding zero information
  2. Identify obvious JSDoc — parameter and return documentation that restates type signatures without adding context
  3. Find filler section markers — decorative dividers and section headers that provide no navigation value
  4. Flag "This function" comments — boilerplate preambles that describe what something is rather than why it exists
  5. Preserve valuable comments — protect comments that explain why, document workarounds, capture business logic, or serve as public API docs

Process

Phase 1: Scope and Language Detection

Determine the project's language to apply the correct comment syntax patterns:

  • JS/TS: //, / /, /** */ (JSDoc)
  • Python: #, """ (docstrings)
  • Go: //, / /
  • Rust: //, /// (doc comments), //!
  • CSS/SCSS: / /

Scan all source files in scope, excluding node_modules/, dist/, build/, .git/, and vendor directories.

Phase 2: Pattern Matching

Scan for these slop categories:

Category 1 — Restating Comments (highest signal)

Comments that describe the what of the next line:

// Set the name        ← SLOP (next line is: this.name = name)
// Get the user        ← SLOP (next line is: const user = getUser(id))
// Return the result   ← SLOP (next line is: return result)
// Check if valid      ← SLOP (next line is: if (isValid) { ... })
// Initialize the array ← SLOP (next line is: const items = [])
// Import dependencies  ← SLOP (above import block)

Detection heuristic: if the comment can be derived by reading the next 1-2 lines of code, it's slop.

Category 2 — Obvious JSDoc

Parameter docs that only restate the type or name:

/** 
 * @param name - The name           ← SLOP (adds nothing beyond type sig)
 * @param id - The user ID          ← SLOP
 * @returns The result              ← SLOP
 * @returns A boolean               ← SLOP (visible from return type)
 */

Contrast with valuable JSDoc:

/**
 * @param name - Display name shown in the header. Truncated at 50 chars.  ← KEEP
 * @param id - UUID from the auth service, NOT the database row ID         ← KEEP
 * @returns Null if the user has been soft-deleted                         ← KEEP
 */

Category 3 — Filler Section Markers

Decorative dividers with no navigation or organizational value:

// ========================
// --- Helper Functions ---
// ========================

// *** Private Methods ***

// -------- Utils --------

/* =======================
   CONSTANTS
   ======================= */

Exception: section markers in very long files (>500 lines) may have navigation value — flag rather than remove.

Category 4 — "This function/method/class" Preambles

Boilerplate descriptions of what something is:

// This function calculates the total price      ← SLOP
// This method handles the form submission        ← SLOP
// This class represents a user in the system     ← SLOP
// This component renders the navigation bar      ← SLOP

Category 5 — Redundant Inline Comments

const MAX_RETRIES = 3; // maximum number of retries  ← SLOP
let count = 0; // initialize count to zero            ← SLOP
return null; // return null                            ← SLOP

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Slop Remover?

Slop Remover is a subagent for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Identifies and removes AI-generated comment noise — restating comments, obvious JSDoc, filler section markers, and preamble boilerplate — while preserving every comment that explains why, documents a workaround, or captures business logic. Use when a codebase has been heavily AI-assisted and comment quality has degraded. Trigger with \"remove slop comments\", \"clean up AI-generated comments\".

How do I install Slop Remover in Claude Code?

Download slop-remover.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Slop Remover in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Slop Remover safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.