# swiftui-preview-convergence
One scenario system that powers SwiftUI previews, tests, and production. Build features where previews are the design linter — if they're hard to construct, the architecture is wrong.
## Install
```bash
claude skill add JordanCoin/swiftui-preview-convergence
```
```bash
npx skills add JordanCoin/swiftui-preview-convergence
```
## Use
```
/swiftui-preview-convergence
```
Triggers automatically when creating or refactoring SwiftUI views, state objects, mocks, fixtures, or dependency injection.
## What it does
Forces a pattern where every feature has:
- Views that only render state and trigger intent
- Protocol-based dependency injection
- Scenario-driven mocks (not placeholder mocks)
- Centralized deterministic fixtures
- Shared constructors that work identically in previews and tests
The same scenario language (`loaded`, `empty`, `error`, `loading`) works everywhere: production wiring, SwiftUI previews, unit tests.
## Why
Preview pain is architectural feedback. If a preview needs real networking, app-wide state, or singleton initialization, the feature is too coupled. This skill provides the pattern to fix that — one abstraction layer, one scenario system, one set of reusable constructors.
## License
MIT