Repository navigation
Show and tell: unslop, an open-source audit for the repetitive Tailwind UI patterns AI coding agents produce (with Tailwind v4 @theme export) #20711
avivgerz-hue
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone, I'm Aviv, the author of unslop. Disclosure up front: this is my own project. It is MIT licensed, free, has no hosted service, and has zero runtime dependencies. I'm sharing it here because most of what it checks shows up in Tailwind codebases.
The problem I was trying to solve
When you ask an AI coding agent for a landing page or dashboard in Tailwind, the output compiles and looks "fine", but it converges on the same defaults again and again:
from-purple-500 via-pink-500 to-indigo-500style gradients and neon glows.p-[13px]that quietly break the spacing scale, plusrounded-3xlon everything.transition-all, clickabledivs and missing focus or reduced-motion handling.tscandnpm run buildcannot see any of that, and neither can a type-checker, so the agent reports "done".What unslop does
It is a CLI, an MCP server and an agent skill. The audit is deterministic: 72 rules across seven pillars (color and contrast, typography, layout and spatial rhythm, surface and elevation, copy, interaction and motion, theme and token architecture). Each finding has a file:line:column location, and the result is a 0 to 100 score with a per-pillar breakdown, so you can use
--fail-underin CI or in an agent loop.The refactor plan maps what it found to replacements, for example
from-purple-500 via-pink-500 to-indigo-500becomesbg-[var(--surface-1)],p-[13px]becomesp-[var(--spacing-12)]andtransition-allbecomestransition-colors motion-reduce:transition-none.Since this is the Tailwind repo, the token side may be the most relevant part. It installs one of ten built-in design archetypes (or extracts design DNA from CSS or a URL) and exports the same tokens in four formats:
The v4 output is an
@themeblock plus:rootand.darkcontracts. The v3 output is a mergeabletheme.extendfragment. The current version is v2.1.1 on npm.Honest limitations
Repo: https://github.com/avivgerz-hue/unslop
Feedback is very welcome, especially rules that produce false positives on real Tailwind v4 projects and token output that does not match how you structure
@theme. Issues and PRs are welcome too.All reactions