SwiftUI Design Principles

February 24, 2026 ยท View on GitHub

An agent skill that encodes design principles for building polished, native-feeling SwiftUI apps and WidgetKit widgets.

Derived from a side-by-side comparison of two iOS apps built with AI coding tools โ€” one that looked and felt polished, and one where the margins, spacing, text sizes, and widgets were just off. The patterns here represent the concrete differences between the two.

Install

npx skills add arjitj2/swiftui-design-principles

What it covers

#PrincipleWhat it prevents
1Spacing system (base-4/8 grid)Arbitrary padding values like 26, 34, 36pt
2Typography hierarchy (weight-based)7+ font sizes with no clear system
3System semantic colorsHardcoded Color.white.opacity(0.42) everywhere
4Proportional component sizing260pt progress rings, mismatched stroke widths
5Native grouped contentOver-engineered gradient cards with 22pt corners
6NavigationStack usageBare ZStack layouts with manual titles
7WidgetKit native componentsManual circle drawing instead of Gauge
8Interactive elementsHidden Toggle labels, low-contrast tints
9Shared data modelsDuplicated logic between app and widget
10Pre-ship checklistQuick verification before shipping

When it activates

The skill triggers when creating or modifying:

  • SwiftUI views
  • iOS widgets (WidgetKit)
  • Any native Apple UI

Compatible agents

Works with Claude Code, Cursor, Cline, GitHub Copilot, Windsurf, and any agent that supports the Agent Skills format.

License

MIT