a5c-ai/babysitter / library/specializations/desktop-development/skills/swiftui-view-generator
swiftui-view-generator
VerifiedGenerate SwiftUI views with proper state management (@State, @Binding, @ObservedObject, @StateObject) and macOS-specific patterns
README.md
View on GitHub# swiftui-view-generator
Generate SwiftUI views with proper state management for macOS applications.
## Overview
This skill creates well-structured SwiftUI components using appropriate state management patterns (@State, @Binding, @ObservedObject, @StateObject) for macOS desktop applications.
## Quick Start
```javascript
const result = await invokeSkill('swiftui-view-generator', {
projectPath: '/path/to/swift-project',
viewName: 'ContentView',
viewType: 'screen',
stateProperties: [
{ name: 'items', type: '[Item]', wrapper: 'StateObject' },
{ name: 'selectedItem', type: 'Item?', wrapper: 'State' }
],
includeViewModel: true,
macOSSpecific: true
});
```
## Features
### View Types
| Type | Description |
|------|-------------|
| screen | Full screen/window view |
| component | Reusable UI component |
| list | List/Table view |
| form | Form/Settings view |
| sheet | Modal sheet |
### State Wrappers
- @State - Local view state
- @Binding - Two-way binding
- @StateObject - Owned observable
- @ObservedObject - Injected observable
- @EnvironmentObject - Shared state
## Generated Files
- View.swift - SwiftUI view
- ViewModel.swift - ObservableObject
- Preview helpers
## Related Skills
- `macos-entitlements-generator`
- `xctest-ui-test-generator`
## Related Agents
- `swiftui-macos-expert`
- `desktop-ux-analyst`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |