# Swiftui

> Use when reading, writing, refactoring or reviewing SwiftUI.

- Skill: `elegantchaos/swiftui` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add elegantchaos/swiftui`
- Raw SKILL.md: https://api.skillmd.com/api/skills/elegantchaos/swiftui/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: elegantchaos (https://skillmd.com/u/elegantchaos)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/elegantchaos/swiftui

---


Adopt the recommended patterns in `references/patterns.md` as the basis for writing, refactoring and reviewing SwiftUI code.

Avoid the potentially harmful patterns. Flag them in existing code.

Other guidelines:

- Use the `swift` and `coding-standards` skills to ensure the code is modern, clean, and maintainable.
- Don't use deprecated API - see `references/api.md`.
- Follow the rules in `references/views.md`.
- Implement the data flow using `references/data.md`.
- Read `references/localization.md` when writing or reviewing user-facing strings.
- Ensure navigation is updated and performant using `references/navigation.md`.
- Ensure the code uses designs that are accessible and follow guidelines using `references/design.md`.
- Validate accessibility compliance including Dynamic Type, VoiceOver, and Reduce Motion using `references/accessibility.md`.
- Ensure the code is able to run efficiently using `references/performance.md`.
- Read `references/sdk27.md` when targeting SDK 27 APIs, resolving SwiftUI source incompatibilities after an SDK update, or adding availability-sensitive features.
- Avoid UIKit and AppKit unless requested, and use SwiftUI equivalents instead.

## Command Pattern

If `elegantchaos/Commands` is in the project dependencies, use the Command pattern for actions that are triggered by user interaction.
This helps to decouple the view from the business logic and makes it easier to test and maintain.

