igorwarzocha/opencode-workflows/vite-shadcn-tailwind4
Claude Code and agent skill by igorwarzocha/opencode-workflows
- community
Checking that the SKILL.md file is still in the repository.
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
Install
npx vskill@latest install igorwarzocha/opencode-workflows/vite-shadcn-tailwind4SKILL.md
<overview> Protocol for initializing shadcn/ui with Tailwind CSS v4 in a Vite project. </overview>
<instructions> This skill is Vite-specific due to:
- Vite's solution-style
tsconfig.json(references pattern) @tailwindcss/viteplugin requirement- CSS entry file conventions (
src/index.css)
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>
</instructions>
<workflow>
<phase name="verify-prerequisites">
Step 1: Verify Prerequisites
Check that the project is ready:
vite.config.tsMUST exist.package.jsonMUST containtailwindcss(v4+) and@tailwindcss/vite.- TypeScript MUST be configured.
If prerequisites are missing, You MUST help the user set up Tailwind v4 first. </phase>
<phase name="fix-typescript-aliases">
Step 2: Fix TypeScript Aliases
The shadcn CLI fails if paths aren't in the root tsconfig.json. Vite uses a solution-style config with references, but shadcn doesn't parse those.
Action: You MUST update tsconfig.json to include compilerOptions:
</phase>
<phase name="verify-vite-config">
Step 3: Verify Vite Config
You MUST confirm vite.config.ts has the Tailwind plugin and path alias:
</phase>
<phase name="initialize-shadcn">
Step 4: Initialize Shadcn
You MUST instruct the user to run:
You SHOULD recommend these settings:
- Style: New York
- Base Color: Neutral or Zinc
- CSS Variables: Yes
You MUST wait for user confirmation before continuing. </phase>
<phase name="add-components">
Step 5: Add Components
You MUST instruct the user to run:
You SHOULD instruct them to select all components (a then Enter).
You MUST wait for user confirmation before continuing. </phase>
<phase name="add-extensions">
Step 6: Add Extensions (Optional)
If user wants AI elements, You MUST instruct them to run:
You SHOULD instruct them to answer NO to all overwrite prompts.
You MUST wait for user confirmation before continuing. </phase>
<phase name="install-missing-dependencies">
Step 7: Install Missing Dependencies
The CLI MAY miss dependencies. You MUST check package.json and install any missing.
Required packages:
tw-animate-css(devDep) - v4 replacement fortailwindcss-animatetailwind-merge(dep) - used bycn()utilityclsx(dep) - used bycn()utilityclass-variance-authority(dep) - used by shadcn components
You MUST run if any are missing:
</phase>
<phase name="clean-css">
Step 8: Clean CSS for v4 Compliance
You MUST rewrite src/index.css to match strict v4 structure:
You MUST remove these if present:
@media (prefers-color-scheme)blocks- Duplicate
@themeblocks (keep only@theme inline) @configdirectives
</phase>
<phase name="verify-setup">
Step 9: Verify Setup
You MUST run typecheck to catch any issues:
You MUST fix any TypeScript errors before marking setup complete. </phase>
</workflow>
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagents/vite-react-ts-convex-tailwind/.opencode/skill/vite-shadcn-tailwind4/SKILL.md
Popularity
- Repository stars
- 113
- Repository forks
- 10
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 5 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/igorwarzocha/opencode-workflows/vite-shadcn-tailwind4)