Skip to content
design-system-workflow logo

Swift Design System スキル

design-system-workflow

Swift Design Systemを使用したiOS UI実装スキル。デザイントークン(カラー、タイポグラフィ、スペーシング、角丸、モーション、エレベーション)、UIコンポーネント(Button、Card、Chip、FAB、Snackbar、Picker)、レイアウトパターン(AspectGrid、SectionCard)のベストプラクティスを提供。「デザイン」「UI」「テーマ」「カラー」「色」「タイポグラフィ」「フォント」「スペーシング」「余白」「角丸」「アニメーション」「ボタン」「カード」「チップ」「グリッド」「レイアウト」「FAB」「Snackbar」「Picker」「Swift...

SKILL.md

Full skill instructions

Swift Design System スキル

no problem製iOSアプリのUI実装に必須のデザインシステム。一貫性のあるUIを効率的に構築するためのトークン・コンポーネント・パターンを提供。


必須依存関係

// Package.swift
dependencies: [
    .package(url: "https://github.com/​no-problem-dev/​swift-design-system.git", from: "X.X.X")
]

// ターゲット
.target(
    name: "YourApp",
    dependencies: [
        .product(name: "DesignSystem", package: "swift-design-system")
    ]
)

Note: X.X.X には最新バージョンを指定してください。 最新バージョンは GitHub Releases で確認できます。


設計原則

3層トークンシステム

Primitive Tokens (基本値) - 直接使用禁止
    ↓ 参照
Semantic Tokens (意味的トークン) - 推奨
    ↓ 参照
Component Tokens (コンポーネント固有) - 自動適用

重要: Primitiveトークンは直接使用せず、必ずSemantic/​Componentトークンを使用すること。

Environment経由のアクセス

@Environment(\.colorPalette) var colors
@Environment(\.spacingScale) var spacing
@Environment(\.radiusScale) var radius
@Environment(\.motion) var motion

型安全性

プロトコルベースの設計により、カスタムテーマ・トークンの拡張が可能。

アクセシビリティ

  • WCAG AAA準拠のコントラスト
  • reduce motion設定の自動尊重
  • Dynamic Type対応

テーマ設定(必須)

アプリ起動時に必ずThemeProviderを設定:

import DesignSystem

@main
struct MyApp: App {
    @State private var themeProvider = ThemeProvider()

    var body: some Scene {
        WindowGroup {
            ContentView()
                .theme(themeProvider)  // 必須
        }
    }
}

詳細は → references/​patterns/​THEME.md


Good / Bad パターン(代表例)

カラー

// ✅ Good: セマンティックカラーを使用
Text("エラー").foregroundColor(colors.error)

// ❌ Bad: ハードコードされた色
Text("エラー").foregroundColor(.red)

タイポグラフィ

// ✅ Good: typographyモディファイアを使用
Text("見出し").typography(.headlineLarge)

// ❌ Bad: 直接フォント指定
Text("見出し").font(.system(size: 32, weight: .semibold))

スペーシング

// ✅ Good: スペーシングトークンを使用
VStack(spacing: spacing.lg) { ... }

// ❌ Bad: マジックナンバー
VStack(spacing: 16) { ... }

コンポーネント

// ✅ Good: デザインシステムのコンポーネントを使用
Card(elevation: .level2) { content }

// ❌ Bad: 独自実装
RoundedRectangle(cornerRadius: 8)
    .fill(Color.white)
    .shadow(radius: 4)

リファレンス索引

デザイン実装時は、該当するリファレンスを参照してください。

デザイントークン

すべてのUI実装で必須の知識

→ references/​TOKENS.md

  • Color(カラーパレット)
  • Typography(タイポグラフィ)
  • Spacing(スペーシング)
  • Radius(角丸)
  • Motion(アニメーション)
  • Elevation(エレベーション)
  • GridSpacing(グリッド間隔)

コンポーネント

コンポーネント用途リファレンス
Buttonアクションボタン→ references/​components/​BUTTON.md
Cardコンテンツコンテナ→ references/​components/​CARD.md
Chipタグ、フィルター→ references/​components/​CHIP.md
FAB浮遊アクションボタン→ references/​components/​FAB.md
Snackbar一時的通知→ references/​components/​SNACKBAR.md
IconPickerSF Symbols選択→ references/​components/​ICON_PICKER.md
EmojiPicker絵文字選択→ references/​components/​EMOJI_PICKER.md
ColorPickerカラー選択→ references/​components/​COLOR_PICKER.md
ImagePicker画像選択→ references/​components/​IMAGE_PICKER.md

レイアウトパターン

パターン用途リファレンス
Themeテーマ設定・切り替え→ references/​patterns/​THEME.md
AspectGridアスペクト比統一グリッド→ references/​patterns/​ASPECT_GRID.md
SectionCardタイトル付きカードセクション→ references/​patterns/​SECTION_CARD.md

関連スキル

  • ios-clean-architecture: アーキテクチャ設計(View層で本スキルを活用)
  • ios-build-workflow: ビルド・テスト実行

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View