Skip to content
cccskills
FreePublished on GitHub

tailwind-v4-shadcn

Use this skill when styling components, adding shadcn/ui components, or configuring Tailwind v4 design tokens. Trigger words: スタイリング, Tailwind, shadcn, コンポーネント追加, デザイントークン, テーマ, CSS, クラス, ボタン, カード, ダークモード.

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Tailwind v4 + shadcn/ui

いつ使うか

  • コンポーネントにスタイルを当てるとき。
  • ボタン・カード・ダイアログなど定番 UI を追加するとき。
  • デザイントークン(色・余白・角丸)やダークモードを整えるとき。

やること

  • まず shadcn/ui に既存コンポーネントがないか探す(npx shadcn@latest add <name>)。自作は最後の手段。
  • Tailwind v4 は CSS ファイルの @theme でトークンを定義(JS config 不要)。
  • 色はトークン(CSS 変数)経由で参照し、ダークモードは .dark で切り替える。
  • ユーティリティの重複は cn()(clsx + tailwind-merge)で衝突解決。
  • 任意フォントは next/font で読み込む。

守るルール

  • ✅ shadcn/ui を優先、自作前に必ず探す。
  • ✅ トークン経由で色/間隔を指定(直値ハードコードを避ける)。
  • ✅ コントラスト AA / focus-visible / 適切な aria を満たす。
  • ❌ 紫グラデ + Inter + 平凡グリッドの「AIっぽい」既定スタイルに流れない。
  • ❌ インラインの巨大 style 属性で組まない(ユーティリティ or トークン)。

典型例(コード片)

/* app/globals.css — Tailwind v4 のトークン定義 */
@import 'tailwindcss';
@theme {
  --color-brand: oklch(0.62 0.17 250);
  --radius: 0.625rem;
}
import { cn } from '@/lib/utils';

export function Badge({ active, className }: { active?: boolean; className?: string }) {
  return (
    <span className={cn('rounded-md px-2 py-0.5 text-sm', active && 'bg-brand text-white', className)} />
  );
}

アンチパターン

  • shadcn/ui に同等品があるのにゼロから自作する。
  • 色を #8b5cf6 のように直書きしてテーマ切替を壊す。
  • focus リングを outline-none で消してアクセシビリティを損なう。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Use this skill when creating or reviewing Next.js Route Handlers (app/api), adding rate limiting, input validation, or auth to API endpoints. Trigger words: API ルート, Route Handler, app/api, エンドポイント, レート制限, 入力検証, CORS, ヘッダー, 認証付き API, hardening.

The English summary is being prepared. Showing the original description.

Akira-Papa/claude-code-nextjs-mongo-template-16Updated May 24, 2026

Use this skill when implementing full-text search, autocomplete, or vector/semantic search and RAG with MongoDB Atlas. Trigger words: 全文検索, あいまい検索, オートコンプリート, ベクトル検索, セマンティック検索, 類似検索, Atlas Search, $search, $vectorSearch, RAG, embedding.

The English summary is being prepared. Showing the original description.

Akira-Papa/claude-code-nextjs-mongo-template-16Updated May 24, 2026

Use this skill when implementing sign-in, sessions, authorization checks, or protecting routes and Server Actions. Trigger words: 認証, ログイン, サインイン, セッション, 認可, 権限チェック, Better Auth, Auth.js, 保護, ミドルウェア, getSession.

The English summary is being prepared. Showing the original description.

Akira-Papa/claude-code-nextjs-mongo-template-16Updated May 24, 2026

Use this skill when starting a new session, opening this project for the first time, or when you need to recall the project's tech stack, hard rules, and which other skills exist. Trigger words: セッション開始, このプロジェクト, 全体像, どのスキル, 何から, getting started, overview.

The English summary is being prepared. Showing the original description.

Akira-Papa/claude-code-nextjs-mongo-template-16Updated May 24, 2026

Use this skill when setting up or modifying CI pipelines, GitHub Actions workflows, or automated checks (lint, typecheck, test, build) for this project. Trigger words: CI, GitHub Actions, ワークフロー, パイプライン, 自動テスト, lint チェック, typecheck, ビルド検証, .github/workflows.

The English summary is being prepared. Showing the original description.

Akira-Papa/claude-code-nextjs-mongo-template-16Updated May 24, 2026

Use this skill when writing end-to-end tests, browser automation, or verifying user flows in a real browser. Trigger words: E2E, Playwright, ブラウザテスト, ユーザーフロー, 結合テスト, シナリオテスト, ログインテスト, getByRole, expect.

The English summary is being prepared. Showing the original description.

Akira-Papa/claude-code-nextjs-mongo-template-16Updated May 24, 2026

See all skills by Akira-Papa

Report a problem with this skill