Skip to content
View swatchdog-dev's full-sized avatar

Block or report swatchdog-dev

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
.github/profile/README.md

Swatchdog Banner

The drift check for AI-built apps.

swatchdog is a free MCP tool your agent calls on its own UI code. It checks every color, radius, spacing, font and type value against your design tokens and returns the exact token to use instead.

Free. No account, no key, nothing to buy.


Connect

In Claude: Settings → Connectors → find swatchdog in the connector directory → Connect.

Claude Code:

claude mcp add --transport http swatchdog https://mcp.swatchdog.dev/mcp

Any MCP client (Cursor, Claude Desktop and others):

{
  "mcpServers": {
    "swatchdog": {
      "type": "http",
      "url": "https://mcp.swatchdog.dev/mcp"
    }
  }
}

No headers and no auth. Leave them empty.


How it works

  1. Your agent gets your design tokens: from your Tailwind config, CSS variables, or tokens you approve.
  2. After it writes UI code, it calls check_design_drift with those tokens and the code.
  3. swatchdog returns every off-token value, with the token to use instead.
  4. Your agent fixes them and checks again until nothing is left.

swatchdog reports drift. It never edits your code. The fixing, and the review, stay with your agent and you.

Why not just a linter? A linter checks that code is valid. color: #ff00ff is valid CSS, so a linter passes it, even when magenta isn't in your palette. swatchdog catches exactly that.

Why not just give the agent the tokens? You should, and it will still drift. Agents round and interpolate even with the rules in front of them. swatchdog checks the result where the drift happens.


The tool

check_design_drift (read-only)

  • reference_tokens (object, required): your design tokens, for example {"color":{"primary":"#b06ed0"},"radius":{"md":"6px"}}
  • code (string, required): the UI code to check

It reads CSS and SCSS declarations, inline styles, and Tailwind arbitrary values such as p-[13px] and text-[#b06ed0]. It reads declared styles and tokens, not pixels.

For each violation it returns the axis (color, radius, spacing, font or type), the value found, the expected token and its value, and where it was found.

Example result:

{
  "ok": false,
  "count": 2,
  "violations": [
    { "axis": "color", "found": "#ff00ff", "at": "content:1", "expected": "color.primary", "expectedValue": "#b06ed0" },
    { "axis": "radius", "found": "9px", "at": "content:1", "expected": "radius.md", "expectedValue": "6px" }
  ]
}

Code is limited to 262,144 characters per call. For larger changes, check the changed files or components one at a time.


See it in action


Privacy

swatchdog doesn't store the code or design tokens you check. They're processed to produce the result and then dropped. Full policy: swatchdog.dev/privacy.html.


Made by swatchdog.dev · hey@swatchdog.dev · a Ziola project

Popular repositories Loading

  1. swatchdog-mcp swatchdog-mcp Public

    MCP design system validator for agentic coding. Detects design drift in agent-built UI.

    6

  2. .github .github Public

    MCP design system validator for agentic coding. Detects design drift in agent-built UI.

    3