Rule-based prose linter for formulaic AI writing patterns.
Project description
slop-guard
A rule-based prose linter that scores text 0--100 for formulaic AI writing patterns. No LLM judge, no API calls. Pure regex.
It runs ~80 compiled patterns against your text and returns a numeric score, a list of specific violations with surrounding context, and concrete advice for each hit.
Installation
Requires uv.
Run without installing (recommended for MCP setups):
uvx slop-guard
Install a persistent command:
uv tool install slop-guard
Then run:
slop-guard
You can pin versions for reproducibility:
uvx slop-guard==0.1.0
Upgrade an installed tool:
uv tool upgrade slop-guard
Run from source
From a local checkout:
uv run slop-guard
This starts a stdio-based MCP server from the current repository.
Wire into Claude Code
Add to your .mcp.json:
{
"mcpServers": {
"slop-guard": {
"command": "uvx",
"args": ["slop-guard"]
}
}
}
If you want a fixed release, pin it in args, for example: ["slop-guard==0.1.0"].
Tools
check_slop(text) -- Analyze a string. Returns JSON.
check_slop_file(file_path) -- Read a file from disk and analyze it. Same output, plus a file field.
What it catches
The linter checks for overused vocabulary (adjectives, verbs, nouns, hedging adverbs), stock phrases and filler, structural patterns (bold-header-explanation blocks, long bullet runs, triadic lists, bold-term bullet runs, bullet-heavy formatting), tone markers (meta-communication, false narrativity, sentence-opener tells, weasel phrases, AI self-disclosure), rhythm monotony (uniform sentence length), em dash and elaboration colon density, contrast pairs, setup-resolution patterns, and repeated multi-word phrases (4-8 word n-grams appearing 3+ times).
Scoring uses exponential decay: score = 100 * exp(-lambda * density), where density is the weighted penalty sum normalized per 1000 words. Claude-specific categories (contrast pairs, setup-resolution, pithy fragments) get a concentration multiplier. Repeated use of the same tic costs more than diverse violations.
Scoring bands
| Score | Band |
|---|---|
| 80-100 | Clean |
| 60-79 | Light |
| 40-59 | Moderate |
| 20-39 | Heavy |
| 0-19 | Saturated |
Output
Both tools return JSON with this structure:
score 0-100 integer
band "clean" / "light" / "moderate" / "heavy" / "saturated"
word_count integer
violations array of {type, rule, match, context, penalty}
counts per-category violation counts
total_penalty sum of all penalty values
weighted_sum after concentration multiplier
density weighted_sum per 1000 words
advice array of actionable strings, one per distinct issue
violations[].type is always "Violation" for typed records.
Benchmark snapshot
Example score distribution from benchmark/us_pd_newspapers_histogram.py on
PleIAs/US-PD-Newspapers (first 9,001 rows of one local shard):
Example score-vs-length scatter plot from
benchmark/us_pd_newspapers_scatter.py on the same shard:
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slop_guard-0.1.0.tar.gz.
File metadata
- Download URL: slop_guard-0.1.0.tar.gz
- Upload date:
- Size: 16.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46888adb0cb5f1b357b93eb0abd46b9a6b980b99fde663885b2b779c5d7a5ebf
|
|
| MD5 |
2826dcfeec104262c7325b75ef9f41fe
|
|
| BLAKE2b-256 |
5ab921dc961536a6d800663a3da710bcc5d7b385da28ffd3b9d21452bf629cf4
|
File details
Details for the file slop_guard-0.1.0-py3-none-any.whl.
File metadata
- Download URL: slop_guard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cb0a1b7d1f241fd74013ca824afe6c2a17fbde85d919596e3e3c1e6da9b94c8
|
|
| MD5 |
214104a8b6c4cfb07c53a19c259de76e
|
|
| BLAKE2b-256 |
c36d560db1914632b3e494a957db11e4b8cd3b6143a8ad5ea53f6a4d688ba1a7
|