From swift-ui-prototyper
Create a SwiftUI design system from text descriptions or reference images for macOS/iPadOS apps
How this skill is triggered — by the user, by Claude, or both
Slash command
/swift-ui-prototyper:design-system-creatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create custom SwiftUI design systems from text descriptions or reference images, optimized for macOS and iPadOS applications.
Create custom SwiftUI design systems from text descriptions or reference images, optimized for macOS and iPadOS applications.
Activate this skill when the user:
User provides a screenshot of an existing app (DaVinci Resolve, Figma, Final Cut, etc.)
Analysis steps:
User describes the desired style in words.
Keywords to parse:
User provides both image and description for refinement.
Generate a complete design system file in swift-ui-prototype/DesignSystem.swift:
import SwiftUI
// MARK: - Design System
// Generated from: [description or "Reference image analysis"]
// Style: [detected style name]
enum DesignSystem {
// MARK: - Colors
enum Colors {
// Backgrounds
static let backgroundPrimary = Color(white: 0.12)
static let backgroundSecondary = Color(white: 0.15)
static let backgroundTertiary = Color(white: 0.18)
// Text
static let textPrimary = Color(white: 0.95)
static let textSecondary = Color(white: 0.7)
static let textTertiary = Color(white: 0.5)
// Accents
static let accent = Color(white: 0.6) // Or Color.blue, etc.
static let accentHighlight = Color(white: 0.8)
// Semantic
static let success = Color.green
static let warning = Color.orange
static let error = Color.red
// Components
static let sidebarBackground = Color(white: 0.10)
static let sidebarSelected = Color(white: 0.25)
static let listRowEven = Color(white: 0.18)
static let listRowOdd = Color(white: 0.15)
static let divider = Color(white: 0.25)
static let placeholder = Color(white: 0.25)
}
// MARK: - Typography
enum Typography {
static let largeTitle = Font.largeTitle.weight(.bold)
static let title = Font.title.weight(.semibold)
static let headline = Font.headline
static let body = Font.body
static let caption = Font.caption
static let mono = Font.system(.body, design: .monospaced)
}
// MARK: - Spacing
enum Spacing {
static let xxs: CGFloat = 4
static let xs: CGFloat = 8
static let sm: CGFloat = 12
static let md: CGFloat = 16
static let lg: CGFloat = 24
static let xl: CGFloat = 32
static let xxl: CGFloat = 48
}
// MARK: - Corner Radius
enum Radius {
static let sm: CGFloat = 4
static let md: CGFloat = 8
static let lg: CGFloat = 12
static let xl: CGFloat = 16
static let full: CGFloat = 9999
}
// MARK: - Shadows
enum Shadows {
static let sm = Color.black.opacity(0.1)
static let md = Color.black.opacity(0.2)
static let lg = Color.black.opacity(0.3)
}
}
// MARK: - View Extensions
extension View {
func designBackground(_ style: DesignSystem.Colors.Type = DesignSystem.Colors.self) -> some View {
self.background(DesignSystem.Colors.backgroundPrimary)
}
func cardStyle() -> some View {
self
.padding(DesignSystem.Spacing.md)
.background(DesignSystem.Colors.backgroundSecondary)
.clipShape(RoundedRectangle(cornerRadius: DesignSystem.Radius.md))
}
}
// Backgrounds: Very dark grays (0.10 - 0.18)
// Text: Light grays (0.7 - 0.95)
// Accent: Muted gray (no blue)
// Contrast: Subtle, professional
static let backgroundPrimary = Color(white: 0.12)
static let accent = Color(white: 0.6)
// Backgrounds: System dark colors
// Text: System labels
// Accent: Blue (system default)
static let backgroundPrimary = Color(uiColor: .systemBackground)
static let accent = Color.accentColor
// Backgrounds: Near white
// Text: Near black
// Accent: Single color
static let backgroundPrimary = Color(white: 0.98)
static let textPrimary = Color(white: 0.1)
static let accent = Color.blue
// Backgrounds: Deep colors
// Text: High contrast
// Accent: Vibrant, multiple
static let backgroundPrimary = Color(red: 0.1, green: 0.1, blue: 0.15)
static let accent = Color.purple
If image provided:
If text provided:
swift-ui-prototype/DesignSystem.swiftIf prototype views already exist, offer to update them:
DesignSystem.Colors.*DesignSystem.Spacing.*cd {project}/swift-ui-prototype
swift build
### Design System Created
**Style:** Pro Dark (based on DaVinci Resolve reference)
**Color Palette:**
| Role | Value | Preview |
|------|-------|---------|
| Background Primary | `Color(white: 0.12)` | ████ |
| Text Primary | `Color(white: 0.95)` | ████ |
| Accent | `Color(white: 0.6)` | ████ |
**Files:**
- `swift-ui-prototype/DesignSystem.swift` (created)
**Usage:**
```swift
Text("Hello")
.foregroundStyle(DesignSystem.Colors.textPrimary)
.background(DesignSystem.Colors.backgroundPrimary)
## Image Analysis Guidelines
When analyzing a reference image:
1. **Background colors**: Look at main content area, sidebar, headers
2. **Text hierarchy**: Primary text vs secondary vs disabled
3. **Accent usage**: Buttons, selected states, links
4. **Contrast**: High contrast = modern/minimal, low contrast = professional/subtle
5. **Color temperature**: Cool (blue-gray) vs warm (brown-gray) vs neutral
**Color extraction approach:**
- Darkest area → `backgroundPrimary`
- Slightly lighter → `backgroundSecondary`
- Content area → `backgroundTertiary`
- Main text → `textPrimary`
- Metadata/labels → `textSecondary`
- Disabled/placeholder → `textTertiary`
- Interactive elements → `accent`
## Example Interactions
### Example 1: Reference Image
**User:** `/design-system` + [screenshot of DaVinci Resolve]
**Assistant:**
1. Analyzes image: "Dark professional UI with subtle gray contrasts"
2. Extracts colors: Background ~0.12, sidebar ~0.10, text ~0.85
3. Notes: No blue accents, gray icons, alternating list rows
4. Generates DesignSystem.swift with Pro Dark preset
5. Returns summary with color table
### Example 2: Text Description
**User:** `/design-system minimalist light theme for a note-taking app`
**Assistant:**
1. Parses: "minimalist" + "light" + "note-taking"
2. Selects Minimal Light preset as base
3. Adjusts: Lots of whitespace, subtle shadows, focus on readability
4. Generates DesignSystem.swift
5. Returns summary
### Example 3: Refinement
**User:** `Make the accent color more orange, like a sunset`
**Assistant:**
1. Reads existing DesignSystem.swift
2. Updates accent colors to orange palette
3. Adjusts related colors for harmony
4. Rebuilds and verifies
## Dependencies
- swift-ui-prototype project structure (created by prototype-generator)
- SwiftUI (iOS 17.0+ / macOS 14.0+)
## Notes
- Always generate platform-agnostic colors (work on both iOS and macOS)
- Use `Color(white:)` for grayscale, `Color(red:green:blue:)` for colors
- Avoid `UIColor`/`NSColor` directly - use `Color(uiColor:)` or conditional compilation
- Include both light and dark mode support where applicable
npx claudepluginhub kjetilge/kjetil-claude-marketplace --plugin swift-ui-prototyperGenerates production-grade SwiftUI code for Apple Design Award-quality iOS interfaces—screens, components, redesigns—with bold aesthetics and screenshot-driven iteration.
Guides iOS app design and SwiftUI implementation following Human Interface Guidelines, with layouts, navigation patterns, accessibility, and adaptive UI for iPhone/iPad.
Converts Stitch mobile designs to native iOS SwiftUI views with VStack/HStack/ZStack layout mapping, dark mode color assets, NavigationStack/TabView routing, and Xcode project structure.