design-system

design-system is a cursor rule for Cursor from moasq/ios-dev-agent. It costs 3,545 tokens per session, scanned A, original, MIT.

A set of rules requiring an iOS app's colors, fonts, and spacing to come from one shared AppTheme design system.

In plain words
What is it for?
Use it when creating or reviewing SwiftUI screens, typography, colors, padding, and spacing.
Why use it?
It prevents scattered hardcoded styling and makes visual changes consistent across the app.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when creating or reviewing SwiftUI screens, typography, colors, padding, and spacing.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/moasq/ios-dev-agent/design-system
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.

Clone the repo
git clone --depth 1 https://github.com/moasq/ios-dev-agent

Made for: Cursor.

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/rules/moasq/ios-dev-agent/design-system.svg)](https://agentmods.dev/rules/moasq/ios-dev-agent/design-system)
Your own site
<a href="https://agentmods.dev/rules/moasq/ios-dev-agent/design-system"><img src="https://agentmods.dev/badge/rules/moasq/ios-dev-agent/design-system.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,545 This file is loaded in full into every session.
When invoked 3,545 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.03545 $0.03545
Opus 5 $0.01773 $0.01773
Sonnet 5 $0.00709 $0.00709
Haiku 4.5 $0.00354 $0.00354

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

Security

Grade A, and why

design-system 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 4d 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.

.cursor/rules/design-system.mdc · 315 lines

How it starts

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

Design System Rules

MANDATORY — AppTheme Is the Single Source of Truth

Every color, font, and spacing value in the app MUST come from AppTheme. No exceptions.

Before writing ANY view code, verify:

  1. Does AppTheme.Colors have a token for the color I need? If not, add one.
  2. Does AppTheme.Fonts have a token for the font I need? If not, add one.
  3. Am I using AppTheme.Spacing for padding/spacing? If not, switch to it.

FORBIDDEN — Hardcoded Styling (Zero Tolerance)

These patterns are BANNED everywhere in feature views. Violations MUST be caught and fixed.

// BANNED — hardcoded colors
.foregroundStyle(.white)                    // use AppTheme.Colors.textPrimary
.foregroundStyle(.white.opacity(0.8))       // use AppTheme.Colors.textSecondary
.foregroundStyle(.white.opacity(0.6))       // use AppTheme.Colors.textTertiary
.foregroundStyle(.black)                    // use AppTheme.Colors.textPrimary
.foregroundStyle(Color.red)                 // define AppTheme.Colors.error or semantic token
.foregroundStyle(Color.blue)                // define AppTheme.Colors.accent or semantic token
.background(.blue)                          // use AppTheme.Colors.* token
.background(Color(hex: "FF0000"))           // define in AppTheme.Colors, reference the token
.tint(.white)                               // use AppTheme.Colors.* token

// BANNED — hardcoded fonts
.font(.system(size: 48))                    // use AppTheme.Fonts.* token
.font(.system(size: 64))                    // use AppTheme.Fonts.* token
.font(.system(.largeTitle, design: .rounded, weight: .bold))  // define in AppTheme.Fonts
.font(.title2)                              // use AppTheme.Fonts.title2
.font(.caption)                             // use AppTheme.Fonts.caption
.font(.headline)                            // use AppTheme.Fonts.headline

// BANNED — hardcoded spacing
.padding(20)                                // use AppTheme.Spacing.*
.padding(.horizontal, 12)                   // use AppTheme.Spacing.*
VStack(spacing: 10)                         // use AppTheme.Spacing.*

Read the full file on GitHub · 315 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. 4d ago First seen · 315 lines · 3,545 tokens per session scan A e4d65062c7cd

Subscribe to this mod's changes

design-system is a cursor rule published in the GitHub repository moasq/ios-dev-agent (4 stars, last pushed 3mo ago), licensed MIT. It adds 3,545 tokens to every session, about $0.0177 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-09-03.