Giving Claude Code a Design-Quality Gate on My Own Site
A local hook that nags during editing and a CI gate that's supposed to block a bad deploy share a detector - but only one of them was ever actually proven to work.
Table of contents
A solo-maintainer site doesn't get a design review from a second pair of eyes before anything ships - there's no one else on the team to catch the gradient-text violation or the clashing spacing scale before it hits production. The fix I landed here was vendoring a third-party Claude Code skill built for exactly that gap, wiring it into two different places, and then - on purpose - breaking the build to find out whether either one actually worked.
Why a solo site wants automated design review at all
Claude Code already does most of the editing on this site: component changes, copy edits, layout tweaks. The failure mode that matters isn't "wrote bad code," it's "wrote code that compiles and renders but looks wrong" - a gradient where there shouldn't be one, spacing that doesn't match the rest of the page, a pattern that reads fine in isolation and clashes with everything around it. Nothing in a type-check or a build step catches that category of problem. A deterministic design-pattern detector, pinned and vendored rather than hand-rolled, was the cheapest way to get a second opinion without hiring one.
How it's actually wired - twice, not once
The skill runs in two completely different places, and they catch different things:
- **A local Claude Code hook.** A
PostToolUsehook fires the immediate-tier detector against design-relevant files right after anEditorWrite, and a deeper full-rule pass runs again on sessionStop. Neither one blocks anything - it just pushes a finding into the agent's own context as a reminder, so a problem surfaces while the change is still open in the same session, not after it's already committed. - **A CI gate in the production-publish pipeline.** A separate workflow does a fresh build, runs the same detector's CLI binary against the built output, and - if it finds real findings - refuses to push to production and files a Gitea issue with the details instead.
Those are genuinely different safety properties. The hook is advisory and fast - it nags you while you're still typing. The gate is the one that's supposed to actually stop a bad build from going live, and advisory tools have a way of getting ignored exactly when a fix is late and the agent is impatient.
The honest version of this story
The first draft of this piece was going to end on a gap: the local hook existed and worked, but the CI gate that was supposed to block production hadn't actually been wired into any workflow yet - a daily review had found the issue-filing script for that gate was dead code, with no workflow in the repo that ever called it. It's a common enough shape in real projects to be worth writing about on its own: build the half that nags you while coding, ship it, and quietly never get around to the half that actually blocks a bad deploy.
That gap got closed before this article did, though, which makes for a better and more honest story than the one originally pitched. The missing publish workflow got built - a dedicated job that does an isolated production build, then runs the same detector against it before anything gets pushed. And rather than take "the gate exists in a YAML file" on faith, the next step was a deliberate self-test: commit an unimported scratch component with an obvious gradient-text violation, push it, and watch what the pipeline actually does.
It did the right thing. The gate failed the check, the sanity-check and push steps were skipped, cleanup still ran, and a Gitea issue got filed automatically with the real findings - closed immediately afterward with a note that the whole incident was a deliberate end-to-end test, not a real production problem. The scratch file was reverted in the very next commit.
The lesson, restated
The gap that made this worth writing about wasn't "the gate doesn't work" - it was that nobody had actually proven it did, and a tool that advises during editing is a different thing from a tool that blocks a deploy, even when they share a detector underneath. Committing the hook config itself (.claude/settings.local.json, normally the kind of file a team would gitignore) was a deliberate call too: for a single-maintainer repo, there's no "everyone needs their own local settings" problem to solve for, so the hook should just work on any future checkout without a manual re-enable step.
The real takeaway generalizes past this one gate: an automated check that only runs locally is a reminder, not a control. If the point is to actually stop a bad build, the only way to trust that is to force it to fail on purpose and watch it do its job - and to be honest in public about the gap that existed before it did.