Your AI agent keeps ignoring your design system. Put it on rails.

design-guardrails prevents AI agents from using native html elements or hard coded styling when they should be using your design system. Deterministic errors force the agent to self-correct during the session, without your intervention.

GitHub
Output without guardrails
signup-form.tsx
 1  return (
 2    <form className="bg-[#F8F9FA] p-8 rounded-xl">
 3      <h2 className="text-[#1A1A2E] text-xl font-bold">
 4        Create account
 5      </h2>
 6      <input
 7        type="email"
 8        placeholder="Email"
 9        className="border-[#CCCCCC] rounded p-2"
10      />
11      <input
12        type="password"
13        placeholder="Password"
14        className="border-[#CCCCCC] rounded p-2"
15      />
16      <button
17        className="bg-[#4F46E5] text-[#FFFFFF] px-4 py-2"
18      >
19        Sign up
20      </button>
21    </form>
22  )
Output with guardrails
signup-form.tsx
 1  return (
 2    <form className="bg-surface p-8 rounded-xl">
 3      <Typo mode="heading" size="xl">
 4        Create account
 5      </Typo>
 6      <Input
 7        type="email"
 8        placeholder="Email"
 9      />
10      <Input
11        type="password"
12        placeholder="Password"
13      />
14      <Button
15        variant="primary"
16      >
17        Sign up
18      </Button>
19    </form>
20  )

Built on Claude Code's PostToolUse hooks: every file write is checked against your design system in real-time, and violations are fed back to the agent before it moves on.

Without design-guardrails

You are the linter

claude code your-project/

pls use <Button> instead of <button>

claude code your-project/

noo, no hard coded colors, use colors defined in tailwind.config

With design-guardrails

Your agent stays on track

PostToolUse hook fired
<button> detected
replaced by <Button> component
Before & After

Same prompt. Different output.

No guardrails
<button>
<input type="radio">
<input type="text">
<a href="...">
#63g5fh
#ffffff
With guardrails
<Button>
<InputRadio>
<Input>
<Link>
text-secondary
bg-background

Why not just use CLAUDE.md or a skill?

Prompt instructions design-guardrails
Rules run as code, not suggestions No Yes
Catches every violation, every time No Yes
Corrects drift mid-session No Yes
Zero babysitting No Yes
How it works

Setup once. Enforce forever.

01

Run the CLI

One command detects your framework, asks which components to enforce, and writes your config.

$ npx design-guardrails
02

Hooks run silently

Every time your agent writes a file, hooks check it against your rules and surface violations instantly.

2 violations found →
03

Agent self-corrects

The agent reads the feedback, fixes the code, and moves on. Zero manual intervention. You keep building.

✓ All violations fixed

Stop babysitting your agent’s output.

Install design-guardrails in one command.