Skip to content

a5c-ai/babysitter / library/specializations/desktop-development/skills/swiftui-view-generator

swiftui-view-generator

Verified

Generate SwiftUI views with proper state management (@State, @Binding, @ObservedObject, @StateObject) and macOS-specific patterns

FileKindSize
README.mdmarkdown1.3 KB
SKILL.mdskill md9.5 KB
# 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`
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
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: 194kUpdated Claude CodeCodexVerifiedInstall