slop

slop is a command for coding agents from benshapyro/cadre-devkit-claude. It costs 9 tokens per session (1,082 once invoked), scanned A, original, MIT.

A command that reviews the current branch's changes against the main branch and removes code that looks unnecessarily machine-generated. Examples include excessive comments, redundant checks, unsafe type casts, and inconsistent style.

In plain words
What is it for?
Use it to clean up AI-assisted changes before review, especially comments, defensive checks, type escapes, naming, formatting, and error-handling inconsistencies.
Why use it?
It helps keep a code change aligned with the surrounding codebase and removes additions that add noise or hide real type or design problems.

Command

Part of the cadre-devkit-claude plugin — 10 skills, 10 commands, 7 agents, 3 hooks 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 commands/benshapyro/cadre-devkit-claude/slop
Clone the repo
git clone --depth 1 https://github.com/benshapyro/cadre-devkit-claude

Or install cadre-devkit-claude, the plugin that ships this one along with the rest of its 10 skills, 10 commands, 7 agents, 3 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/benshapyro/cadre-devkit-claude/slop.svg)](https://agentmods.dev/commands/benshapyro/cadre-devkit-claude/slop)
Your own site
<a href="https://agentmods.dev/commands/benshapyro/cadre-devkit-claude/slop"><img src="https://agentmods.dev/badge/commands/benshapyro/cadre-devkit-claude/slop.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 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,082 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.1 $0.00009 $0.01082
Opus 5 $0.00005 $0.00541
Sonnet 5 $0.00002 $0.00216
Haiku 4.5 $0.00001 $0.00108

Measured 5d ago against content hash 4a2fd3d4197c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

slop 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 5d 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.

commands/slop.md · 188 lines

How it starts

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

Slop Command

Check the diff against main and remove all AI-generated slop introduced in this branch.

What is "Slop"?

AI-generated code often has tells that make it look unnatural:

1. Over-Commenting

// BAD: AI slop
// Get the user from the database
const user = await db.getUser(id); // Fetch user by ID

// GOOD: Self-documenting, no comment needed
const user = await db.getUser(id);

2. Defensive Overkill

// BAD: Unnecessary defensive checks
function processUser(user: User) {
  if (!user) {
    throw new Error('User is required');
  }
  if (!user.id) {
    throw new Error('User must have an id');
  }
  // ... when caller already validates
}

// GOOD: Trust internal callers
function processUser(user: User) {
  // Just do the work - caller handles validation
}

3. Type Escapes

// BAD: Casting to escape type issues
const data = response as any;
const items = (result as unknown as Item[]);

// GOOD: Fix the actual type
const data: ResponseType = response;

4. Inconsistent Style

  • Different naming conventions than the file uses
  • Different error handling patterns
  • Different import styles
  • Added JSDoc when file doesn't use it (or vice versa)

5. Unnecessary Try/Catch

// BAD: Wrapping things that don't throw
try {
  const x = a + b;
  return x;
} catch (error) {
  console.error('Failed to add numbers', error);
  throw error;
}

// GOOD: Just do it
return a + b;

6. Verbose Logging

// BAD: Logging everything
console.log('Starting process...');
console.log('User ID:', userId);
console.log('Processing...');
console.log('Done!');

// GOOD: Log meaningful events only (or nothing for simple ops)

Workflow

1. Get the Diff

git diff main...HEAD

Identify all files changed in this branch.

2. For Each Changed File

  1. Read the FULL file (not just the diff) to understand existing patterns
  2. Compare new code against existing style:
    • Comment density
    • Error handling approach
    • Naming conventions
    • Type annotation style
    • Import organization

Read the full file on GitHub · 188 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. 5d ago First seen · 188 lines · 9 tokens per session scan A 4a2fd3d4197c

Subscribe to this mod's changes

slop is a command published in the GitHub repository benshapyro/cadre-devkit-claude (9 stars, last pushed 9mo ago), licensed MIT. It adds 9 tokens to every session and 1,082 once invoked, about $0.0000 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-31.