design

An interactive command that creates a project's design system from brand choices such as colors and typography. A design system is a shared set of visual rules and reusable values for a product's interface.

In plain words
What is it for?
Use it to generate design tokens, connect them to Tailwind CSS, account for existing project settings, and create a visual showcase of the resulting styles.
Why use it?
It turns design decisions into reusable token files and Tailwind CSS output instead of leaving them as scattered choices.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ruizrica/toolkit/design
Clone the repo
git clone --depth 1 https://github.com/ruizrica/toolkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,461 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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 $0.00000 $0.01461
Opus 5 $0.00000 $0.00731
Sonnet 5 $0.00000 $0.00292
Haiku 4.5 $0.00000 $0.00146

Measured 3d ago against content hash d83a6b501ba7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

design scanned grade A with 0 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 3d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/design.md · 184 lines

How it starts

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

/design

Interactive design system generator that gathers brand preferences through Q&A, scaffolds semantic design tokens, and creates both standalone token files and Tailwind-integrated outputs. Finishes by invoking /frontend-design to produce a visual showcase of the generated tokens.

Usage

/design [project name or path]

Arguments

Argument Required Description
project name or path No Where to output the design system (defaults to current directory)

Workflow Phases

The design pipeline runs through 5 phases:

Phase 0: Context Detection

Scans the project for existing configuration:

  • Existing tokens.json or design-tokens.* files (used as defaults)
  • tailwind.config.* (auto-patched to import generated theme)
  • package.json framework hints (React, Vue, Svelte, Sass)
  • iOS/Android project files

Phase 1: Interactive Q&A (7 Questions)

Questions are asked one at a time via interactive prompts:

# Topic Options
1 Project context Output path selection
2 Colors Hex values, extract from project, or starter palette
3 Typography System fonts, Google Fonts, or custom
4 Spacing 4px base (Tailwind), 8px base (Material), or custom
5 Border radius Rounded, sharp, pill, or custom
6 Shadows Subtle, elevated, none, or custom
7 Output formats Multi-select: CSS, SCSS, iOS Swift, Android XML, Style Dictionary

Colors use semantic naming: brand-green, content-primary, surface-muted — not generic names like primary-500.

Phase 2: Token Generation

Creates design-system/tokens.json as the canonical source of truth:

  • brand-* — Brand identity colors with full shade scales (50–950)
  • content-* — Text colors (primary, secondary, muted, inverse)
  • surface-* — Background colors (default, muted, elevated, inverse)
  • border-* — Border colors (default, muted)
  • Typography, spacing, border radius, and shadow tokens

Read the full file on GitHub · 184 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. 3d ago First seen · 184 lines · 0 tokens per session scan A d83a6b501ba7

Subscribe to this mod's changes

design is a command published in the GitHub repository ruizrica/toolkit (5 stars, last pushed 18d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,461 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.