css-slop-detector
Score your CSS/HTML for AI-generated design cliches — the "AI slop" look: oversized border radii, glassmorphism on everything, purple gradients, neon glows, pure-black dark mode with no light toggle, and giant centered hero titles.
If AI built your site, this tells you in one number how obvious it is.
v2 adds --fix: a one-click detect-and-fix loop that rewrites the slop
for you (with backups and dry-run diff previews).
Zero dependencies. Python standard library only.
Install
pip install css-slop-detector
Or run the single file straight from the repo:
git clone https://github.com/hahahahahahahahah6/css-slop-detector
cd css-slop-detector
python3 css_slop.py scan style.css
Requires Python 3.9+.
Usage
Scan
$ css-slop styles.css
styles.css: score 68/100 (slop)
L12 [big-radius] oversized border-radius (32px) on '.card'
L12 [glass] backdrop-filter blur on '.card' (glassmorphism)
L15 [purple-gradient] purple/violet gradient on '.hero'
L22 [hero-center] giant centered title (font-size: 72px) on '.hero h1'
L1 [no-light-mode] dark-only design: near-black backgrounds with no
light-mode toggle or prefers-color-scheme: light found
Works on .css files and .html files (scans <style> blocks and inline
style="..." attributes). Machine-readable output with --json; fail CI
with --fail-over 50 (exit 1 when any file scores 50 or higher).
Fix (v2)
Preview what the fixer would change — writes nothing:
$ css-slop --dry-run styles.css
styles.css: 7 fixes (big-radius x1, glass x1, glow-shadow x1, hero-center x1,
no-light-mode x1, pure-black x1, purple-gradient x2) — score 100 -> 0 [dry-run, nothing written]
--- a/styles.css
+++ b/styles.css
...
Apply the fixes. The original is backed up to styles.css.bak first:
$ css-slop --fix styles.css
styles.css: 7 fixes (...) — score 100 -> 0 [applied, backup: styles.css.bak]
$ css-slop --restore styles.css # undo: restore the backup
What --fix rewrites (only patterns the scanner flags — it de-slops, it
doesn't redesign):
| rule | automatic rewrite |
|---|---|
big-radius |
clamp border-radius ≥ 20px to 12px |
glass |
remove backdrop-filter: blur(...) |
purple-gradient |
swap purple/violet stops for neutral slate |
glow-shadow |
replace neon glow with a soft 0 4px 6px rgba(0,0,0,0.1) shadow |
pure-black |
lift #000 surfaces to soft #1e1e1e |
hero-center |
shrink giant centered titles to 32px, left-align |
no-light-mode |
append a prefers-color-scheme: light hook block |
Rules
| rule | what it flags |
|---|---|
big-radius |
border-radius ≥ 20px |
glass |
backdrop-filter: blur |
purple-gradient |
purple/violet/indigo/fuchsia gradients |
glow-shadow |
colored box-shadow with blur ≥ 24px |
pure-black |
#000-style backgrounds |
hero-center |
text-align: center + font-size ≥ 40px in one rule |
no-light-mode |
dark-only design, no light-mode toggle found |
Scores: 0–20 clean, 21–50 mild slop, 51–80 slop, 81–100 peak slop.
Differentiation
Generation side vs. detection+fix side. Tools like
pbakaus/impeccable (and design-skill
collections like ui-skills or hallmark) teach AI to generate better design —
they improve the prompt. This does the opposite: it scores the finished
product's AI fingerprints, then closes the loop with one command —
--fix rewrites the flagged patterns for you, with a diff preview, automatic
backups, and --restore to undo. Detect + fix, not just detect.
One file, no dependencies, runs in CI.
License
MIT
Metadata
Release files for css-slop-detector 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| css_slop_detector-0.2.0.tar.gz | 13.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| css_slop_detector-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.5 kB
Release files / css_slop_detector-0.2.0.tar.gz
| Download URL | css_slop_detector-0.2.0.tar.gz |
|---|---|
| Size | 13.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1220ca259b1e1be0c964750c27d16087f006e50ba268ad6b4407a89927f1c8eb
|
|
BLAKE2b-256 checksum How to use checksums |
333a42f4c100b3d8f80bd58b4c08a7e29531e0ca50fac0aa90e3b604c28877e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / css_slop_detector-0.2.0-py3-none-any.whl
| Download URL | css_slop_detector-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32e9c40f97101ec4572e9b47133c1ab604d88a6ea37fbedb7785ee0bb0e250e5
|
|
BLAKE2b-256 checksum How to use checksums |
2db73d86757ef363875cf5444d56ae2b606f9452d293b150dca881673ff6bc4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|