Nov 22, 2026

Score Your Agent's Prose for AI-Slop Patterns with sloptrim

sloptrim is a local detector that scores files your agent saves against 71 documented AI-writing patterns, names the tells, and nudges the rewrite — Python standard library only, no network, no model.

#tutorial#python#productivity

Agents save a lot of prose — reports, docs, READMEs — and too much of it reads like a model wrote it. sloptrim catches that at save time: it scores the file locally, names the flagged spans, and asks for the fix before the slop ships.

Why This Skill Matters

sloptrim is a command-line tool and an agent plugin, and the README's banner rules out a hosted version: nothing you write is uploaded, there is no account, and no text ever leaves your machine. The score is 0–100 against 71 documented patterns; 62 of them have detectors — 50 can move the score and 12 are reported as writing advice only — while the remaining 9 need a reading and are worked during the rewrite. It is a lexical check on prose, never code, and it runs on the Python standard library alone with no network and no model.

Installation

Paste this into Claude Code, Codex, Cursor, or any coding agent:

Install the sloptrim plugin from https://github.com/seyedehsanhadi/sloptrim

Restart, then run /sloptrim doctor. Four [OK] lines mean the local install is healthy — the README notes they test the install, not whether the host delivers hook events, so save a prose file and look for its entry in /sloptrim show. The explicit route is:

/plugin marketplace add seyedehsanhadi/sloptrim
/plugin install sloptrim@sloptrim

A manual install clones the repo into ~/.claude/skills/sloptrim and copies the command file into ~/.claude/commands/ — the README warns not to skip the mkdir -p ~/.claude/commands, which fails on a fresh machine without it. The detector needs Python 3.9 or newer; the hooks need Node.

Real Workflow: Score a Draft, Then Fix the Tells

Ask for a read-only audit:

/sloptrim check draft.md

The file is scored and the tells are named — no rewrite. For a raw JSON pass on any supported file, including Office documents:

python scripts/detect.py draft.docx

A score lands in one of five bands: clean, light tells, mixed, heavy tells, pervasive tells. In the default full mode the guard nudges the agent to fix flagged spans above 40 (strict lowers the bar to 20 and adds a character scrub; lite keeps the contract only, and off disables everything). For headless code jobs, SLOPTRIM_MODE=off silences the prose contract for one run without writing anything back. On hosts other than Claude Code, /sloptrim init writes the contract to AGENTS.md and a rule to .cursor/rules/.

How well does it separate machine from human prose? The README publishes a benchmark built on five matched 30-human/30-machine arms (pinned to one commit of the Human Detectors release): ROC-AUC runs from 0.943 on the GPT-4o arm down to 0.783 on the humanized o1-pro arm. The README is explicit that AUC is a ranking measure, not accuracy at the guard threshold — across these arms the score often ranks machine samples above their matched human ones, and it does not certify authorship.

Tips

  • Twenty formats are supported, including .docx, .pptx, .xlsx, OpenDocument, .epub, .ipynb, and LaTeX — but selection rules apply: DOCX reads main-body paragraphs and tables (not headers, footers, or comments), PPTX skips speaker notes, and PDF/RTF are recorded as unreadable rather than scored.
  • A file written through a Bash command never passes Write or Edit, so the hooks never see it.
  • Long human-written Markdown can score high: in the README's sample, 18 of 102 pre-2022 READMEs scored above 40. Read the named patterns before rewriting a document of that kind.
  • Context cost is about 1,400 tokens at session start and for each subagent in full mode, plus one line per prompt (1,120 in lite, 1,415 in strict).
  • The README's limits section says it directly: it cannot prove whether a model wrote something, and it is not an authorship classifier — a score says something about writing, never about a person.

When Not to Use This

Code is out of scope by design, and so is any authorship judgment. PDF and RTF files are recorded as unreadable rather than scored. If your workflow needs a hosted service or a website, the README states none exists — any site offering one under this name is unrelated to the project.


See the leaderboard for more skills.