本文へ移動
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: ビルド・テスト実行

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

changelog-manage

無料日本語概要

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

no-problem-dev/claude-code-plugins52026年3月15日 更新

codex-export

無料日本語概要

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

no-problem-dev/claude-code-plugins52026年3月15日 更新

component-gen

無料日本語概要

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

no-problem-dev/claude-code-plugins52026年3月15日 更新

deploy-to-codex

無料日本語概要

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

no-problem-dev/claude-code-plugins52026年3月15日 更新

design-diff

無料日本語概要

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

no-problem-dev/claude-code-plugins52026年3月15日 更新

design-system-workflow

無料日本語概要

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 のスキルをすべて見る

このスキルの問題を報告する