SwiftUIを使ったiOSアプリのUI実装を支援するスキル。View + #Preview macroを生成し、既存の共通コンポーネントを活用しながら効率的にUIを構築する。以下のような場合にこのスキルを使用: (1)「〇〇画面を作って」のような画面作成リクエスト (2)「〇〇のUIをデザインして」のようなUIデザインリクエスト (3)「このコンポーネントを実装して」のようなコンポーネント実装リクエスト (4) SwiftUIのView作成全般
Scanned 2/12/2026
Install via CLI
openskills install majiayu000/claude-skill-registry---
name: ios-ui-builder
description: SwiftUIを使ったiOSアプリのUI実装を支援するスキル。View + #Preview macroを生成し、既存の共通コンポーネントを活用しながら効率的にUIを構築する。以下のような場合にこのスキルを使用: (1)「〇〇画面を作って」のような画面作成リクエスト (2)「〇〇のUIをデザインして」のようなUIデザインリクエスト (3)「このコンポーネントを実装して」のようなコンポーネント実装リクエスト (4) SwiftUIのView作成全般
---
# iOS UI Builder
SwiftUIを使ったiOSアプリのUI実装を支援するスキル。
## ワークフロー
### 1. 要件の明確化
ユーザーの説明から以下を把握する:
- 画面/コンポーネントの目的
- 必要なUI要素(ボタン、リスト、入力フィールド等)
- ユーザーインタラクション(タップ、スワイプ等)
- 表示するデータの種類
不明点があれば質問して明確にする。
### 2. 既存コンポーネントの確認(重要)
**実装前に必ず既存コードを確認する。**
プロジェクト内で以下を検索:
- 共通コンポーネント(`Components/`, `Views/Common/`, `Shared/`等)
- 類似の画面・コンポーネント
- デザインシステム関連ファイル(`Theme`, `Style`, `Color`等)
既存コンポーネントを見つけた場合:
- 可能な限り再利用する
- 拡張が必要なら既存を拡張
- 新規作成が必要な場合のみ新しく作成
### 3. デザイン設計
実装前にデザインの概要をユーザーに説明:
- レイアウト構造(VStack/HStack/ZStack等)
- 使用するコンポーネント
- 色やスペーシングの方針
### 4. View + #Preview実装
#### 基本構造
```swift
import SwiftUI
struct [ViewName]View: View {
// MARK: - Properties
// MARK: - Body
var body: some View {
// 実装
}
}
// MARK: - Preview
#Preview {
[ViewName]View()
}
```
#### Previewの充実(重要)
#Preview macroで複数のプレビューバリエーションを提供:
```swift
#Preview("Default") {
[ViewName]View()
}
#Preview("With Data") {
[ViewName]View(items: sampleItems)
}
#Preview("Empty State") {
[ViewName]View(items: [])
}
#Preview("Dark Mode") {
[ViewName]View()
.preferredColorScheme(.dark)
}
```
状況に応じて以下も追加:
- 異なるデバイスサイズ
- Dynamic Type対応確認
- ローディング状態
- エラー状態
### 5. コンポーネント化の判断
以下の場合はコンポーネントとして分離:
- 他の画面でも使えそうな汎用的なUI
- 複雑で独立したロジックを持つ部分
- 繰り返し使われるパターン
コンポーネント化する場合:
- 適切なディレクトリに配置(`Components/`等)
- 汎用的なAPIを設計
- 単体での#Previewを提供
## SwiftUIベストプラクティス
### レイアウト
- `VStack`, `HStack`, `ZStack`を適切に使い分ける
- `Spacer()`でフレキシブルなスペーシング
- `padding()`で一貫したマージン
- `frame()`は必要最小限に
### 再利用性
- ViewModifierで共通スタイルを定義
- Extensionで便利なメソッドを追加
- @ViewBuilderで柔軟なコンポーネント
### パフォーマンス
- 大きなViewは小さなサブViewに分割
- 必要に応じて`@State`, `@Binding`を使用
- リストは`LazyVStack`/`LazyHStack`を検討
## チェックリスト
実装完了時に確認:
- [ ] 既存コンポーネントを確認したか
- [ ] #Previewが複数パターン用意されているか
- [ ] ダークモード対応を確認したか
- [ ] 再利用可能な部分をコンポーネント化したか
No comments yet. Be the first to comment!
Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.
SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.
Python backend development expertise for FastAPI, security patterns, database operations, Upstash integrations, and code quality. Use when: (1) Building REST APIs with FastAPI, (2) Implementing JWT/OAuth2 authentication, (3) Setting up SQLAlchemy/async databases, (4) Integrating Redis/Upstash caching, (5) Refactoring AI-generated Python code (deslopification), (6) Designing API patterns, or (7) Optimizing backend performance.
Drive the full internationalization journey for a project — detect the stack, recommend a library, set up the chosen library, wrap existing strings, and optionally connect a translation platform. Use when the user asks to add or configure i18n, internationalization, localization, multi-language support, or translations — including when they explicitly mention LinguiJS, Lingui, next-intl, "wrap strings", "find hardcoded text", "make my app translatable", or "set up translations". Triggers on g...
PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.