Swiftui Patterns
@Observableを使用した状態管理、ビュー合成、ナビゲーション、パフォーマンス最適化、モダンなiOS/macOS UIのベストプラクティスを備えたSwiftUIアーキテクチャパターン。
Install
/plugin marketplace add affaan-m/ECCThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add affaan-m/ECC --skill swiftui-patternsgit clone --depth 1 https://github.com/affaan-m/ECC.git /tmp/ECC
mkdir -p ~/.claude/skills
cp -r /tmp/ECC/docs/ja-JP/skills/swiftui-patterns ~/.claude/skills/swiftui-patternsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# SwiftUI パターン
Appleプラットフォーム向けのモダンなSwiftUIパターン。宣言的で高性能なユーザーインターフェースを構築するために使用する。Observationフレームワーク、ビュー合成、型安全なナビゲーション、パフォーマンス最適化をカバーする。
## 起動条件
* SwiftUIビューを構築し、状態を管理する場合(`@State`、`@Observable`、`@Binding`)
* `NavigationStack` を使用したナビゲーションフローを設計する場合
* ビューモデルとデータフローを構築する場合
* リストと複雑なレイアウトのレンダリングパフォーマンスを最適化する場合
* SwiftUIで環境値と依存性注入を使用する場合
## 状態管理
### プロパティラッパーの選択
最も適したシンプルなラッパーを選択する:
| ラッパー | 使用場面 |
|---------|----------|
| `@State` | ビューローカルな値型(トグル、フォームフィールド、シート表示) |
| `@Binding` | 親ビューの `@State` への双方向参照 |
| `@Observable` クラス + `@State` | 複数のプロパティを持つ所有モデル |
| `@Observable` クラス(ラッパーなし) | 親ビューから渡される読み取り専用参照 |
| `@Bindable` | `@Observable` プロパティへの双方向バインディング |
| `@Environment` | `.environment()` で注入された共有依存関係 |
### @Observable ViewModel
`ObservableObject` ではなく `@Observable` を使用する——プロパティレベルの変更を追跡するため、SwiftUIは変更されたプロパティを読み取ったビューのみを再レンダリングする:
```swift
@Observable
final class ItemListViewModel {
private(set) var items: [Item] = []
private(set) var isLoading = false
var searchText = ""
private let repository: any ItemRepository
init(repository: any ItemRepository = DefaultItemRepository()) {
self.repository = repository
}
func load() async {
isLoading = true
defer { isLoading = false }
items = (try? await repository.fetchAll()) ?? []
}
}
```
### ViewModelを使用するビューDetails
- Skill name
swiftui-patterns- Repository
- affaan-m/ECC
- Path
docs/ja-JP/skills/swiftui-patterns/SKILL.md- License
- MIT
- Repo updated
- 30 October 2026
- Listed in
- hesreallyhim/awesome-claude-code
FAQ
What does the Swiftui Patterns skill do?
@Observableを使用した状態管理、ビュー合成、ナビゲーション、パフォーマンス最適化、モダンなiOS/macOS UIのベストプラクティスを備えたSwiftUIアーキテクチャパターン。
How do I install the Swiftui Patterns skill?
Claude Code plugin: /plugin marketplace add affaan-m/ECC. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Swiftui Patterns popular?
It lives in affaan-m/ECC, which has 293,665 GitHub stars and 43,456 forks, and is included in 1 curated skill list.
Related skills
Accessibility
294kaffaan-m/ECC
WCAG 2.2 レベル AA 標準を用いてインクルーシブなデジタルプロダクトを設計・実装・監査します。Web 用のセマンティック ARIA および Web・ネイティブプラットフォーム(iOS/Android)のアクセシビリティトレイトを生成するために使用します。
Agent Architecture Audit
294kaffaan-m/ECC
エージェントおよび LLM アプリケーション向けのフルスタック診断。12 層のエージェントスタックにおけるラッパーリグレッション、メモリ汚染、ツール規律の失敗、隠れた修復ループ、レンダリング破損を監査します。重要度順の発見事項とコードファーストの修正を生成します。エージェントアプリケーション、自律ループ、または LLM を活用した機能を構築する開発者に必須です。
Agent Eval
294kaffaan-m/ECC
カスタムタスクでコーディングエージェント(Claude Code、Aider、Codex など)をヘッドツーヘッドで比較し、合格率、コスト、時間、一貫性のメトリクスを測定します
Vercel React Native Skills
33kvercel-labs/agent-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
Swift Protocol Di Testing
294kaffaan-m/ECC
テスト可能なSwiftコードのためのプロトコルベースの依存性注入——焦点を絞ったプロトコルとSwift Testingを使用してファイルシステム、ネットワーク、外部APIをモックする。
Monkeydev
6.8kAloneMonkey/MonkeyDev
使用 MonkeyDev 在 Apple Silicon Mac 上创建 Xcode MonkeyApp、MonkeyPod 插件库、越狱 Logos/CaptainHook Tweak 和 iOS 命令行工具,完成插件开发、签名打包、USB/SSH 安装,以及 LLDB 调试、OC 头文件导出、符号还原、Reveal/Lookin 视图检查和方法追踪。
Browse the most popular Claude skills, all mobile development skills, or write your own with the skills generator.