css-development-validate
既存のCSSコードをレビュー・監査し、命名規則やダークモード対応、Tailwindの使用状況、テスト網羅率などをチェックして、一貫性のあるスタイルシートに改善するSkill。
📜 元の英語説明(参考)
This skill should be used when reviewing or auditing existing CSS code for consistency with established patterns. Triggers on "review CSS", "audit styles", "check CSS", "validate stylesheet", "CSS review". Checks semantic naming, dark mode coverage, Tailwind usage, and test coverage.
🇯🇵 日本人クリエイター向け解説
既存のCSSコードをレビュー・監査し、命名規則やダークモード対応、Tailwindの使用状況、テスト網羅率などをチェックして、一貫性のあるスタイルシートに改善するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o css-development-validate.zip https://jpskill.com/download/16710.zip && unzip -o css-development-validate.zip && rm css-development-validate.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16710.zip -OutFile "$d\css-development-validate.zip"; Expand-Archive "$d\css-development-validate.zip" -DestinationPath $d -Force; ri "$d\css-development-validate.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
css-development-validate.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
css-development-validateフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
CSS開発: 検証
概要
既存のCSSコードを確立されたパターンに照らしてレビューし、具体的で実行可能なフィードバックを提供します。
- セマンティックな命名規則
- Tailwindの
@applyによる構成 - ダークモードのバリアントの網羅性
- テストカバレッジ(静的+レンダリング)
- ドキュメントの品質
- 構成の機会
これはcss-developmentのサブスキルです - 通常、メインスキルを通じて自動的に呼び出されます。
このスキルが適用される場合
以下の場合に使用します。
- 既存のCSSコードをレビューするとき
- コンポーネントのスタイルの一貫性を監査するとき
- パターンが守られているか確認するとき
- CSSの変更をマージする前
- リファクタリングの準備(最初に問題を特定する)
パターンリファレンス
このスキルは、メインのcss-developmentスキルで文書化されているパターンに対して検証を行います。
セマンティックな命名: .button-primary であり、.btn-blue ではない
Tailwindの構成: @applyを使用してユーティリティを構成する
ダークモード: dark: バリアントを含める
テストカバレッジ: 静的CSS + コンポーネントのレンダリングテスト
ドキュメント: クラスの上に利用方法のコメントを記述する
ワークフロー
このスキルが呼び出されたら、TodoWriteチェックリストを作成し、体系的に検証を進めます。
利用状況の告知
「css-development:validateスキルを使用して、確立されたパターンに照らしてこのCSSをレビューします。」
TodoWriteチェックリストの作成
TodoWriteツールを使用します。
CSSの検証:
- [ ] CSSファイルを読み込む(components.cssと関連するスタイルをロードする)
- [ ] セマンティックな命名を確認する(記述的なクラス名であることを検証する)
- [ ] @applyの使用状況を検証する(Tailwindの構成を確認する)
- [ ] ダークモードのカバレッジを確認する(dark: バリアントが存在することを確認する)
- [ ] 構成の機会を探す(再利用可能なパターンを特定する)
- [ ] テストカバレッジを検証する(静的テストとレンダリングテストが存在することを確認する)
- [ ] ドキュメントを確認する(利用方法のコメントが存在することを確認する)
- [ ] 調査結果を報告する(file:lineの参照と提案を提供する)
検証チェックリストの詳細
ステップ1: CSSファイルを読み込む
アクション: Readツールを使用して、レビュー対象のCSSファイルをロードします。
確認するファイル:
styles/components.css(メインのセマンティックコンポーネント)- 言及されているコンポーネント固有のCSSファイル
- コンポーネントファイル内のインラインスタイル(該当する場合)
キャプチャするもの:
- すべてのクラス定義
@applyの使用状況 vs. インラインユーティリティ- ダークモードのバリアントの有無
- ドキュメントのコメント
ファイルがロードされ、理解されたら完了としてマークします。
ステップ2: セマンティックな命名を確認する
アクション: すべてのクラス名を、セマンティックで記述的な命名であるかレビューします。
良いパターン:
.button-primary、.card-header、.form-field、.empty-state- コンテキスト + コンポーネント:
.session-card、.marketing-hero - ベース + バリアント:
.badge-success、.button-danger
悪いパターン(これらを報告する):
- ユーティリティ名:
.btn-blue、.card-sm、.text-big - 省略形:
.btn、.hdr、.desc - 汎用的:
.component、.item、.thing - ランダム:
.style1、.custom、.special
各問題について:
- ファイルと行番号をメモする
- 問題のあるクラス名を表示する
- 利用状況のコンテキストに基づいてセマンティックな代替案を提案する
すべてのクラス名がレビューされたら完了としてマークします。
ステップ3: @applyの使用状況を検証する
アクション: Tailwindユーティリティが@applyを介して構成されているか、マークアップに散在していないかを確認します。
良いパターン:
.button-primary {
@apply bg-indigo-500 hover:bg-indigo-700 px-6 py-3 rounded-lg;
}
悪いパターン(これらを報告する):
<!-- セマンティックなクラスの代わりにマークアップにユーティリティがある -->
<button class="bg-indigo-500 hover:bg-indigo-700 px-6 py-3 rounded-lg">
クリック
</button>
確認:
- ユーティリティは
@applyを介してセマンティックなクラスに構成されていますか? - マークアップに繰り返されるユーティリティの組み合わせがあり、抽出する必要があるものはありますか?
- セマンティックなクラスは実際にコンポーネントで使用されていますか?
各問題について:
- 問題のあるマークアップまたはCSSを表示する
@applyを使用する必要がある理由を説明する- セマンティックなクラスへの抽出を提案する
@applyの使用状況がレビューされたら完了としてマークします。
ステップ4: ダークモードのカバレッジを確認する
アクション: 色付きの要素とインタラクティブな要素にdark:バリアントがあることを確認します。
ダークモードが必要なもの:
- 背景色 (bg-*)
- テキストの色 (text-*)
- 境界線の色 (border-*)
- インタラクティブな状態 (hover, focus)
- 可視性に影響を与えるシャドウ
通常、ダークモードを必要としないもの:
- スペーシングユーティリティ (p-, m-, gap-*)
- レイアウトユーティリティ (flex, grid, etc.)
- 純粋な構造スタイル
確認するパターン:
/* 良い - ダークモードがある */
.card {
@apply bg-white dark:bg-gray-800 text-gray-900 dark:text-white;
}
/* 悪い - ダークモードがない */
.card {
@apply bg-white text-gray-900;
}
各問題について:
- どのクラスにダークモードのバリアントがないかをメモする
- 現在のCSSを表示する
- 追加する特定の
dark:ユーティリティを提案する
ダークモードのカバレッジが確認されたら完了としてマークします。
ステップ5: 構成の機会を探す
アクション: 既存のクラスを使用できるか、抽出できる繰り返しのパターンを特定します。
探すもの:
- 複数のクラスで繰り返される同じユーティリティの組み合わせ
- ベースクラスを共有できる同様のパターン
- セマンティックなクラスを参照できるインラインユーティリティ
問題の例:
/* 繰り返されるパターン */
.card-primary {
@apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-6;
}
.card-secondary {
@apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-6;
@apply border-2 border-gray-200;
}
/* 提案: ベースの.cardクラスを抽出し、バリアントを追加する */
.card {
@apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-6;
}
.card-secondary {
@apply border-2 border-gray-200;
}
各機会について:
- 繰り返されるパターンを表示する
- ベースクラス + 構成を提案する
- 影響を見積もる(何箇所にメリットがあるか)
構成の機会が特定されたら完了としてマークします。
ステップ6: テストカバレッジを検証する
アクション: CSSクラスにテストカバレッジがあることを確認します。
静的CSSテスト - styles/__tests__/components.test.tsを確認します。
it('should have button-primary class', () => {
expect(content).toContain('.button-primary');
});
コンポーネントのレンダリングテスト
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
CSS Development: Validate
Overview
Reviews existing CSS code against established patterns and provides specific, actionable feedback:
- Semantic naming conventions
- Tailwind
@applycomposition - Dark mode variant coverage
- Test coverage (static + rendering)
- Documentation quality
- Composition opportunities
This is a sub-skill of css-development - typically invoked automatically via the main skill.
When This Skill Applies
Use when:
- Reviewing existing CSS code
- Auditing component styles for consistency
- Checking if patterns are being followed
- Before merging CSS changes
- Refactoring prep (identify issues first)
Pattern Reference
This skill validates against patterns documented in the main css-development skill:
Semantic naming: .button-primary not .btn-blue
Tailwind composition: Use @apply to compose utilities
Dark mode: Include dark: variants
Test coverage: Static CSS + component rendering tests
Documentation: Usage comments above classes
Workflow
When this skill is invoked, create a TodoWrite checklist and work through validation systematically.
Announce Usage
"I'm using the css-development:validate skill to review this CSS against established patterns."
Create TodoWrite Checklist
Use the TodoWrite tool:
Validating CSS:
- [ ] Read CSS files (load components.css and related styles)
- [ ] Check semantic naming (verify descriptive class names)
- [ ] Verify @apply usage (ensure Tailwind composition)
- [ ] Check dark mode coverage (confirm dark: variants present)
- [ ] Look for composition opportunities (identify reusable patterns)
- [ ] Verify test coverage (check static and rendering tests exist)
- [ ] Check documentation (ensure usage comments present)
- [ ] Report findings (provide file:line references and suggestions)
Validation Checklist Details
Step 1: Read CSS Files
Action: Use Read tool to load CSS files for review
Files to check:
styles/components.css(main semantic components)- Any component-specific CSS files mentioned
- Inline styles in component files (if applicable)
What to capture:
- All class definitions
- Usage of
@applyvs. inline utilities - Presence of dark mode variants
- Documentation comments
Mark as completed when files are loaded and understood.
Step 2: Check Semantic Naming
Action: Review all class names for semantic, descriptive naming
Good patterns:
.button-primary,.card-header,.form-field,.empty-state- Context + component:
.session-card,.marketing-hero - Base + variant:
.badge-success,.button-danger
Bad patterns (report these):
- Utility names:
.btn-blue,.card-sm,.text-big - Abbreviations:
.btn,.hdr,.desc - Generic:
.component,.item,.thing - Random:
.style1,.custom,.special
For each issue:
- Note file and line number
- Show the problematic class name
- Suggest semantic alternative based on usage context
Mark as completed when all class names reviewed.
Step 3: Verify @apply Usage
Action: Check that Tailwind utilities are composed via @apply, not scattered in markup
Good patterns:
.button-primary {
@apply bg-indigo-500 hover:bg-indigo-700 px-6 py-3 rounded-lg;
}
Bad patterns (report these):
<!-- Utilities in markup instead of semantic class -->
<button class="bg-indigo-500 hover:bg-indigo-700 px-6 py-3 rounded-lg">
Click me
</button>
Check:
- Are utilities composed into semantic classes via
@apply? - Are there repeated utility combinations in markup that should be extracted?
- Are semantic classes actually being used in components?
For each issue:
- Show the problematic markup or CSS
- Explain why it should use
@apply - Suggest extraction to semantic class
Mark as completed when @apply usage is reviewed.
Step 4: Check Dark Mode Coverage
Action: Verify colored and interactive elements have dark: variants
What needs dark mode:
- Background colors (bg-*)
- Text colors (text-*)
- Border colors (border-*)
- Interactive states (hover, focus)
- Shadows that affect visibility
What typically doesn't need dark mode:
- Spacing utilities (p-, m-, gap-*)
- Layout utilities (flex, grid, etc.)
- Pure structural styles
Pattern to check:
/* Good - has dark mode */
.card {
@apply bg-white dark:bg-gray-800 text-gray-900 dark:text-white;
}
/* Bad - missing dark mode */
.card {
@apply bg-white text-gray-900;
}
For each issue:
- Note which class is missing dark mode variants
- Show the current CSS
- Suggest specific
dark:utilities to add
Mark as completed when dark mode coverage is checked.
Step 5: Look for Composition Opportunities
Action: Identify repeated patterns that could use existing classes or be extracted
Look for:
- Same utility combinations repeated in multiple classes
- Similar patterns that could share a base class
- Inline utilities that could reference semantic classes
Example issue:
/* Repeated pattern */
.card-primary {
@apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-6;
}
.card-secondary {
@apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-6;
@apply border-2 border-gray-200;
}
/* Suggestion: Extract base .card class, add variants */
.card {
@apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-6;
}
.card-secondary {
@apply border-2 border-gray-200;
}
For each opportunity:
- Show the repeated pattern
- Suggest base class + composition
- Estimate impact (how many places benefit)
Mark as completed when composition opportunities are identified.
Step 6: Verify Test Coverage
Action: Check that CSS classes have test coverage
Static CSS tests - Check styles/__tests__/components.test.ts:
it('should have button-primary class', () => {
expect(content).toContain('.button-primary');
});
Component rendering tests - Check component test files:
it('applies button-primary class', () => {
render(<Button variant="primary">Click</Button>);
expect(screen.getByRole('button')).toHaveClass('button-primary');
});
For classes without tests:
- List the class name
- Note which test is missing (static, rendering, or both)
- Provide test template to add
Mark as completed when test coverage is checked.
Step 7: Check Documentation
Action: Verify components have usage documentation
Required documentation:
- Comment above CSS class explaining purpose
- Usage example in comment
Example:
/* Button component - Primary action button with hover lift effect
Usage: <button className="button-primary">Click me</button> */
.button-primary {
...
}
For classes without documentation:
- List the class name and location
- Suggest documentation to add based on class purpose
Mark as completed when documentation is checked.
Step 8: Report Findings
Action: Compile all findings into structured report
Report format:
## CSS Validation Report
### ✅ Good Patterns Found
- `.button-primary` follows semantic naming (components.css:15)
- Dark mode variants present on interactive elements (components.css:17-19)
- Tests cover className application (Button.test.tsx:23)
- Documentation comments present (components.css:14)
### ⚠️ Issues Found
#### Semantic Naming Issues
**components.css:45** - `.btn-blue` uses utility naming
- Current: `.btn-blue`
- Suggestion: Rename to `.button-secondary` for consistency with `.button-primary`
- Impact: Update 3 component files
**components.css:67** - `.card-sm` uses size in name
- Current: `.card-sm`
- Suggestion: Extract size to utility or rename to `.card-compact` for semantic meaning
- Impact: Update 5 usages
#### Missing Dark Mode Variants
**components.css:78** - `.card-header` missing dark mode
- Current: `@apply bg-gray-100 text-gray-900`
- Suggestion: Add `dark:bg-gray-800 dark:text-white`
- Impact: Visual bug in dark mode
**components.css:92** - `.badge` missing dark mode
- Current: `@apply bg-indigo-100 text-indigo-800`
- Suggestion: Add `dark:bg-indigo-900 dark:text-indigo-200`
- Impact: Low contrast in dark mode
#### Missing Test Coverage
**components.css:102** - `.empty-state` has no tests
- Missing: Both static CSS test and component rendering test
- Suggestion: Add tests to verify class exists and renders correctly
#### Missing Documentation
**components.css:115** - `.session-card` lacks usage comment
- Suggestion: Add comment explaining purpose and usage example
### 📊 Summary
- **Total classes reviewed:** 12
- **Issues found:** 7
- **Priority:** 2 high (dark mode bugs), 3 medium (naming), 2 low (docs)
### 🎯 Recommended Actions
1. **High priority:** Add dark mode variants to `.card-header` and `.badge` (visual bugs)
2. **Medium priority:** Rename `.btn-blue` → `.button-secondary` for consistency
3. **Medium priority:** Add test coverage for `.empty-state`
4. **Low priority:** Add documentation comments to undocumented classes
Would you like me to fix these issues, or would you prefer to address them manually?
Mark as completed when report is generated and presented.
Completion
After generating the validation report:
-
Ask user what they want to do next:
- Fix issues automatically?
- Fix specific issues only?
- Just wanted the report?
-
Offer to invoke refactor skill if there are structural issues that need refactoring
-
Suggest committing any fixes made