sloptrim

by seyedehsanhadiVerified

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

185
Stars
14
Forks
Python
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/seyedehsanhadi/sloptrim

Getting Started

Guides for using skills like sloptrim.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

sloptrim

A local detector for AI-writing patterns. It scores the first 256 KB 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

[!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.

A recorded session. The contract arrives at session start, again on the prompt, and again inside a subagent. 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. Every hook latency is measured.
A recorded session, not a mock-up. record/session_capture.py fires the real hooks with the payloads Claude Code sends and writes record/session.json; record/anim.py 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 record/draft.md, a short piece written for the recording.

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.

Explicit commands, and installing without the marketplace
/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.

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 256 KB 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
Suite119 Python tests and 72 hook checks, green in CI on 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
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
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.9460.876–0.99246.7% / 0%
Claude 3.5 Sonnet0.8420.729–0.9363.3% / 0%
o1-pro0.8770.771–0.95723.3% / 6.7%
paraphrased GPT-4o0.8380.735–0.9296.7% / 3.3%
humanized o1-pro0.7620.648–0.8710% / 3.3%
Public matched benchmark ROC-AUC: GPT-4o 0.946, Claude 3.5 Sonnet 0.842, o1-pro 0.877, paraphrased GPT-4o 0.838, humanized o1-pro 0.762.

Across these arms, Sloptrim achieved ROC-AUC 0.762–0.946. 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

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.

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.

License

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

Frequently Asked Questions

What is sloptrim?

sloptrim is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by seyedehsanhadi. A local detector for AI-writing patterns. Scores every prose file your agent saves. Python standard library only, no network, no model. It has 185 GitHub stars.

Is sloptrim safe to use?

Yes. sloptrim passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install sloptrim?

Clone the repository with "git clone https://github.com/seyedehsanhadi/sloptrim" and add it to your Claude Code skills directory (see the Installation section above). sloptrim ships a SKILL.md manifest, so compatible agents can discover and load it automatically.

What programming language is sloptrim written in?

sloptrim is primarily written in Python. It is open-source under seyedehsanhadi on GitHub, so you can review or fork the full source.

Are there alternatives to sloptrim?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh sloptrim against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details