# Swiftui Best Practices

> SwiftUI best practices for behavior, structure, and performance. Use when designing or reviewing SwiftUI views, state management, layout decisions, animations, or performance tuning; when unsure how to model state vs dependencies; when avoiding conditional view pitfalls; or when optimizing diffing, ForEach identity, and rendering costs. Use when this capability is needed.

- Skill: `tomevault-io/swiftui-best-practices` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/swiftui-best-practices`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/swiftui-best-practices/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/swiftui-best-practices

---


# SwiftUI Best Practices

## Overview

Concise guardrails and checklists for writing correct, maintainable, and performant SwiftUI. Use the cheatsheets below, and open per-theme references for detail: `references/behavior.md`, `references/structure.md`, `references/performance.md`.

## Reference

- Behavior: `references/behavior.md`
- Structure: `references/structure.md`
- Performance: `references/performance.md`

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/ertembiyik) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

