본문으로 건너뛰기
cccskills
무료GitHub에 공개

design-audit

SwiftUI ViewのDesign System準拠性を監査する。既存UIのレビュー、デザインチェック時に使用。「デザインレビュー」「UIチェック」「design audit」「デザイン監査」「UI監査」「デザインチェック」「トークン確認」などのキーワードで自動適用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md7.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

デザイン監査スキル

既存の SwiftUI View が Swift Design System に準拠しているかを体系的に監査する。


監査手順

  1. 対象ファイルを読み込む: View のソースコードを全文読む
  2. 6カテゴリで検査: 下記の監査カテゴリを順番に確認
  3. 重大度を分類: Critical / Warning / Recommendation に分類
  4. レポートを出力: 構造化された監査レポートを生成
  5. 修正提案: 自動修正可能な箇所を提示

監査カテゴリ

1. トークン準拠性

ハードコードされた値がないか検出する。

検出対象正しい使用重大度
Color.red, .red, Color(hex:) などcolors.error, colors.primary 等Critical
.font(.system(size:)).typography(.bodyMedium) 等Critical
.padding(16), spacing: 12 等の数値直指定spacing.lg, spacing.md 等Warning
cornerRadius: 8 等の数値直指定radius.lg 等Warning
.animation(.easeOut(duration:)).animate(motion.tap, value:)Warning

ColorPalette プロパティ一覧(これ以外の Color を使っていたら違反):

  • primary, onPrimary, primaryContainer, onPrimaryContainer
  • secondary, onSecondary, secondaryContainer, onSecondaryContainer
  • tertiary, onTertiary
  • background, onBackground
  • surface, onSurface, surfaceVariant, onSurfaceVariant
  • error, onError, errorContainer, onErrorContainer
  • warning, onWarning, success, onSuccess, info, onInfo
  • outline, outlineVariant

SpacingScale 値一覧: none(0), xxs(2), xs(4), sm(8), md(12), lg(16), xl(24), xxl(32), xxxl(48), xxxxl(64)

Typography 一覧: displayLarge(57), displayMedium(45), displaySmall(36), headlineLarge(32), headlineMedium(28), headlineSmall(24), titleLarge(22), titleMedium(16), titleSmall(14), bodyLarge(16), bodyMedium(14), bodySmall(12), labelLarge(14), labelMedium(12), labelSmall(11)

2. コンポーネント使用

カスタム実装が既存コンポーネントで代替できないか確認する。

パターン代替コンポーネント
手動の角丸+影+背景カードCard(elevation:)
カスタムボタンスタイル.buttonStyle(.primary/.secondary/.tertiary) + .buttonSize()
タイトル付きカードセクションSectionCard(title:elevation:)
カスタムアイコンバッジIconBadge(systemName:size:)
カスタム進捗表示ProgressBar
カスタムテキスト入力DSTextField
カスタム通知バナーSnackbar
タグ/フィルター UIChip + .chipStyle(.filled/.outlined)
フローティングボタンFloatingActionButton
グリッドレイアウトAspectGrid

3. アクセシビリティ

チェック項目基準重大度
accessibilityLabelインタラクティブ要素に必須Critical
タップターゲット最小 44x44ptCritical
Dynamic Type.typography() 使用で自動対応Warning
reduce motion.animate() 使用で自動対応Warning
コントラスト比on* カラーと * カラーのペア使用Warning

4. テーマ対応

チェック項目基準重大度
ThemeProviderルートに .theme(themeProvider)Critical
Environment 宣言@Environment(\.colorPalette) 等Critical
ダークモードcolors.surface / colors.onSurface 等のペア使用Warning
テーマ切替複数テーマで表示が崩れないかRecommendation

5. Preview カバレッジ

必須 Preview説明重大度
Default通常状態Warning
Dark Mode.theme(ThemeProvider(initialMode: .dark))Warning
Large Text.environment(\.sizeCategory, .accessibilityExtraLarge)Recommendation
Compact最小コンテンツRecommendation
Edge Case長文、大量データRecommendation
.theme(ThemeProvider())すべての Preview に必須Critical

6. 構造品質

チェック項目基準重大度
View の body 行数40行以下推奨Recommendation
ViewModifier 抽出繰り返しの修飾は ViewModifier にRecommendation
サブView 分割独立した論理単位は別 View にRecommendation
import DesignSystem必須Critical

重大度レベル

レベル意味対応
CriticalDesign System 違反。修正必須即座に修正
Warning推奨パターンからの逸脱早めに修正
Recommendation改善提案次回以降に検討

監査レポートフォーマット

# Design System 監査レポート

**対象**: `FileName.swift`
**日時**: YYYY-MM-DD
**スコア**: X / 6 カテゴリ合格

