design-system

design-system is a command for Claude Code from MadAppGang/magus. It costs 44 tokens per session (2,669 once invoked), scanned C, original, MIT.

A command that checks a project’s interface code against agreed design-system rules, such as shared style tokens and reusable components.

In plain words
What is it for?
Validating or repairing frontend styling and component usage across a project.
Why use it?
It reveals where individual files drift from the project’s visual rules and can correct the problems or add the missing rules.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the dev plugin — 41 skills, 13 commands, 13 agents shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add MadAppGang/magus
Claude Code
/plugin install dev

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 41 skills, 13 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for design-system

README.md
[![agentmods](https://agentmods.dev/badge/commands/madappgang/magus/design-system.svg)](https://agentmods.dev/commands/madappgang/magus/design-system)
Your own site
<a href="https://agentmods.dev/commands/madappgang/magus/design-system"><img src="https://agentmods.dev/badge/commands/madappgang/magus/design-system.svg" alt="Measured on agentmods" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,669 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.02669
Opus 5 $0.00022 $0.01334
Sonnet 5 $0.00009 $0.00534
Haiku 4.5 $0.00004 $0.00267

Measured yesterday against content hash a2a610ed03c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

design-system scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

(`curl -fsSL https://bun.sh/install | bash`) and continue with the manual

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

(`curl -fsSL https://bun.sh/install | bash`) and continue with the manual
plugins/dev/commands/design-system.md · 229 lines

How it starts

The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<user_request>$ARGUMENTS</user_request>

<step number="1" name="Resolve mode and scope">
  Parse $ARGUMENTS. Do NOT ask the user anything that the arguments already answer.

  MODE (default `validate`):
  - `--fix`   → validate, then fix violations
  - `--setup` → scaffold guardrails into a project that lacks them
  - otherwise → validate and report only (read-only)

  SCOPE (default: whole repo):
  - `--changed` → only files changed vs the base branch. Use the plugin's
    capture script rather than a hand-rolled range — it resolves the base,
    includes staged, unstaged and **untracked** files, and never touches the
    index:
    ```bash
    bun "${CLAUDE_PLUGIN_ROOT}/scripts/capture-review-surfaces.ts" \
      --repo "$(git rev-parse --show-toplevel)" --stat
    ```
    If it warns that no base branch resolved, say so in the report and audit
    the working tree only. **Never fall back to `HEAD~1`** — that silently
    audits one commit of a many-commit branch and presents it as the whole
    change.
    Filter to auditable extensions (.tsx .jsx .ts .js .vue .svelte .astro .css .scss .less .html .mdx).
  - a path argument → scope to that path
  - otherwise → repo root

  STRICTNESS:
  - `--strict` → warnings are treated as blocking
  - `--changed` without `--strict` → warnings blocking on changed files only
    (this is the rollout order from `references/enforcement.md`: new code clean
    first, existing drift paid down after)
  - full-repo without `--strict` → warnings are advisory

  If $ARGUMENTS is empty, default to: validate, whole repo, advisory warnings.
  Announce the resolved mode/scope in one line before proceeding.
</step>

<step number="2" name="Preflight">
  Confirm this is a frontend project before auditing. Check for any of:
  `package.json` with react/vue/svelte/astro/next/nuxt, any `.tsx|.jsx|.vue|.svelte`
  file, or a `tailwind.config.*` / `@theme` block.

  If none are present, STOP and report: "No frontend code detected in {path} —
  the design-system guardrails don't apply here." Do not audit further.

  Locate the audit script:
  ```bash
  SCRIPT="${CLAUDE_PLUGIN_ROOT}/skills/frontend/design-system-guardrails/scripts/audit-ui.ts"
  ```
  Check `bun --version`. If bun is missing, tell the user
  (`curl -fsSL https://bun.sh/install | bash`) and continue with the manual
  checks in step 4 only — do not silently skip the audit.
</step>

<step number="3" name="Static audit">
  Run the bundled auditor and parse its JSON:
  ```bash
  bun "$SCRIPT" <scope-paths> --json
  ```
  Useful flags — apply them when the project's conventions call for it, and say so:
  - `--lib <path>` when the component library is not `components/ui`, `design-system`, or `packages/ui`
  - `--layout-components A,B,C` for project-specific layout primitives beyond the built-in set
  - `--allow <glob>` for extra token/theme files where raw values are correct
  - `--skip <check>` only with an explicit reason stated in the report

  The script is a heuristic — it flags for review, it does not prove correctness.
  Before reporting any finding, open the cited line and confirm it is real.
  Discard false positives rather than padding the report.
</step>

Read the full file on GitHub · 229 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 229 lines · 44 tokens per session scan C a2a610ed03c2

Subscribe to this mod's changes

design-system is a command published in the GitHub repository MadAppGang/magus (9 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 2,669 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.