This skill should be used when the user asks to "generate SwiftUI components", "create design system", "build form inputs", "create currency fields", "implement loading states", "generate reusable components", or needs guidance on SwiftUI component architecture.
From ios-dev-toolkitnpx claudepluginhub nbkm8y5/claude-plugins --plugin ios-dev-toolkitThis skill uses the workspace's default tool permissions.
references/component-patterns.mdreferences/sample-app-guide.mdscripts/generate_component.pyscripts/generate_design_system.pySearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
Generate production-ready SwiftUI components with proper architecture, accessibility, and state management. Accelerate UI development with pre-built, customizable components perfect for financial apps, forms, and data-driven interfaces.
python scripts/generate_component.py <type> <ComponentName> <output_path>
Available component types:
button - Action buttons with multiple stylestext_field - Text input with validationcurrency_field - Currency input with formattingpercentage_field - Percentage input with sliderloading_view - Loading states (spinner/progress/inline)empty_state - Empty data placeholdersform_section - Grouped form inputsExample:
# Generate currency field for mortgage calculator
python scripts/generate_component.py currency_field LoanAmountField ./Sources
# Generate percentage field for interest rate
python scripts/generate_component.py percentage_field InterestRateField ./Sources
# Generate button component
python scripts/generate_component.py button PrimaryButton ./Sources
python scripts/generate_design_system.py <output_path> [ProjectName]
Creates a complete design system with:
Example:
python scripts/generate_design_system.py ./Sources
python scripts/generate_design_system.py ./Sources MortgageApp
Every generated component includes:
# Create your design system foundation
python scripts/generate_design_system.py ./YourApp/Sources
This creates DesignSystem.swift with:
# For mortgage calculator
python scripts/generate_component.py currency_field LoanAmountInput ./Sources
python scripts/generate_component.py percentage_field InterestRateInput ./Sources
python scripts/generate_component.py button CalculateButton ./Sources
# For forms
python scripts/generate_component.py text_field EmailField ./Sources
python scripts/generate_component.py form_section FormGroup ./Sources
# For loading states
python scripts/generate_component.py loading_view LoadingSpinner ./Sources
python scripts/generate_component.py empty_state NoDataView ./Sources
All generated components are fully editable templates. Customize:
Combine components to build complex UIs:
struct MortgageCalculator: View {
@State private var loanAmount: Decimal = 250000
@State private var rate: Double = 6.5
var body: some View {
Form {
FormSection("Loan Details") {
LoanAmountInput(amount: $loanAmount)
InterestRateInput(percentage: $rate)
}
CalculateButton("Calculate", style: .primary) {
calculate()
}
}
}
}
Read references/component-patterns.md when you need:
When to read: Before building complex forms, implementing validation, or setting up state management.
Read references/mortgage-calculator-guide.md when you need:
When to read: Building any financial calculator or mortgage-related UI.
button)Purpose: User actions and navigation
Styles:
.primary - Main call-to-action (blue background).secondary - Secondary actions (gray background).tertiary - Text-only buttons (no background).destructive - Delete/remove actions (red background)Features:
text_field)Purpose: Text input with validation
Validation rules:
.required - Cannot be empty.email - Valid email format.minLength(n) - Minimum character count.maxLength(n) - Maximum character count.custom((String) -> String?) - Custom validationFeatures:
currency_field)Purpose: Currency input with proper formatting
Features:
Perfect for:
percentage_field)Purpose: Percentage input with slider and text field
Features:
Perfect for:
loading_view)Purpose: Indicate loading states
Styles:
.spinner - Full-screen spinner with message.progress(Double) - Progress bar with percentage.inline - Compact inline loading indicatorFeatures:
empty_state)Purpose: Show when no data exists
Features:
Use cases:
form_section)Purpose: Group related form inputs
Features:
Perfect for:
Components are validated in CI:
Components follow best practices:
Components demonstrate:
Components are testable:
Always generate the design system first. It provides:
Don't write components from scratch:
Group related inputs in form sections:
FormSection("Loan Details") {
// Multiple related inputs
}
FormSection("Terms", footer: "Helpful context") {
// More inputs
}
Use built-in validation on text fields:
ValidatedTextField("Email", text: $email, validation: .email)
ValidatedTextField("Name", text: $name, validation: .required)
Build complex UIs from simple components:
// Complex calculator view
struct Calculator: View {
var body: some View {
Form {
LoanInputSection() // Multiple currency fields
TermSection() // Percentage + picker
ResultsSection() // Custom display
ActionSection() // Button
}
}
}
Before building complex features:
component-patterns.mdmortgage-calculator-guide.md# Generate all needed components
python scripts/generate_design_system.py ./Sources MortgageApp
python scripts/generate_component.py currency_field LoanAmountField ./Sources
python scripts/generate_component.py currency_field DownPaymentField ./Sources
python scripts/generate_component.py percentage_field InterestRateField ./Sources
python scripts/generate_component.py button CalculateButton ./Sources
python scripts/generate_component.py form_section FormGroup ./Sources
python scripts/generate_component.py empty_state EmptyCalculation ./Sources
# Then read the mortgage calculator guide
# references/mortgage-calculator-guide.md has complete examples
# Generate form components
python scripts/generate_design_system.py ./Sources
python scripts/generate_component.py text_field EmailField ./Sources
python scripts/generate_component.py text_field PasswordField ./Sources
python scripts/generate_component.py button SubmitButton ./Sources
python scripts/generate_component.py form_section Section ./Sources
python scripts/generate_component.py loading_view LoadingView ./Sources
# Read validation patterns
# references/component-patterns.md section on validation
# Generate display components
python scripts/generate_design_system.py ./Sources
python scripts/generate_component.py loading_view DataLoader ./Sources
python scripts/generate_component.py empty_state NoData ./Sources
python scripts/generate_component.py form_section StatCard ./Sources
@State for local state@Binding for parent-child communication@FocusState for keyboard management@ObservedObject in reusable componentsEach component should:
Every component should:
Test components with:
When customizing components:
After generating components:
For complete examples and patterns, read the reference documentation:
references/component-patterns.md - General patternsreferences/mortgage-calculator-guide.md - Financial appsYou now have the tools to build production-ready SwiftUI UIs 50% faster!