## サマリー

| カテゴリ | 結果 | Critical | Warning | Recommendation |
|---------|------|----------|---------|----------------|
| トークン準拠性 | ✅/❌ | 0 | 0 | 0 |
| コンポーネント使用 | ✅/❌ | 0 | 0 | 0 |
| アクセシビリティ | ✅/❌ | 0 | 0 | 0 |
| テーマ対応 | ✅/❌ | 0 | 0 | 0 |
| Preview カバレッジ | ✅/❌ | 0 | 0 | 0 |
| 構造品質 | ✅/❌ | 0 | 0 | 0 |

## 詳細

### 🔴 Critical

1. **[トークン準拠性]** L15: `.foregroundColor(.red)` → `.foregroundStyle(colors.error)`
2. **[テーマ対応]** L3: `@Environment` 宣言なし → `@Environment(\.colorPalette) private var colors` を追加

### 🟡 Warning

1. **[トークン準拠性]** L22: `.padding(16)` → `.padding(spacing.lg)`

### 🟢 Recommendation

1. **[構造品質]** body が 55 行 → サブView に分割を検討

よくある違反と自動修正

ハードコードカラー → セマンティックカラー

// Before
.foregroundColor(.red)
.background(Color.white)
.foregroundColor(.gray)

// After
.foregroundStyle(colors.error)
.background(colors.surface)
.foregroundStyle(colors.onSurfaceVariant)

直値スペーシング → トークン

// Before
.padding(16)
VStack(spacing: 8) { ... }

// After
.padding(spacing.lg)
VStack(spacing: spacing.sm) { ... }

直接フォント → Typography

// Before
.font(.system(size: 14, weight: .medium))
.font(.title)

// After
.typography(.bodyMedium)
.typography(.titleLarge)

直接アニメーション → Motion トークン

// Before
.animation(.easeOut(duration: 0.1), value: isActive)

// After
.animate(motion.tap, value: isActive)

カスタムカード → Card コンポーネント

// Before
content
    .padding(16)
    .background(Color.white)
    .clipShape(RoundedRectangle(cornerRadius: 12))
    .shadow(color: .black.opacity(0.1), radius: 4, y: 2)

// After
Card(elevation: .level2) {
    content
}

関連スキル

  • design-system-workflow: トークン・コンポーネントの詳細リファレンス
  • component-gen: 新規コンポーネント生成
  • design-diff: 修正前後の視覚的差分
  • ios-build-workflow: ビルド・テスト実行

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

CHANGELOG エントリ追加・バージョン計算。「CHANGELOG」「変更履歴」「changelog add」「version bump」「バージョン」「バージョンアップ」などのキーワードで自動適用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

no-problem-dev/claude-code-plugins52026년 3월 15일 업데이트

プロジェクトの .claude/ ディレクトリ(skills, agents, contexts)を Codex CLI 互換 .agents/ に変換。「codex export」「Codex 変換」「プロジェクトをエクスポート」などで自動適用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

no-problem-dev/claude-code-plugins52026년 3월 15일 업데이트

デザインシステム準拠のSwiftUIコンポーネントを生成する。新しいUIパーツの作成、コンポーネント生成時に使用。「コンポーネント作成」「新しいUI」「パーツ作成」「component generate」「UIパーツ」「新規コンポーネント」などのキーワードで自動適用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

no-problem-dev/claude-code-plugins52026년 3월 15일 업데이트

Claude Code プラグインを Codex CLI 互換形式に変換。SKILL.md → .agents/skills/、agents → .agents/skills/、AGENTS.md 生成。「deploy」「codex」「Codex 変換」「エクスポート」などで自動適用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

no-problem-dev/claude-code-plugins52026년 3월 15일 업데이트

UIの視覚的差分を検出・比較する。デザイン変更前後の比較、リファレンスとの差分確認時に使用。「デザイン比較」「UI差分」「design diff」「design compare」「ビフォーアフター」「見た目の違い」などのキーワードで自動適用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

no-problem-dev/claude-code-plugins52026년 3월 15일 업데이트

Swift Design Systemを使用したiOS UI実装スキル。デザイントークン、UIコンポーネント(Button、Card、Chip、FAB、Snackbar、Picker等15種)、レイアウトパターンのベストプラクティスを提供。「デザイン」「UI」「テーマ」「カラー」「タイポグラフィ」「スペーシング」「ボタン」「カード」「FAB」「Snackbar」「Picker」「SwiftUI」「DesignSystem」などで自動適用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

no-problem-dev/claude-code-plugins52026년 3월 15일 업데이트

no-problem-dev의 스킬 모두 보기

이 스킬의 문제 신고