cursor-rule

A set of rules for making user-interface changes follow the project's DESIGN.md file, which defines visual choices such as colours, spacing, fonts, and animation.

In plain words
What is it for?
Use it when building or editing web interfaces to keep components consistent, usable on touch devices and different screen sizes, and aligned with the project's design tokens.
Why use it?
It prevents interface code from using inconsistent visual values and makes interactive elements account for keyboard focus, loading, errors, disabled states, screen sizes, and reduced motion.

Cursor rule

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 rules/eldergenix/super-design/cursor-rule
Clone the repo
git clone --depth 1 https://github.com/Eldergenix/SUPER-DESIGN
Per session 528 This file is loaded in full into every session.
When invoked 528 The same file — it is already loaded in full.
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.00528 $0.00528
Opus 5 $0.00264 $0.00264
Sonnet 5 $0.00106 $0.00106
Haiku 4.5 $0.00053 $0.00053

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

Security

Grade A, and why

cursor-rule 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.

skill/skills/super-design/templates/shims/cursor-rule.mdc · 37 lines

What it actually says

Design System Rules

Read DESIGN.md at the project root before any UI work. It is the closed token layer — every color, spacing, typography, radius, shadow, and animation value in component code MUST reference a token defined there.

Hard rules

  • No hardcoded values in component code — no #hex, no rgb(), no hsl(), no unscaled px. Reference a token.
  • Every interactive element defines hover, focus-visible, active, disabled. Buttons add loading. Inputs add error, readonly.
  • Use :focus-visible for keyboard focus rings. 3px outline, 2px offset, 3:1 contrast.
  • Animate only transform and opacity. Never width/height/top/left/margin/padding.
  • Respect prefers-reduced-motion. Replace movement with opacity changes.
  • Max 300 LOC per component file. Extract when JSX nests > 4 levels deep.
  • Min 44×44 touch targets. 8px minimum gap.
  • Responsive at 320/375/768/1024/1440/1920. Container queries for reusable components, media queries for page shells.

Reference

Full skill and framework adapters live at .claude/skills/super-design/. Load on demand:

  • references/tokens-schema.md — DTCG token format
  • references/state-matrix.md — required states per component + ARIA
  • references/animation-tokens.md — durations / easings / recipes
  • references/responsive-patterns.md — breakpoints / clamp / container queries
  • references/component-quality-gates.md — LOC / complexity / scoring
  • references/screenshot-to-code-workflow.md — 7-pass extraction loop
  • references/framework-adapters/{tailwind-v4,tailwind-v3,shadcn,mui,radix,geist}.md

Self-check before declaring done

Run bash .claude/skills/super-design/scripts/quality-score.sh <file>. Target ≥ 90 (grade A).

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. 2d ago First seen · 37 lines · 528 tokens per session scan A f3d32c67382c

Subscribe to this mod's changes

cursor-rule is a cursor rule published in the GitHub repository Eldergenix/SUPER-DESIGN (3 stars, last pushed 1mo ago), licensed MIT. It adds 528 tokens to every session, about $0.0026 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.