anti-slop
Flags comments that narrate the edit and drops stock openers like “You’re absolutely right”. English and Russian.
Install
/plugin marketplace add padezhnov/claude-code-mods /plugin install anti-slop@padezhnov - Version
- 0.2.0
- License
- MIT
- Needs Claude Code
- 2.1.287+
- Works in
- terminal · desktop app · VS Code
The problem
Claude often writes comments that tell the story of the change instead of explaining the code, and keeps doing it after you ask it to stop. A month later “Added null check as requested” explains nothing. Stock openers have the same problem in replies: once Claude says one, it keeps echoing it.
Before and after
// Added null check as requested if (!user) return
The comment narrates the edit and says nothing about why.
// The webhook can arrive before the user exists if (!user) return
Claude rewrites it to say why the check is there.
How it works
- 01 After an edit succeeds, the comment lines it added are checked for ones that tell the history of the change: “Added…”, “as requested”, “used to…”, “Добавил…”, “по просьбе…”.
- 02 Claude gets a short note right then to describe the code as it is now. At most one note per file and three per session. The edit is never refused.
- 03 Openers like “You’re absolutely right” are dropped from the reply as the conversation stores it, so Claude stops echoing them. A short system-prompt section asks it to avoid the listed phrases.
Settings
Change them in /plugin → configure.
Quoted text, comments that describe what the code does, tool directives such as eslint-disable, prose files like .md, scratch files in /tmp, code spans and JSON in replies.
-
commentsnarration · density · off - density also flags edits that add several short one-line captions above code.
-
phraseslist - phrase=>replacement, phrase=> to drop an opener, a bare phrase only to avoid.
-
rewriteon · off - Whether to clean stored replies.
-
beforeNowon · off - Also count Russian “раньше… / теперь…” history comments.
Replayed against 2,816 of my own edits it sent 3 notes, so treat it as a light guard rather than a cleaner. It helps most when Claude writes “// Added X” comments often.
FAQ
Does anti-slop change my code?+
No. It only sends Claude a note after an edit. Claude decides how to fix the comment in its next edit.
Can it block an edit?+
Never. Refusing edits would only cost tokens and time.
Why do I still see “You’re absolutely right” on screen?+
The phrase may already have streamed to your screen. The plugin cleans the stored copy that Claude reads on later turns, so the habit does not repeat.
Which languages does it understand?+
English and Russian comments and replies, in common programming languages.