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.
npx agentmods add rules/jasonhnd/design-md-generator/cursorrulesgit clone --depth 1 https://github.com/jasonhnd/design-md-generatorWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00587 | $0.00587 |
| Opus 5 | $0.00293 | $0.00293 |
| Sonnet 5 | $0.00117 | $0.00117 |
| Haiku 4.5 | $0.00059 | $0.00059 |
Grade A, and why
cursorrules 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Design MD Generator — Cursor Rules
You have access to a design system extraction tool. When the user asks you to match a website's visual style, build UI that looks like a specific site, or create a DESIGN.md:
Quick Start
# Extract design tokens from any website
npx design-md-gen https://example.com
# Output appears in output/<domain>/tokens.json
Using an Existing DESIGN.md
If the user has a DESIGN.md file in the project root or provides one:
- Read the DESIGN.md file completely before writing any UI code
- Use ONLY the colors, fonts, sizes, and shadows specified in the DESIGN.md
- Do NOT invent colors or typography not present in the document
- Follow the "Agent Prompt Guide" (Section 9) for quick reference values
- Match interaction states (hover, focus, active) as documented in Section 4
Generating a New DESIGN.md
If no DESIGN.md exists and the user wants to match a site's style:
- Run
npx design-md-gen <url>to extract design tokens - Read the generated
tokens.jsonfrom the output directory - Use the extraction data to write a DESIGN.md following this 9-section format:
-
- Visual Theme & Atmosphere
-
- Color Palette & Roles
-
- Typography Rules
-
- Component Stylings
-
- Layout Principles
-
- Depth & Elevation
-
- Do's and Don'ts
-
- Responsive Behavior
-
- Agent Prompt Guide
-
Critical Rules
- ALL numerical values (hex colors, font sizes, weights, shadows) MUST come from the extraction data or DESIGN.md — never hallucinate
- Use 6-digit lowercase hex format (#ffffff, not #FFF or #FFFFFF)
- Use numeric font weights (400, 700) not words (regular, bold)
- When the DESIGN.md specifies a custom font, check if it's available; fall back to the documented fallback stack if not
Verification
After generating UI, verify against the DESIGN.md:
- Every hex color used should appear in Section 2
- Every font-size/weight combination should appear in Section 3
- Shadow values should match Section 6
- Spacing should follow Section 5's scale
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.
- 2d ago First seen · 68 lines · 587 tokens per session scan A 01e47c0b5bc3
cursorrules is a cursor rule published in the GitHub repository jasonhnd/design-md-generator (10 stars, last pushed 4mo ago), licensed MIT. It adds 587 tokens to every session, about $0.0029 per session on Opus 5. 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.
Other cursor rules, from other repositories
css-postcss
Source: docs/agents/css-postcss.md Regenerate: npm run agents:sync -w packages/openbridge-webcomponents -->.
taste-enforcement
These dials drive all downstream decisions. Adjust per-prompt when the user specifies a different mood.
design-animation-rules
Taste is trained, not innate. Reverse engineer animations. Inspect interactions. Unseen details compound — a thousand barely audible voices all singing in tune. Beauty is leverage.
sigil-conventions
All CSS variables use the --s- prefix: var(--s-primary), var(--s-surface), etc.
mcp-tools
Rules for adding or modifying MCP tools in src/mcp/server.ts.
cursorrules
Read AGENTS.md before writing any code. It carries the engineering standard this repository is held to — control flow, error handling, immutability, structure — plus the architecture, the invariants and why each one exists. CLAUDE.md is the short version: gates and traps.