Communitygithub.com

UIスタイリングスキル

shadcn/uiコンポーネント(Radix UI + Tailwindベース)、Tailwind CSSのユーティリティファーストスタイリング、キャンバスベースのビジュアルデザインを用いて、美しくアクセシブルなユーザーインターフェースを作成するスキルです。ユーザーインターフェースの構築、デザインシステムの実装、レスポンシブレイアウトの作成、アクセシブルなコンポーネント(ダイアログ、ドロップダウン、フォーム、テーブル)の追加、テーマと色のカスタマイズ、ダークモードの実装、ビジュアルデザインやポスターの生成、アプリケーション全体での一貫したスタイリングパターンの確立に使用します。

UIスタイリングスキル とは?

このスキルは、Reactベースのフレームワーク(Next.js、Vite、Remix、Astro)において、アクセシブルでモダンなUIを効率的に構築するための包括的なガイドです。shadcn/uiのコピーペースト可能なコンポーネントとTailwind CSSのユーティリティクラスを組み合わせ、TypeScriptによる型安全性、ダークモード対応、レスポンシブデザインを標準でサポートします。さらに、キャンバスを用いたビジュアルデザインシステム(哲学に基づいた洗練されたビジュアルコミュニケーション)もカバーしており、ミニマルなテキストで最大の視覚的インパクトを実現します。CLIによるコンポーネント追加やテーマ設定から、フォームバリデーション、データテーブル、コマンドパレットなどの複雑なUIパターンまで、実践的なコード例とともに詳細に解説されています。このスキルを使うことで、開発者は一貫性のあるデザインシステムを迅速に確立し、アクセシビリティに優れたプロフェッショナルなUIを構築できます。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/patdev495/watch-subtitles/tree/HEAD/.agents/skills/ui-styling

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

UIスタイリングスキル は何をしますか?

shadcn/uiコンポーネント、Tailwind CSSユーティリティスタイリング、キャンバスベースのビジュアルデザインシステムを組み合わせて、美しくアクセシブルなユーザーインターフェースを作成するための包括的なスキルです。

参考資料

このスキルを使用するタイミング

以下の場合に使用します:

  • Reactベースのフレームワーク(Next.js、Vite、Remix、Astro)でUIを構築する場合
  • アクセシブルなコンポーネント(ダイアログ、フォーム、テーブル、ナビゲーション)を実装する場合
  • ユーティリティファーストのCSSアプローチでスタイリングする場合
  • レスポンシブでモバイルファーストのレイアウトを作成する場合
  • ダークモードとテーマのカスタマイズを実装する場合
  • 一貫したトークンを持つデザインシステムを構築する場合
  • ビジュアルデザイン、ポスター、ブランド素材を生成する場合
  • 即時的なビジュアルフィードバックを得ながらラピッドプロトタイピングを行う場合
  • 複雑なUIパターン(データテーブル、チャート、コマンドパレット)を追加する場合

コアスタック

コンポーネント層: shadcn/ui

  • Radix UIプリミティブによるビルド済みアクセシブルコンポーネント
  • コピー&ペースト配布モデル(コンポーネントはコードベース内に存在)
  • TypeScriptファーストで完全な型安全性
  • 複雑なUI向けの構成可能なプリミティブ
  • CLIベースのインストールと管理

スタイリング層: Tailwind CSS

  • ユーティリティファーストCSSフレームワーク
  • ビルド時処理でランタイムオーバーヘッドゼロ
  • モバイルファーストのレスポンシブデザイン
  • 一貫したデザイントークン(色、スペーシング、タイポグラフィ)
  • 自動デッドコード除去

ビジュアルデザイン層: キャンバス

  • ミュージアム品質のビジュアルコンポジション
  • 哲学に基づいたデザインアプローチ
  • 洗練されたビジュアルコミュニケーション
  • 最小限のテキスト、最大のビジュアルインパクト
  • 体系的なパターンと洗練された美学

クイックスタート

コンポーネント + スタイリングのセットアップ

shadcn/uiをTailwindとともにインストール:

npx shadcn@latest init

CLIがフレームワーク、TypeScript、パス、テーマ設定をプロンプト表示します。これによりshadcn/uiとTailwind CSSの両方が設定されます。

コンポーネントを追加:

npx shadcn@latest add button card dialog form

ユーティリティスタイリングでコンポーネントを使用:

import { Button } from "@/components/ui/button"
import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"

