/ Directory / Playground / SwiftUI Agent Skill
● Community twostraws ⚡ Instant

SwiftUI Agent Skill

by twostraws · twostraws/SwiftUI-Agent-Skill

Paul Hudson's SwiftUI patterns packaged as a Claude skill.

By Paul Hudson (Hacking with Swift), this skill teaches Claude modern SwiftUI: @Observable, NavigationStack, async views, proper state ownership. The result: SwiftUI code that actually compiles and follows Apple's current guidance.

Why use it

Key features

Live Demo

What it looks like in practice

swiftui-agent-skill.replay ▶ ready
0/0

Install

Author repository · Claude Skills documentation

Use Cases

Real-world ways to use SwiftUI Agent Skill

Build a settings screen the right way (iOS 17+)

👤 iOS devs ⏱ ~15 min intermediate

When to use: You want a Settings screen that's actually idiomatic for iOS 17+.

Prerequisites
  • Server/skill installed and authenticated — See repo README
Flow
  1. Plan
    Using the SwiftUI skill, design a Settings view with sections: Account, Notifications, About. Use @Observable for the view model.✓ Copied
    → View hierarchy + ViewModel sketch
  2. Code
    Write the full file with toggles, NavigationLink to subpages, and a confirmation dialog for sign-out.✓ Copied
    → Compiles on Xcode 15+

Outcome: Idiomatic SwiftUI you don't have to rewrite next year.

Pitfalls
  • Don't mix @StateObject with @Observable — Don't mix @StateObject with @Observable — the skill enforces one or the other; follow it.

Cost & Limits

What this costs to run

API quota
See provider docs for rate limits
Tokens per call
Varies by tool
Monetary
See repo README for pricing details
Tip
Cache tool results and avoid repeated identical calls.

Security

Permissions, secrets, blast radius

Credential storage: Use environment variables; never commit secrets
Data egress: Tool calls go to the provider's API as documented

Troubleshooting

Common errors and fixes

view doesn't update on state change

Ensure the property is on an @Observable class, not a struct. The skill's checklist covers this.

Verify: @Observable annotation present
preview crashes

@Observable views need a real instance in #Preview. The skill's examples show the pattern.

Verify: Preview compiles

Alternatives

SwiftUI Agent Skill vs others

AlternativeWhen to use it insteadTradeoff
wholiver/swiftui-design-skillYou want design direction, not code patternsDesign-focused; twostraws is code-focused

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills

Continue exploring

Related tools and workflows

Choose another guide for your workflow, or explore a collection.

Browse all topic collections → · See 29 new official additions →