From ui-design-skills
Generate slop-free SwiftUI UI for iOS 17+ (iPhone and iPad). Use whenever the user asks to build, design, scaffold, restyle, or improve a SwiftUI screen, View, sheet, NavigationStack, tab, or any iOS interface. Greenfield mobile coverage — does not replace any existing skill. Two phases — tokens first (with approval gate), then UI — both gated by a self-audit checklist that the model MUST run before claiming done.
npx claudepluginhub rshzrh/ui-design-skills --plugin ui-design-skillsThis skill uses the workspace's default tool permissions.
You are generating production-grade iOS UI in SwiftUI (iOS 17+) and Swift 5.9+. This skill exists because untouched LLMs produce **AI slop**: purple→pink LinearGradients, default centered VStack heros, three-card LazyVGrid features, magic numbers everywhere (`.padding(13)`, `.cornerRadius(7)`), Inter on iOS, glassmorphism on every card, "Get Started" buttons, and the median of every SwiftUI tut...
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Share bugs, ideas, or general feedback.
You are generating production-grade iOS UI in SwiftUI (iOS 17+) and Swift 5.9+. This skill exists because untouched LLMs produce AI slop: purple→pink LinearGradients, default centered VStack heros, three-card LazyVGrid features, magic numbers everywhere (.padding(13), .cornerRadius(7)), Inter on iOS, glassmorphism on every card, "Get Started" buttons, and the median of every SwiftUI tutorial scraped from GitHub. This skill replaces guesses with constraints.
The non-negotiable rule: NEVER use a buzzword in place of a token. Words like clean, modern, professional, sleek, premium are banned from your reasoning. Every aesthetic choice must trace back to a named anchor recipe in anchors.md and a value in Theme/Tokens.swift.
iOS adds a second non-negotiable: HIG mechanics are strict. 44pt minimum touch targets. SF Symbols only for system icons. Dynamic Type mandatory. Safe area respected. NavigationStack for navigation. .sheet / .fullScreenCover for modal presentation. Swipe-back gesture preserved. Brand has freedom over color, custom typography (with declared system fallback), accent, motion personality, and shape — not over the platform mechanics above.
Before any other action, check for:
DESIGN_RULES.md # at repo root → if exists, you are in EXTEND mode
*/Theme/Tokens.swift # → if exists, you are in EXTEND mode
*/Theme/ThemeModifier.swift
.swiftlint.yml # check for custom slop rules
DESIGN_RULES.md exists: read it. Read the existing Tokens.swift. Skip to Step 3 (Phase 2: UI). Use only existing tokens. NEVER add new colors/spacing/radii without asking.Tokens.swift exists but no DESIGN_RULES.md: read tokens, infer the closest matching anchor, ask the user to confirm the inferred anchor, then write DESIGN_RULES.md and proceed to Phase 2.Use AskUserQuestion to gather, in this order:
anchors.md (one-line summary each). Note that Apple Music / Podcasts is the most native to iOS and the safest default. Let the user pick 1–3. If 2–3, ask which is primary and which contributes type vs color vs motion.ban-patterns.md with the 3 default-on items pre-checked. Confirm.Do NOT ask vibe questions ("how should it feel?"). Ask only the questions above.
Generate, in this order:
<App>/Theme/Tokens.swift — enum-based tokens. Use the template at templates/Tokens.swift.tmpl. Required enums: Theme.Color, Theme.Spacing, Theme.Radius, Theme.Font, Theme.Shadow, Theme.Motion.<App>/Theme/ThemeModifier.swift — EnvironmentKey-driven theme injection so views never reach into Tokens through string literals or hardcoded paths.Background, Surface, Accent, TextPrimary, TextSecondary, semantic (Success, Warning, Danger) — each with Any Appearance and Dark Appearance variants in Assets.xcassets. List the assets the user must add; do not invent hex values without anchor justification..swiftlint.yml patch — enable the slop-blocking custom rules from templates/swiftlint.yml.tmpl.DESIGN_RULES.md at repo root — fill templates/DESIGN_RULES.md.tmpl with the chosen anchors, active bans, token file paths, and verification command.CLAUDE.md patch — append (do not overwrite): Before any UI/UX work, read and follow DESIGN_RULES.md.Then run the Token Audit from verification.md and print the PASS/FAIL table to the user. Do not proceed to Phase 2 until the user approves.
Generate the requested screen/View using only values from Theme.*. Follow:
component-anatomy.md — exact rules for Button, TextField, List/Form rows, NavigationStack, sheets, ConfirmationDialog, Alert, TabView, ProgressView, ContentUnavailableView, form fields.motion.md — easing curves and durations.copy-voice.md — every string is real, contextual copy. No lorem ipsum, no filler. Honor iOS button conventions (Cancel left, primary right; "Done" capitalized in nav bars).icons-imagery.md — SF Symbols ONLY for system icons. Never Lucide / Phosphor / custom inline SVG when SF Symbols has the glyph.Then run the UI Audit from verification.md AND swiftlint. Print the audit table. Fix every FAIL before claiming done.
| File | When to read |
|---|---|
anchors.md | Step 1, before showing the user choices. ALWAYS read fully — never quote from memory. |
ban-patterns.md | Step 1, when showing ban menu. Step 2 and 3, when verifying. |
component-anatomy.md | Step 3, before writing any View. |
motion.md | Step 3, when adding any .animation or withAnimation. |
copy-voice.md | Step 3, before writing any user-facing string. |
icons-imagery.md | Step 3, when choosing SF Symbols or images. |
verification.md | After Step 2 (Token Audit) and after Step 3 (UI Audit). MANDATORY — do not skip. |
templates/* | Use as the basis for the generated files; fill placeholders, never ship as-is. |
.padding(13), .frame(width: 372), .cornerRadius(7), Color(red: 0.2, green: 0.4, blue: 0.6), Color(hex: "#3a4f6b"). Every value must come from Theme.Spacing, Theme.Radius, Theme.Color, Theme.Font, or Theme.Motion. If you need a value that does not exist, ask the user to add it.LinearGradient(colors: [.purple, .pink], ...), no [.indigo, .purple], no .ultraThinMaterial on cards (only on chrome — toolbar, sheets — where iOS uses it natively)..frame(minHeight: 44) or .contentShape..font(.body), .font(.headline), Theme.Font.body() — never fixed .system(size: 14) outside Theme.Font. Test at xxxLarge..ignoresSafeArea unless intentional and documented inline with a // SAFE-AREA-IGNORE: <reason> comment..accessibilityLabel("...")).Theme.Color. Verify by toggling preview.Image(systemName:) always. Custom Image("name") only for brand artwork.