export function Dashboard() {
  return (
    <div className="container mx-auto p-6 grid gap-6 md:grid-cols-2 lg:grid-cols-3">
      <Card className="hover:shadow-lg transition-shadow">
        <CardHeader>
          <CardTitle className="text-2xl font-bold">Analytics</CardTitle>
        </CardHeader>
        <CardContent className="space-y-4">
          <p className="text-muted-foreground">View your metrics</p>
          <Button variant="default" className="w-full">
            View Details
          </Button>
        </CardContent>
      </Card>
    </div>
  )
}

代替: Tailwindのみのセットアップ

Viteプロジェクト:

npm install -D tailwindcss @tailwindcss/vite
// vite.config.ts
import tailwindcss from '@tailwindcss/vite'
export default { plugins: [tailwindcss()] }
/* src/index.css */
@import "tailwindcss";

コンポーネントライブラリガイド

使用パターン、インストール、構成例を含む包括的なコンポーネントカタログ。

参照: references/shadcn-components.md

カバー範囲:

  • フォーム&入力コンポーネント (Button, Input, Select, Checkbox, Date Picker, Form validation)
  • レイアウト&ナビゲーション (Card, Tabs, Accordion, Navigation Menu)
  • オーバーレイ&ダイアログ (Dialog, Drawer, Popover, Toast, Command)
  • フィードバック&ステータス (Alert, Progress, Skeleton)
  • 表示コンポーネント (Table, Data Table, Avatar, Badge)

テーマとカスタマイズ

テーマ設定、CSS変数、ダークモード実装、コンポーネントのカスタマイズ。

参照: references/shadcn-theming.md

カバー範囲:

  • next-themesによるダークモード設定
  • CSS変数システム
  • 色のカスタマイズとパレット
  • コンポーネントバリアントのカスタマイズ
  • テーマ切り替えの実装

アクセシビリティパターン

ARIAパターン、キーボードナビゲーション、スクリーンリーダーサポート、アクセシブルなコンポーネント使用法。

参照: references/shadcn-accessibility.md

カバー範囲:

  • Radix UIのアクセシビリティ機能
  • キーボードナビゲーションパターン
  • フォーカス管理
  • スクリーンリーダーへの通知
  • フォームバリデーションのアクセシビリティ

Tailwindユーティリティ

レイアウト、スペーシング、タイポグラフィ、色、ボーダー、シャドウのコアユーティリティクラス。

参照: references/tailwind-utilities.md

カバー範囲:

  • レイアウトユーティリティ (Flexbox, Grid, positioning)
  • スペーシングシステム (padding, margin, gap)
  • タイポグラフィ (フォントサイズ、ウェイト、配置、行間)
  • 色と背景
  • ボーダーとシャドウ
  • カスタムスタイル用の任意値

レスポンシブデザイン

モバイルファーストのブレークポイント、レスポンシブユーティリティ、アダプティブレイアウト。

参照: references/tailwind-responsive.md

カバー範囲:

  • モバイルファーストアプローチ
  • ブレークポイントシステム (sm, md, lg, xl, 2xl)
  • レスポンシブユーティリティパターン
  • コンテナクエリ
  • Max-widthクエリ
  • カスタムブレークポイント

Tailwindカスタマイズ

設定ファイル構造、カスタムユーティリティ、プラグイン、テーマ拡張。

参照: references/tailwind-customization.md

カバー範囲:

  • カスタムトークン用の@themeディレクティブ
  • カスタムカラーとフォント
  • スペーシングとブレークポイントの拡張
  • カスタムユーティリティの作成
  • カスタムバリアント
  • レイヤーの整理 (@layer base, components, utilities)
  • コンポーネント抽出のためのApplyディレクティブ

ビジュアルデザインシステム

キャンバスベースのデザイン哲学、ビジュアルコミュニケーションの原則、洗練されたコンポジション。

参照: references/canvas-design-system.md

カバー範囲:

  • デザイン哲学アプローチ
  • テキストよりもビジュアルコミュニケーション
  • 体系的なパターンとコンポジション
  • 色、フォルム、空間デザイン
  • ミニマルなテキスト統合
  • ミュージアム品質の実行
  • マルチページデザインシステム

ユーティリティスクリプト

コンポーネントインストールと設定生成のためのPython自動化。

shadcn_add.py

依存関係処理を含むshadcn/uiコンポーネントの追加:

python scripts/shadcn_add.py button card dialog

tailwind_config_gen.py

カスタムテーマでtailwind.config.jsを生成:

