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.5 $0.00023 $0.00237
Sonnet 5.5 $0.00012 $0.00119
Haiku 4.5 $0.00006 $0.00059

Measured 3mo ago against content hash 230762c3cddc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 (23 stars, last pushed 8mo ago), licensed MIT. It adds 58 tokens to every session and 593 once invoked, about $0.0002 per session on Opus 5.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

SwiftUI Design compared with skills from other repositories

SwiftUI Design next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
SwiftUI Designduongductrong/cursor-kitSkill238mo agoMITA58Claude Code, Codex
maui-themingrootcastleco/rei-skillsSkill117d agononeA157Claude Code, Codex
themed-color-pickerrootcastleco/rei-skillsSkill117d agononeA36Claude Code, Codex
cometchat-flutter-v6-customizationcometchat/cometchat-skillsSkill18217d agoMITA89Claude Code
sleek-design-mobile-appssleekdotdesign/agent-skillsSkill6041mo agoMITA30Claude Code, Codex
compose-uiMeet-Miyani/compose-skillSkill30622d agoMITA148Claude Code
swiftui-animation-matchRayFernando1337/rayfernando-skillsSkill132yesterdayApache-2.0A73Claude Code