Sloptrim Agent Skill

by seyedehsanhadi• 412•• Scanned•Claim this listing•Request removal
Content & Writingai agentsai slopclaude codeclaude code pluginclaude code plugins marketplace

A local detector for AI-writing patterns. Scores every prose file your agent saves. Python standard library only, no network, no model.

Sloptrim is an open-source agent skill by seyedehsanhadi, written mainly in Python, with 412 GitHub stars and the Apache-2.0 license. Its code was last updated Oct 22, 2026.

<div align="center"> <h1> <picture> <source media="(prefers-color-scheme: dark)" srcset="assets/sloptrim-logo-dark.svg"> <img src="assets/sloptrim-logo.svg" width="358" alt="sloptrim"> </picture> </h1>

A local detector for AI-writing patterns. It scores the first 262,144 characters of extracted prose in files saved through supported file-edit tools, and asks for the flagged spans to be fixed. Plain text is accepted up to 512 KB, supported archives up to 4 MB. Python standard library only, no network, no model. Prose only, never code.

test Version License Dependencies Tests Python

Install · What it does · Measured · Limits · Patterns · Ethics

</div>

[!IMPORTANT] This is a command-line tool and an agent plugin. There is no website and no hosted version. Nothing you write is uploaded, there is no account, and no text ever leaves your machine. Any site offering a service under this name is unrelated to this project.

<picture> <source media="(prefers-color-scheme: dark)" srcset="assets/demo-dark.svg"> <img src="assets/demo-light.svg" width="800" alt="A recorded session. The contract arrives at session start and again inside a subagent, and each prompt gets a one-line reminder. A saved file scores 45 and its patterns are named. After the fix the next read is clean at 15. The same text saved as a .docx scores the same, read out of the zip, and inside a source file it is not scored. Every hook latency is measured."> </picture> <div align="center"><sub>A recorded session, not a mock-up. <a href="record/session_capture.py">record/session_capture.py</a> fires the real hooks with the payloads Claude Code sends and writes <a href="record/session.json">record/session.json</a>; <a href="record/anim.py">record/anim.py</a> draws it. The hook lines, the scores and the milliseconds come from that capture; the grey labels beside them are narration. The prose being scored is <a href="record/draft.md">record/draft.md</a>, a short piece written for the recording.</sub></div>

Install

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

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

Restart, then run /sloptrim doctor. It answers with four [OK] lines. They test the local install, not whether the host delivers hook events, so save a prose file and look for its entry in /sloptrim show.

<details> <summary>Explicit commands, and installing without the marketplace</summary>
/plugin marketplace add seyedehsanhadi/sloptrim
/plugin install sloptrim@sloptrim
git clone https://github.com/seyedehsanhadi/sloptrim.git ~/.claude/skills/sloptrim
mkdir -p ~/.claude/commands
cp ~/.claude/skills/sloptrim/install/sloptrim-command.md ~/.claude/commands/sloptrim.md

Do not skip the mkdir. On a fresh machine ~/.claude/commands does not exist yet and the copy fails with "No such file or directory". In PowerShell the last two lines are New-Item -ItemType Directory -Force $HOME/.claude/commands and Copy-Item. The copy puts /sloptrim in the / menu, because Claude Code does not scan a skill folder's own commands/. A marketplace install needs no such step. Either way the router also answers to /sloptrim:sloptrim.

</details>

What it does

The score is 0-100 against 71 documented patterns. 62 of them have a detector; the other 9 need a reading and are worked during the rewrite. Of the 62, 50 can move the score and 12 are reported as writing advice and count for nothing: most of them because measurement showed they mark formal register rather than machine authorship, the rest because they are typographic habits.

Formats20, including .docx, .pptx, .xlsx, OpenDocument, .epub, .ipynb, LaTeX; the first 262,144 characters of extracted prose is scored
Runs inClaude Code, on save. Other agents via /sloptrim init, which writes the contract to AGENTS.md, and .cursor/rules/
NeedsNode for the hooks, Python 3.9 or newer for the detector, nothing else
Suite222 Python tests and 83 hook checks, with CI configured for Linux, Windows and macOS, against Python 3.9 and 3.13 (macOS on 3.13)
Does not seeA file written by a Bash command, which reaches disk without passing Write or Edit
Context costAbout 1,400 tokens at session start and for each subagent in full (1,120 in lite, 1,415 in strict), plus a one-line reminder per prompt. SLOPTRIM_MODE=off makes it zero for a run
CommandEffect
/sloptrim fullContract + guard (default)
/sloptrim strictFlags at 20 instead of 40, and asks for a character scrub
/sloptrim lite / offContract only / nothing
/sloptrim check <file>Score a file, name the tells, no rewrite
/sloptrim initWrite the contract to ./AGENTS.md and a Cursor rule to ./.cursor/rules/
/sloptrim doctorDiagnose the install