python scripts/tailwind_config_gen.py --colors brand:blue --fonts display:Inter

ベストプラクティス

  1. コンポーネント構成: シンプルで構成可能なプリミティブから複雑なUIを構築する
  2. ユーティリティファーストスタイリング: Tailwindクラスを直接使用し、本当に繰り返す場合のみコンポーネントに抽出する
  3. モバイルファーストレスポンシブ: モバイルスタイルから始め、レスポンシブバリアントを重ねる
  4. アクセシビリティファースト: Radix UIプリミティブを活用し、フォーカス状態を追加し、セマンティックHTMLを使用する
  5. デザイントークン: 一貫したスペーシングスケール、カラーパレット、タイポグラフィシステムを使用する
  6. ダークモードの一貫性: すべてのテーマ要素にダークバリアントを適用する
  7. パフォーマンス: 自動CSSパージを活用し、動的なクラス名を避ける
  8. TypeScript: 完全な型安全性を使用して開発体験を向上させる
  9. ビジュアル階層: コンポジションで注意を誘導し、スペーシングと色を意図的に使用する
  10. 専門家の職人技: すべてのディテールが重要 - UIを職人技として扱う

参考情報ナビゲーション

コンポーネントライブラリ

  • references/shadcn-components.md - 完全なコンポーネントカタログ
  • references/shadcn-theming.md - テーマとカスタマイズ
  • references/shadcn-accessibility.md - アクセシビリティパターン

スタイリングシステム

  • references/tailwind-utilities.md - コアユーティリティクラス
  • references/tailwind-responsive.md - レスポンシブデザイン
  • references/tailwind-customization.md - 設定と拡張

ビジュアルデザイン

  • references/canvas-design-system.md - デザイン哲学とキャンバスワークフロー

自動化

  • scripts/shadcn_add.py - コンポーネントインストール
  • scripts/tailwind_config_gen.py - 設定生成

一般的なパターン

バリデーション付きフォーム:

import { useForm } from "react-hook-form"
import { zodResolver } from "@hookform/resolvers/zod"
import * as z from "zod"
import { Form, FormField, FormItem, FormLabel, FormControl, FormMessage } from "@/components/ui/form"
import { Input } from "@/components/ui/input"
import { Button } from "@/components/ui/button"

const schema = z.object({
  email: z.string().email(),
  password: z.string().min(8)
})

export function LoginForm() {
  const form = useForm({
    resolver: zodResolver(schema),
    defaultValues: { email: "", password: "" }
  })

  return (
    <Form {...form}>
      <form onSubmit={form.handleSubmit(console.log)} className="space-y-6">
        <FormField control={form.control} name="email" render={({ field }) => (
          <FormItem>
            <FormLabel>Email</FormLabel>
            <FormControl>
              <Input type="email" {...field} />
            </FormControl>
            <FormMessage />
          </FormItem>
        )} />
        <Button type="submit" className="w-full">Sign In</Button>
      </form>
    </Form>
  )
}

ダークモード対応のレスポンシブレイアウト:

<div className="min-h-screen bg-white dark:bg-gray-900">
  <div className="container mx-auto px-4 py-8">
    <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
      <Card className="bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700">
        <CardContent className="p-6">
          <h3 className="text-xl font-semibold text-gray-900 dark:text-white">
            Content
          </h3>
        </CardContent>
      </Card>
    </div>
  </div>
</div>

リソース

Individual skills in this repo

This repo contains 6 individual skills — each has its own dedicated page.

patdev495/watch-subtitles

Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.

patdev495/watch-subtitles

Brand voice, visual identity, messaging frameworks, asset management, brand consistency. Activate for branded content, tone of voice, marketing assets, brand compliance, style guides.

patdev495/watch-subtitles

Comprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG, Gemini 3.1 Pro), social photos (HTML→screenshot, multi-platform). Actions: design logo, create CIP, generate mockups, build slides, design banner, generate icon, create social photos, social media images, brand identity, design system. Platforms: Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest, TikTok, Threads, Google Ads.

patdev495/watch-subtitles

Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing/typography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.

patdev495/watch-subtitles

Create strategic HTML presentations with Chart.js, design tokens, responsive layouts, copywriting formulas, and contextual slide strategies.

patdev495/watch-subtitles

UI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation. Searchable local data: 79 searchable styles (50 active), 192 product palettes and reasoning profiles, 74 font pairings, 119 UX guidelines, 105 icons, 17 GSAP presets, 25 chart types, and 22 stacks.

関連スキル