guard-my-design-system

Your design system, guarded.

Your design system dies one pull request at a time. This makes sure it doesn't.

A free pull request guard on npm, and a GitHub Action. It checks only the lines a change adds, says nothing about the past, and points each new sin at the on-system value the author probably meant:

Only added lines are checked; the existing codebase is never judged. Read only, no network, no telemetry. Every release is provenance signed on npm and passes the snapshot suite before it ships.

On every pull request
name: guard on: pull_request permissions: { contents: read, pull-requests: write } jobs: guard: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 with: { fetch-depth: 0 } - uses: gregkozakiewicz/guard-my-design-system@v1

Five minutes, once, in .github/workflows/guard.yml. After that you forget it exists, which is the whole point of a smoke alarm.

On your machine
npx guard-my-design-system@latest

Judge your uncommitted work against main before anyone else sees it. One command in any repo, no install. Not on GitHub? The same CLI slots into GitLab and Bitbucket pipelines — copy-paste recipes are in the README.

What a pull request sees

The guard's comment on real code: every finding with a file path and line, every stray next to the value the author probably meant.

The guard's comment on a pull request: six new issues, each with a file path and line, stray colours shown with swatches next to their nearest token, an off-scale spacing value next to its nearest step, a new typeface, an !important, and an arbitrary Tailwind value

Every command

The full documentation lives at github.com/gregkozakiewicz/guard-my-design-system.

CommandWhat you get
npx guard-my-design-system@latestYour working tree's added lines judged against main, in the terminal
npx guard-my-design-system@latest <path>Judge a different repo than the current directory
... --base <ref>Diff against something other than main
... --strictExit 1 on findings, so it slots into scripts and hooks
... --markdownThe verdict as markdown, the same text the PR comment carries
... --jsonFindings as JSON on stdout, for scripts and pipelines
... --exclude lab/Leave folders out of the system scan. A .roastignore file at the repo root works too
... --versionThe version, without needing a repo

The family

roast-my-design-system diagnoses the whole codebase: a health score against a 34-repo benchmark, the receipts behind it, and the agent rules that keep AI-written UI on-system. Guard keeps new work from adding to the pile. Roast diagnoses it, guard protects it, and the guard's own comment ends by pointing at the inspector.

Your design system dies one pull request at a time. This makes sure it doesn't.