For one run only, set SLOPTRIM_MODE to off, lite, full or strict. It beats the saved level and is never written back, so a headless code job can run SLOPTRIM_MODE=off claude -p ... without paying for the prose contract (about 1,400 tokens at session start and the same for each subagent).

python scripts/detect.py draft.docx    # JSON: patterns, metrics, 0-100 score

A score lands in one of five bands: clean, light tells, mixed, heavy tells, pervasive tells. The guard nudges above 40, or above 20 in strict mode.

Measured

Sloptrim's public matched benchmark uses five separate 30-human/30-machine arms from the Human Detectors release, pinned at commit afcf03d. Each arm is matched by prompt and scored separately. AUC is a ranking measure, not accuracy at Sloptrim's guard threshold.

machine armROC-AUCbootstrap 95% CIdefault TPR / FPR
GPT-4o0.9430.870–0.99246.7% / 0%
Claude 3.5 Sonnet0.8420.729–0.9363.3% / 0%
o1-pro0.8810.777–0.95723.3% / 3.3%
paraphrased GPT-4o0.8320.728–0.9256.7% / 3.3%
humanized o1-pro0.7830.668–0.8890% / 3.3%
<picture> <source media="(prefers-color-scheme: dark)" srcset="assets/detection-dark.svg"> <img src="assets/detection-light.svg" width="756" alt="Public matched benchmark ROC-AUC: GPT-4o 0.943, Claude 3.5 Sonnet 0.842, o1-pro 0.881, paraphrased GPT-4o 0.832, humanized o1-pro 0.783."> </picture>

Across these arms, Sloptrim achieved ROC-AUC 0.783–0.943. Confidence intervals use 10,000 paired prompt-cluster bootstrap resamples. The public result record pins the source hash; the harness refuses any other file. The benchmark texts are not redistributed here.

git clone https://github.com/jenna-russell/human_detectors.git
git -C human_detectors checkout afcf03d14d2da4a038d8d0fafa5ec779dd858181
python scripts/benchmark_frontier.py PATH_TO_HUMAN_DETECTORS_JSON

What it cannot do

Format support means reading selected text, not rebuilding every document. DOCX/DOCM read main-body paragraphs and tables, excluding headers, footers and comments. Explicit code styles (Code, SourceCode, CodeBlock, CodeChar, HTMLPreformatted) are excluded; inherited styles and unmarked code are not resolved. Monospace fonts alone do not imply code. PPTX/PPTM read slide text, excluding speaker notes. XLSX/XLSM read cell text; OpenDocument reads content.xml; EPUB reads HTML/XHTML members; notebooks read Markdown cells only. Embedded images/OCR are unsupported. PDF and RTF are recorded as unreadable rather than scored. Plain formats use Markdown-style code masking; .tex paths additionally protect common math, comments, literal-code environments, citations and preambles. This is a lexical check: it does not expand custom macros, resolve includes, or parse every MDX/RST/Org/AsciiDoc construct.

--clean prints text. It must never be redirected over an Office archive, EPUB or notebook. Use a format-aware editor for prose revisions and validate the saved document. Pass a .tex filename to preserve its syntax context; stdin is treated as Markdown/plain prose.

It cannot prove whether a model wrote something. The public arms show that the score often ranks these machine samples above matched human samples. The threshold results show why that is not the same as a dependable yes/no classifier: sensitivity changes sharply with model, prompt, formatting and threshold.

Long Markdown documents written by people can score high. Headings, bullet lists and bold labels are counted, and a long project README has many of each. In a sample of 102 READMEs written before 2022, 18 scored above 40. Read the named patterns before rewriting a document of that kind.

It is not an authorship classifier and must not be used as one. A score says something about writing, never about a person. Read ETHICS.md.

Related

Privacyassay measures what a website can read from your browser and scores how much of it your browser hides. Same idea applied to a different surface: run the check locally, upload nothing, report what the evidence supports and no more. Source at seyedehsanhadi/privacyassay.

License

Apache-2.0 (full text, NOTICE). Cite with CITATION.cff.

Sloptrim alternatives

View more →

Similar agent skills in Content & Writing, ranked by GitHub stars. Compare licence, recent activity and scan status before you choose.

NameStarsLicenceLast updatedScan
Sloptrim (this page)
seyedehsanhadi
412Apache-2.0Oct 22, 2026Scanned, no flagged issues
Humanizer
blader
63kMITOct 28, 2026Scanned, no flagged issues
Obsidian Skills
kepano
51kMITSep 15, 2026Scanned, no flagged issues
Agentskills
agentskills
27kApache-2.0Aug 9, 2026Scanned, no flagged issues
Im Not AI
epoko77-ai
6.3kMITOct 12, 2026Scanned, no flagged issues
Open Knowledge
inkeep
4.8kGPL-3.0Oct 31, 2026Scanned, no flagged issues