SwiftUI Design

SwiftUI Design is a skill for Claude Code, Codex from duongductrong/cursor-kit. It costs 58 tokens per session (593 once invoked), scanned A, original, MIT.

A guide to designing SwiftUI interfaces, using Apple's framework for building apps across iOS, macOS, watchOS, and tvOS. It covers state, data flow, view composition, platform differences, and modern concurrency.

In plain words
What is it for?
Use it to build or review SwiftUI app screens, choose appropriate state ownership, adapt views across platforms, and split large views into smaller parts.
Why use it?
It helps keep interface code organized and responsive as screens, data, and supported Apple platforms become more complex.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build or review SwiftUI app screens, choose appropriate state ownership, adapt views across platforms, and split large views into smaller parts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/duongductrong/cursor-kit/swiftui-design
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.

Any agent
npx skills add duongductrong/cursor-kit --skill swiftui-design
Clone the repo
git clone --depth 1 https://github.com/duongductrong/cursor-kit

Made for: Claude Code, Codex.

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 SwiftUI Design

README.md
[![agentmods](https://agentmods.dev/badge/skills/duongductrong/cursor-kit/swiftui-design/github.svg)](https://agentmods.dev/skills/duongductrong/cursor-kit/swiftui-design)
Your own site
<a href="https://agentmods.dev/skills/duongductrong/cursor-kit/swiftui-design"><img src="https://agentmods.dev/badge/skills/duongductrong/cursor-kit/swiftui-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for SwiftUI Design

Your own site · 80×15
<a href="https://agentmods.dev/skills/duongductrong/cursor-kit/swiftui-design"><img src="https://agentmods.dev/badge/skills/duongductrong/cursor-kit/swiftui-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 593 The whole file, excluding the scripts and references it only reads on demand.
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.00058 $0.00593
Opus 5 $0.00029 $0.00296
Sonnet 5 $0.00012 $0.00119
Haiku 4.5 $0.00006 $0.00059

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

Security

Grade A, and why

SwiftUI 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 8d 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.

templates/skills/swiftui-design/SKILL.md · 39 lines

What it actually says

 SwiftUI Design Thinking & Architecture

1. Core Philosophy: The Declarative Mindset

You are an expert SwiftUI Engineer. When generating code, you must adhere to these core principles:

  • View = f(State): Never mutate UI directly. Mutate state, let UI react.
  • Single Source of Truth: Data must have ONE owner. Use @Binding or @Environment for passing data, never duplicate it.
  • Composition over Complexity: Break views down. If a body exceeds 50 lines, extract subviews.
  • Modern Concurrency: Prefer the Observation framework (@Observable) over generic ObservableObject (unless supporting iOS 16-).

2. Platform Context Awareness

Before writing code, analyze the user's prompt to determine the target platform.

  • If iOS/Mobile: Apply rules from references/ios.md.
  • If macOS/Desktop: Apply rules from references/macos.md.
  • If Cross-platform: Use #if os(iOS) or responsive design techniques (ViewThatFits) to adapt.

3. Data Flow Standards

  • State Ownership:
    • Use @State for local, view-specific ephemeral state (toggles, text input).
    • Use @State + @Observable class for Feature/Screen Logic (ViewModels).
    • Use @Environment for global dependencies (DI).
  • Avoid:
    • @StateObject / @ObservedObject (Legacy).
    • Passing huge ViewModels into small leaf views (Pass only the necessary data or binding).

4. Coding Style & Aesthetics

  • Avoid "AI Slop": Do not use generic, unstyled lists or default blue buttons unless requested. Apply thoughtful padding, corner radius, and typography.
  • Hardcoded Values: Isolate colors, fonts, and dimensions in constants or extensions (Color+Design.swift).
  • Previewability: Every View MUST have a #Preview. Mock data must be realistic, not "Lorem Ipsum".

5. Performance Guardrails

  • Identifiable: Always ensure data in ForEach is Identifiable.
  • Lazy Loading: Use LazyVStack/LazyHStack for unbounded lists.
  • Stable Views: Ensure struct views are cheap to init. Put heavy initialization logic in .task or ViewModel init.
Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 39 lines · 58 tokens per session scan A 230762c3cddc

Subscribe to this mod's changes

SwiftUI Design is a skill published in the GitHub repository duongductrong/cursor-kit (22 stars, last pushed 5mo ago), licensed MIT. It adds 58 tokens to every session and 593 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

vibe-to-ui

Design systems, motion, mood boards, spatial layout, visual assets, Design Context profiles, and a global Inspiration Library from screenshots, website URLs, inspiration images, music, or fuzzy aesthetic intent. Classifies page archetype, explores 3 product-aware directions before locking tokens (unless exact…

MonkeyUI-dev/vibe-to-ui · 122 tokens

app-icon-studio

Apple app icons: create, generate, evaluate, export, install, or debug iOS AppIcon.appiconset and macOS .icns assets for small-size clarity.

Xopoko/build-swift-apps · 40 tokens

macos-window-architect

Use SwiftUI scene/window modifiers first; switch to macos-appkit-bridge only when SwiftUI cannot express the behavior.

Xopoko/build-swift-apps · 46 tokens

ios-liquid-glass-designer

Implement, refactor, or review iOS 26+ SwiftUI Liquid Glass with native glassEffect, GlassEffectContainer, button styles, availability gates, and non-glass fallbacks.

Xopoko/build-swift-apps · 47 tokens

ios-agent-skill

Expert iOS/Swift developer behavior for AI coding agents. Use when writing, reviewing, or refactoring Swift, SwiftUI, UIKit, or SwiftData code; when designing iOS app architecture (MVVM, Clean Architecture, coordinators, routing); when building UI that must meet Apple's Human Interface Guidelines, contrast, dark-mode…

Nagarjuna2997/ios-agent-skill · 167 tokens

figma-create-design-system-rules

Generates custom design system rules for the user's codebase. Use when user says "create design system rules", "generate rules for my project", "set up design rules", "customize design system guidelines", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server…

ulises-jeremias/agent-toolkit · 71 tokens