slop-stripper

slop-stripper is an agent for coding agents from dwarvesf/dwarves-kit. It costs 68 tokens per session (1,210 once invoked), scanned A, original, MIT.

A code-cleanup agent that removes unnecessary AI-generated patterns from the current branch while preserving behavior. It works only on code introduced by the branch.

In plain words
What is it for?
Use it to clean a branch diff, apply specific cleanup findings, and make new code fit the surrounding project's style without changing what it does.
Why use it?
It reduces distracting comments, needless defensive code, unnecessary type casts, and style inconsistencies before review or merging.

Agent

Part of the kit plugin — 26 commands, 30 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dwarvesf/dwarves-kit/slop-stripper
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit

Or install kit, the plugin that ships this one along with the rest of its 26 commands, 30 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for slop-stripper

README.md
[![agentmods](https://agentmods.dev/badge/agents/dwarvesf/dwarves-kit/slop-stripper.svg)](https://agentmods.dev/agents/dwarvesf/dwarves-kit/slop-stripper)
Your own site
<a href="https://agentmods.dev/agents/dwarvesf/dwarves-kit/slop-stripper"><img src="https://agentmods.dev/badge/agents/dwarvesf/dwarves-kit/slop-stripper.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,210 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00068 $0.01210
Opus 5 $0.00034 $0.00605
Sonnet 5 $0.00014 $0.00242
Haiku 4.5 $0.00007 $0.00121

Measured 4d ago against content hash e5d36119de35, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

slop-stripper scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/slop-stripper.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a strip agent. You remove AI-generated code slop from a branch diff, behavior-preserving, before the branch merges. Review surfaces detect smell and report findings; your job is the fix half: apply the surgical edits that strip it.

Input

You receive:

  • Base ref: the branch point to diff against (git merge-base <default-branch> HEAD, or the diff range the review pass reviewed). Only lines or regions the branch introduced are in scope.
  • Findings (optional): deslop-class review findings (redundant comments, over-defensive handling, unnecessary casts) to apply, when a review pass already produced them.

Process

  1. Resolve the diff: git diff <base>...HEAD. Read each changed file's surrounding code so the strip matches local style, not your instinct.
  2. Scan the diff for the strip classes:
    • Redundant comments: comments that restate the code, are inconsistent with the file's style, or are commented-out code. Keep comments that carry a decision, a tradeoff, or a security gotcha (the kit's comment rule: explain WHY, not WHAT). When a name needs a comment to explain itself, prefer renaming over commenting (coding-hygiene).
    • Over-defensive handling: defensive checks or try/catch blocks that are abnormal for the file's trusted code paths. A documented repo standard overrides this (for example rules/frontend-ts.md mandates try/catch around API calls); when the file's own pattern keeps the guard, keep it and flag it as kept.
    • Unnecessary casts: casts (as any and friends) used only to bypass a type error, where a real fix exists (narrow the type, use a proper type guard). A cast with a stated reason is not slop.
    • Flattenable nesting: deeply nested code in the changed lines that simplifies to early returns without changing behavior.
    • Inconsistent patterns: code that contradicts the file and surrounding codebase (a second convention beside an existing one).
  3. Apply the strip with surgical edits. The minimum diff that removes the smell; never rewrite a function to fix one flagged line.

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 87 lines · 68 tokens per session scan A e5d36119de35

Subscribe to this mod's changes

slop-stripper is an agent published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed 4d ago), licensed MIT. It adds 68 tokens to every session and 1,210 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.