SwiftUIを使ったiOSアプリのUI実装を支援するスキル。View +
This skill inherits all available tools. When active, it can use any tool Claude has access to.
references/animation.mdreferences/color.mdreferences/grid-layout.mdSwiftUIを使ったiOSアプリのUI実装を支援するスキル。
.frame(maxWidth: .infinity) をつけないと横幅いっぱいに表示されない。関連ドキュメント
ユーザーの説明から以下を把握する:
不明点があれば質問して明確にする。
実装前に必ず既存コードを確認する。
プロジェクト内で以下を検索:
Components/, Views/Common/, Shared/等)Theme, Style, Color等)既存コンポーネントを見つけた場合:
実装前にデザインの概要をユーザーに説明:
import SwiftUI
struct [ViewName]View: View {
// MARK: - Properties
// MARK: - Body
var body: some View {
// 実装
}
}
// MARK: - Preview
#Preview {
[ViewName]View()
}
#Preview macroで複数のプレビューバリエーションを提供:
#Preview("Default") {
[ViewName]View()
}
#Preview("With Data") {
[ViewName]View(items: sampleItems)
}
#Preview("Empty State") {
[ViewName]View(items: [])
}
#Preview("Dark Mode") {
[ViewName]View()
.preferredColorScheme(.dark)
}
状況に応じて以下も追加:
以下の場合はコンポーネントとして分離:
コンポーネント化する場合:
Components/等)VStack, HStack, ZStackを適切に使い分けるSpacer()でフレキシブルなスペーシングpadding()で一貫したマージンframe()は必要最小限に@State, @Bindingを使用LazyVStack/LazyHStackを検討実装完了時に確認: