スキル一覧に戻る
IgorWarzocha

vite-shadcn-tailwind4

by IgorWarzocha

An ever evolving repository of Opencode workflow examples that might enhance your experience with it. I only left the stuff that actually works. YMMV.

51🍴 6📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: vite-shadcn-tailwind4 description: |- Initialize shadcn/ui + Tailwind CSS v4 in Vite projects (Vite-specific, not Next.js/Remix). Use proactively for Vite project setup, shadcn component installation, or Tailwind v4 configuration.

Examples:

  • user: "Setup shadcn in my Vite project" → install deps, configure tailwind v4 CSS-first, init shadcn, verify components work
  • user: "Add shadcn to existing Vite app" → check existing config, install CLI, add components.json, update CSS imports
  • user: "Use Tailwind v4 with shadcn" → configure @import with @theme, remove v3 config, setup custom tokens
  • user: "Create Vite + React + shadcn project" → scaffold Vite, install shadcn, configure theme, add sample components

For Next.js, Remix, or other frameworks, You MUST use their respective shadcn installation guides.

<question_tool>

  • Batching Rule: You MUST use only for 2+ related questions; single questions use plain text.
  • Syntax Constraints: header max 12 chars, labels 1-5 words, mark defaults with (Recommended).
  • Purpose: Clarify component selection, style preferences, and optional AI elements before running shadcn CLI. </question_tool>

If prerequisites are missing, You MUST help the user set up Tailwind v4 first.

Action: You MUST update tsconfig.json to include compilerOptions:

{
  "files": [],
  "references": [
    { "path": "./tsconfig.app.json" },
    { "path": "./tsconfig.node.json" }
  ],
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }
  }
}
import tailwindcss from "@tailwindcss/vite";
import path from "path";

export default defineConfig({
  plugins: [react(), tailwindcss()],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "./src"),
    },
  },
});

You SHOULD recommend these settings:

  • Style: New York
  • Base Color: Neutral or Zinc
  • CSS Variables: Yes

You MUST wait for user confirmation before continuing.

You SHOULD instruct them to select all components (a then Enter).

You MUST wait for user confirmation before continuing.

You SHOULD instruct them to answer NO to all overwrite prompts.

You MUST wait for user confirmation before continuing.

Required packages:

  • tw-animate-css (devDep) - v4 replacement for tailwindcss-animate
  • tailwind-merge (dep) - used by cn() utility
  • clsx (dep) - used by cn() utility
  • class-variance-authority (dep) - used by shadcn components

You MUST run if any are missing:

npm install tailwind-merge clsx class-variance-authority
npm install -D tw-animate-css
@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

@theme inline {
  /* Variable mappings: --color-X: var(--X); */
}

:root {
  /* Token definitions using oklch() */
}

.dark {
  /* Dark mode tokens using oklch() */
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
}

You MUST remove these if present:

  • @media (prefers-color-scheme) blocks
  • Duplicate @theme blocks (keep only @theme inline)
  • @config directives

You MUST fix any TypeScript errors before marking setup complete.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です