# Build Consistent SwiftUI Interfaces

SwiftUI teams need repeatable patterns for navigation, sheets, forms, lists, and app wiring. This skill provides focused guidance and examples for building maintainable Apple platform interfaces.

## Install

```bash
npx skillstore add dimillian/swiftui-ui-patterns
```

## Metadata

- Status: approved
- Slug: dimillian-swiftui-ui-patterns
- Skillstore revision: r1
- Version status: missing
- Tree hash: 3168f3092974fbb1ffe878f190f48427944b4c2e8a4e934ce8978897d2830cdb
- Author: Dimillian
- GitHub username: Dimillian
- License: MIT
- Repository: https://github.com/Dimillian/Skills/tree/main/swiftui-ui-patterns
- Ref: 72d5025b022c77f7a51bdf5c1637c689c80e89d1
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: network, external\_commands
- Quality score: 76
- Public page: https://skillstore.pages.dev/skills/dimillian-swiftui-ui-patterns
- Manifest: https://skillstore.pages.dev/api/skills/dimillian-swiftui-ui-patterns/manifest

## Capabilities

- Guides TabView, NavigationStack, sheet, form, list, grid, and split-view composition.
- Provides SwiftUI examples for app wiring, environment injection, and route handling.
- Explains UI patterns for loading placeholders, search, focus, haptics, and media views.
- Highlights pitfalls for layout performance, state ownership, navigation history, and accessibility.
- Supports both new SwiftUI screens and refactors inside existing Apple platform apps.

## Use Cases

- Plan a New SwiftUI App Shell: Use the app wiring, TabView, NavigationStack, and sheet patterns to define the first application structure.
- Refactor Existing Screens: Apply focused guidance for forms, lists, grids, overlays, and loading states while preserving local conventions.
- Standardize Team UI Practices: Use the component references to document shared decisions for navigation, theming, menus, and accessibility.

## Prompt Templates

### Choose a Pattern

```
I am building a SwiftUI screen with a list, detail view, and sheet. Which references should I use, and why?
```

### Draft a Screen Structure

```
Design the structure for a SwiftUI settings screen with grouped forms, validation, and a dismiss action.
```

### Refactor Navigation

```
Review this SwiftUI navigation approach and align it with independent tab histories and route enums.
```

### Audit a UI Architecture

```
Audit my SwiftUI app shell for state ownership, dependency injection, sheets, deep links, and loading behavior.
```

## Limitations

- It is a guidance library, not a package that compiles into an app.
- Examples use generic types that must be adapted to each project.
- It does not replace platform documentation or project-specific design review.
- It does not provide production networking, persistence, or authentication implementations.

## Best Practices

- Start with the component reference that matches the primary interaction model.
- Keep SwiftUI state local unless shared services or routing require environment injection.
- Validate examples against the existing project style before adding new abstractions.

## Anti Patterns

- Do not add view models when local SwiftUI state is enough.
- Do not mix multiple sheet patterns for the same presentation concern.
- Do not copy generic examples without adapting names, routes, and dependencies.

## Security Audit

- Audited at: 2026-07-06T12:21:17.761\+00:00
- Summary: The static findings are false positives caused by Markdown formatting, SwiftUI API names, UI best-practice wording, keyboard shortcuts, and a placeholder example URL. I found no evidence of prompt injection, malicious intent, data exfiltration, credential access, or unsafe command execution.

## Stats

- Views: 545
- Downloads: 10
- Favorites: 0
- Popularity score: 0
