Agent skill
ios-swiftui-generator
Generate SwiftUI components following Apple HIG. Use when creating iOS UI components, building SwiftUI views, or need code scaffolding for iOS interfaces.
Install this agent skill to your Project
npx add-skill https://github.com/beshkenadze/claude-skills-marketplace/tree/main/skills/development/ios-swiftui-generator
SKILL.md
iOS SwiftUI Generator
Generate production-ready SwiftUI code following Apple Human Interface Guidelines.
When to Use
- Creating new SwiftUI views or components
- Building iOS UI from design descriptions
- Need HIG-compliant code scaffolding
- Converting UI concepts to SwiftUI code
Generation Principles
Always Follow
- Semantic Colors — Use
Color.primary,Color(.systemBackground), not hex - SF Symbols — Prefer system icons over custom assets
- Dynamic Type — Support text scaling with
.font(.body) - Dark Mode — All colors must work in both modes
- Accessibility — Include VoiceOver labels, minimum 44pt touch targets
Code Standards
// ✅ Good
struct ExpenseCard: View {
let expense: Expense
var body: some View {
HStack {
Image(systemName: expense.category.icon)
.foregroundStyle(.secondary)
.accessibilityHidden(true)
VStack(alignment: .leading) {
Text(expense.title)
.font(.headline)
Text(expense.date, style: .date)
.font(.subheadline)
.foregroundStyle(.secondary)
}
Spacer()
Text(expense.amount, format: .currency(code: "USD"))
.font(.headline)
}
.padding()
.background(Color(.secondarySystemBackground))
.clipShape(RoundedRectangle(cornerRadius: 12))
.accessibilityElement(children: .combine)
.accessibilityLabel("\(expense.title), \(expense.amount)")
}
}
// ❌ Bad
struct ExpenseCard: View {
var body: some View {
HStack {
Image("custom-icon") // Use SF Symbols
Text("$50.00")
.foregroundColor(Color(hex: "#333")) // Use semantic
}
.frame(height: 30) // Too small for touch
}
}
Component Templates
Navigation
- Tab Bar (2-5 items)
- Navigation Stack with drill-down
- Modal sheets and full-screen covers
- Search integration
Forms
- Text fields with validation
- Pickers (date, selection, wheel)
- Toggles and steppers
- Secure fields
Lists
- Standard list with sections
- Swipe actions
- Pull-to-refresh
- Empty states
Cards & Containers
- Content cards
- Grouped backgrounds
- Material overlays
Usage
User: Create a settings screen with profile section and preferences
Claude: [Generates SwiftUI code]
- SettingsView with List and sections
- ProfileHeaderView component
- PreferenceRow reusable component
- All using semantic colors and SF Symbols
Output Format
Generated code includes:
- Main view struct
- Supporting subviews
- Preview provider
- Accessibility labels
- Usage comments
Related Skills
ios-design-review— Validate generated codeios-hig-reference— Design guidelines reference
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
skill-with-scripts
A template for skills that include executable code for deterministic operations.
your-skill-name
Brief description of what this Skill does and when to use it. This field is critical for Claude to discover when to invoke your skill.
jis-accessibility
Use when auditing websites for Japanese accessibility compliance, checking JIS X 8341-3 conformance, or advising on Japan's Act for Eliminating Discrimination against Persons with Disabilities.
meeting-notes
Structure meeting transcripts into organized notes with action items, decisions, and key points. Use when processing meeting recordings or creating meeting summaries.
global-accessibility
Use when determining which accessibility law applies to an organization, comparing requirements across jurisdictions (US, EU, Canada, Japan), or planning multi-country accessibility compliance strategy.
aoda-compliance
Use when auditing websites or apps for Canadian accessibility law compliance, checking AODA (Ontario) or Accessible Canada Act (federal) requirements, or advising on CAN/ASC-EN 301 549 obligations.
Didn't find tool you were looking for?