plugins/ios-architecture/skills/ios-clean-architecture/SKILL.md
iOSアプリのSPMパッケージ構成・レイヤー依存関係・設計原則を定義。iOS機能実装・コードレビュー時に参照。no problem製SPMパッケージの使用指針を含む。
npx skillsauth add no-problem-dev/claude-code-plugins ios-clean-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
iOSアプリのクリーンアーキテクチャに基づくパッケージ構成と設計原則。
┌─────────────────┐
│ Presentation │ SwiftUI Views, Components
└────────┬────────┘
│
┌───────────┬────────────┼────────────┬───────────┐
▼ ▼ ▼ ▼ ▼
┌────────┐ ┌────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐
│ State │ │UseCases│ │Repository│ │ Services │ │ External │
│ │ │ │ │ │ │ │ │ SPM (4) │
└────┬───┘ └────┬───┘ └────┬─────┘ └────┬─────┘ └──────────────┘
│ │ ↘ │ ↙ │
│ └─────┬────┴──────┬─────┘
│ ▼ │
│ ┌──────────────┐ │
└──────►│ Domain │◄────┘
└──────────────┘
注: UseCasesはRepository・Servicesの両方に依存可能。ServicesはDomainのみに依存。
| パッケージ | 責務 | 依存先 | |-----------|-----|--------| | Domain | ドメインモデル・値オブジェクト・列挙型 | なし | | Services | 再利用可能なアプリケーションサービス(外部SDK連携等) | Domain のみ | | Repository | API通信・データ永続化 | Domain, APIClient | | State | @Observable状態管理 | Domain, Authentication | | UseCases | ビジネスロジック(Protocol定義) | Domain, Repository, Services | | Presentation | SwiftUI View・コンポーネント | 全て |
| パッケージ | モジュール名 | 用途 | 使用レイヤー |
|-----------|------------|-----|------------|
| swift-design-system | DesignSystem | テーマ・色・スペーシング・UIコンポーネント | Presentation |
| swift-authentication | Authentication | Firebase Auth統合(Google/Apple Sign-In) | State, Presentation |
| swift-ui-routing | UIRouting | 型安全ナビゲーション(Router, TabPresenter) | Presentation |
| swift-api-client | APIClient | HTTP通信クライアント | Repository |
// ✅ Presentation → 全て(最上層)
import Domain
import State
import UseCases
import Repository
import DesignSystem
import UIRouting
import Authentication
// ✅ UseCases → Domain + Repository + Services
import Domain
import Repository
import Services
// ✅ State → Domain + Authentication
import Domain
import Authentication
// ✅ Repository → Domain + APIClient
import Domain
import APIClient
// ✅ Services → Domain(外部サービス連携)
import Domain
// ✅ Domain → なし(最下層)
// 外部依存ゼロ(Foundationのみ許可)
// ❌ Domain層での外部import
import Foundation // ✅ OK(標準ライブラリ)
import UIKit // ❌ 禁止
import SwiftUI // ❌ 禁止
import DesignSystem // ❌ 禁止
// ❌ 下位レイヤーから上位への参照
import Presentation // ❌ 循環依存
// ❌ UseCases → State
import State // ❌ 状態管理は上位レイヤーの責務
// ❌ Services → Repository(Servicesは独立性を保つ)
import Repository // ❌ ServicesはDomainのみに依存
実装前に確認:
詳細は REFERENCE.md を参照。
content-media
Swift Design Systemを使用したiOS UI実装スキル。デザイントークン、UIコンポーネント(Button、Card、Chip、FAB、Snackbar、Picker等15種)、レイアウトパターンのベストプラクティスを提供。「デザイン」「UI」「テーマ」「カラー」「タイポグラフィ」「スペーシング」「ボタン」「カード」「FAB」「Snackbar」「Picker」「SwiftUI」「DesignSystem」などで自動適用。
content-media
UIの視覚的差分を検出・比較する。デザイン変更前後の比較、リファレンスとの差分確認時に使用。「デザイン比較」「UI差分」「design diff」「design compare」「ビフォーアフター」「見た目の違い」などのキーワードで自動適用。
testing
SwiftUI ViewのDesign System準拠性を監査する。既存UIのレビュー、デザインチェック時に使用。「デザインレビュー」「UIチェック」「design audit」「デザイン監査」「UI監査」「デザインチェック」「トークン確認」などのキーワードで自動適用。
tools
デザインシステム準拠のSwiftUIコンポーネントを生成する。新しいUIパーツの作成、コンポーネント生成時に使用。「コンポーネント作成」「新しいUI」「パーツ作成」「component generate」「UIパーツ」「新規コンポーネント」などのキーワードで自動適用。