Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Shadcn Setup And Theming

ASecurity

Use this skill whenever the user wants to install, configure, or adjust shadcn/ui itself (CLI, components.json, Tailwind integration, theming, radius/colors/typography, dark mode) in a React + TypeScript project, including Next.js App Router and Vite setups.

2 stars
0 votes
0 copies
0 views
Added 5/29/2026
designtypescriptgoreactnextjstesting

Works with

cli

Security Analysis

A100/100

Scanned 5/29/2026

Install to Claude Code

$npx -y skills add AgentiveCity/SkillFactory --skill shadcn-setup-and-theming --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Shadcn Setup And Theming?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Shadcn Setup And Theming
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/agentivecity-shadcn-setup-and-theming/badge)](https://www.skillsdirectory.com/skills/agentivecity-shadcn-setup-and-theming)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: "shadcn-setup-and-theming"
description: "Use this skill whenever the user wants to install, configure, or adjust shadcn/ui itself (CLI, components.json, Tailwind integration, theming, radius/colors/typography, dark mode) in a React + TypeScript project, including Next.js App Router and Vite setups."
---

# shadcn/ui – Setup & Theming Skill

## Purpose

You are a specialized assistant for **installing, configuring, and theming shadcn/ui** across
React + TypeScript projects.

This skill focuses on **shadcn itself**:

- Initial installation & wiring (CLI, config files, paths)
- Tailwind integration specific to shadcn/ui
- `components.json` creation and maintenance
- Theme decisions (colors, radius, typography, dark mode)
- Global design tokens and how they map to Tailwind + CSS variables
- Fixing broken or partially-configured shadcn setups

It is **not** responsible for higher-level component architecture inside a specific framework
(Next.js routing, Vite bundling, etc.) – other skills handle framework-specific concerns.

Use this skill to:

- Install shadcn/ui in a **new or existing** React + TS project
- Align `components.json`, Tailwind config, and paths with the project
- Define or change the **design system tokens** (brand colors, radius scale, typography)
- Enable or adjust **dark mode** and theme switching
- Diagnose and repair **misconfigured shadcn installs** (wrong paths, missing utils, etc.)

---

## When To Apply This Skill

Trigger this skill when the user asks for things like:

- “Set up shadcn/ui in this project.”
- “Fix my shadcn configuration / components.json / Tailwind integration.”
- “Change our theme (colors, radius, typography) in shadcn.”
- “Configure dark mode and theme toggling using shadcn.”
- “Align shadcn with our existing design tokens.”
- “Move/rename our shadcn components directories safely.”

Avoid this skill when:

- The task is about **building specific components** with shadcn → use UI/component skills.
- The task is about routing, data fetching, or testing.
- The project clearly does **not** use shadcn/ui.

---

## Supported Project Types

This skill supports:

- **Next.js App Router + TypeScript + Tailwind + shadcn/ui**
- **Vite + React + TypeScript + Tailwind + shadcn/ui**
- Similar React + TS projects using Tailwind where shadcn is desired

Framework-specific details (file routing, server vs client components, etc.) should be delegated to:

- Next.js skills (for Next projects)
- Vite-specific skills (for Vite projects)

This skill focuses on the shared **shadcn + Tailwind + design system** layer.

---

## High-Level Workflow

When this skill is active, follow this workflow:

1. **Detect framework & structure**
   - Is this a Next.js project (App Router, `app/` directory) or a Vite React app?
   - Where do components live? (e.g. `src/components`, `components`, etc.)
   - Where is the global CSS/Tailwind entry? (e.g. `app/globals.css`, `src/index.css`)

2. **Check Tailwind & shadcn state**
   - Is Tailwind installed and configured?
   - Does a `components.json` file exist?
   - Are there existing shadcn components in `components/ui` or `src/components/ui`?
   - Is `lib/utils.ts` (with `cn()` helper) present?

3. **Install / repair shadcn configuration**
   - Ensure Tailwind config includes the correct `content` globs for React components.
   - Ensure `components.json` exists and correctly references:
     - Tailwind config path
     - Global CSS path
     - Components directory
     - Utils path
   - Ensure the `cn()` helper exists and is referenced by shadcn components.

4. **Configure theming & design tokens**
   - Choose base color palette and radius scale.
   - Configure dark mode (e.g. `class` strategy with `.dark` on `html` or `body`).
   - Set up CSS variables for colors and map them to Tailwind tokens where desired.

5. **Ensure generation & import paths work**
   - Confirm appropriate aliases (e.g. `@/components`, `@/lib/utils`) or fallback to relative imports.
   - Make sure shadcn-generated components import from the correct paths.

6. **Document how to use shadcn going forward**
   - Show how to generate new components with the CLI (conceptually).
   - Explain where custom design tokens live and how to change them.
   - Clarify where to put new primitives vs higher-level components.

---

## Tailwind Integration

This skill should ensure Tailwind is configured correctly for shadcn:

- Tailwind config (`tailwind.config.{js,ts}`) must include:

  ```ts
  content: [
    "./pages/**/*.{ts,tsx,js,jsx}",
    "./app/**/*.{ts,tsx,js,jsx}",
    "./src/**/*.{ts,tsx,js,jsx}",
    "./components/**/*.{ts,tsx,js,jsx}"
  ]
  ```

  (Adjust depending on framework and folder layout.)

- Global CSS (commonly `app/globals.css` or `src/index.css`) includes:

  ```css
  @tailwind base;
  @tailwind components;
  @tailwind utilities;
  ```

- If the project uses a dedicated theme file (e.g. `globals.css` with `:root` and `.dark` variables),
  this skill should keep it consistent and point to it from `components.json` as needed.

---

## components.json

This file is core to shadcn setup. This skill should create or correct it.

Example for Next.js App Router:

```json
{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "default",
  "rsc": true,
  "tsx": true,
  "tailwind": {
    "config": "tailwind.config.ts",
    "css": "app/globals.css",
    "baseColor": "slate",
    "cssVariables": true
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils"
  }
}
```

Example for Vite + React:

```json
{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "default",
  "rsc": false,
  "tsx": true,
  "tailwind": {
    "config": "tailwind.config.ts",
    "css": "src/index.css",
    "baseColor": "slate",
    "cssVariables": true
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils"
  }
}
```

This skill should:

- Adjust paths to match the actual project structure.
- Set `rsc` appropriately (`true` for Next App Router, `false` otherwise).
- Choose a base color (`slate`, `stone`, custom brand) and explain consequences.

---

## Utilities (`cn` helper)

Ensure there is a utility helper file like:

```ts
// src/lib/utils.ts or lib/utils.ts
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...inputs: any[]) {
  return twMerge(clsx(inputs));
}
```

shadcn components should import this via the `utils` alias or relative path.

This skill should:

- Create the file if missing.
- Fix imports in existing shadcn components when paths/aliases change.

---

## Theming & Design Tokens

### 1. Radius

Define radius tokens in `tailwind.config` (or adjust existing ones):

```ts
theme: {
  extend: {
    borderRadius: {
      lg: "0.5rem",
      md: "0.375rem",
      sm: "0.25rem"
    }
  }
}
```

This skill can:

- Suggest different radius scales (rounded vs sharp) depending on the product’s vibe.
- Ensure consistency across components (no random hardcoded radius values).

### 2. Colors

Use CSS variables or Tailwind tokens and map them to shadcn’s semantic colors.

- If using CSS variables, ensure global CSS defines something like:

  ```css
  :root {
    --background: 0 0% 100%;
    --foreground: 222 84% 4%;
    /* ... */
  }

  .dark {
    --background: 222 84% 4%;
    --foreground: 210 40% 98%;
    /* ... */
  }
  ```

- Tailwind config should use these variables in theme extension where needed.

This skill should help:

- Introduce or adjust brand colors (primary, secondary, accent).
- Keep mapping **semantic** (e.g. `primary`, `destructive`, `muted`) instead of raw color names only.

### 3. Typography

This skill can:

- Suggest font import patterns (e.g. using `next/font` in Next.js or global CSS in Vite).
- Encourage consistent usage of heading/body font scales.
- Map typography tokens to Tailwind classes (`text-sm`, `text-base`, `text-lg`, etc.) that components use.

### 4. Dark Mode

- Ensure Tailwind `darkMode` setting matches project strategy:

  ```ts
  darkMode: ["class"]
  ```

- Ensure theme switching toggles the right root class (`<html class="dark">` or `<body class="dark">`).
- shadcn components should respond to these classes via CSS variables.

This skill should:

- Propose or refine a `ThemeProvider` pattern for toggling themes.
- Ensure that theme toggling is accessible and persisted (e.g. via localStorage) where desired.

---

## Fixing Broken Setups

When the user’s shadcn install is partially broken, this skill should:

1. Inspect:
   - `components.json`
   - `tailwind.config`
   - Global CSS
   - `lib/utils.ts` and shadcn components’ imports

2. Identify common issues:
   - Wrong `css` or `config` path in `components.json`
   - Missing `cn` helper or incorrect import path
   - Tailwind `content` not including shadcn component paths
   - Mismatched aliases (`@/components` vs relative paths)

3. Provide targeted fixes:
   - Update configs and imports.
   - Suggest minimal file moves/renames to align with shadcn expectations.
   - Avoid unnecessary breaking changes.

---

## Step-by-Step Workflow

When this skill is active, follow these steps:

1. **Detect framework & structure**
   - Next.js vs Vite vs generic React.
   - Where components and styles live.

2. **Ensure Tailwind is wired correctly**
   - Confirm `tailwind.config` and `postcss.config` are present.
   - Ensure appropriate `content` and `darkMode` settings.

3. **Create or fix `components.json`**
   - Populate `tailwind.config`, `css`, and aliases correctly.
   - Set `rsc` according to framework.

4. **Ensure utilities & base components**
   - Add `lib/utils.ts` with `cn` helper if missing.
   - Ensure existing shadcn components use correct imports.

5. **Configure theme tokens**
   - Adjust radius, colors, typography to user’s taste.
   - Ensure CSS variable definitions exist for light/dark themes.

6. **Validate by example**
   - Suggest or update a small sample component (e.g. `Button`) to ensure everything compiles and styles correctly.

7. **Document decisions**
   - Summarize:
     - Where configs live.
     - How to add new components.
     - How to tweak theme tokens in the future.

---

## Example Prompts That Should Use This Skill

- “Install shadcn/ui and set up theme tokens for this Next.js app.”
- “Fix my shadcn setup: components.json and cn imports are broken.”
- “Change our brand colors and radius across all shadcn components.”
- “Set up dark mode properly for our shadcn-based UI.”
- “Align our design tokens with shadcn’s theme structure.”

For these tasks, rely on this skill specifically for **shadcn setup & theming**, while delegating
framework-specific concerns (Next.js routing, Vite build config, tests, etc.) to the appropriate
other skills.

Attribution

AgentiveCityAgentiveCity
View sourceMore from AgentiveCity →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Responsive Design

Implement modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first breakpoint strategies. Use when building adaptive interfaces, implementing fluid layouts, or creating component-level responsive behavior.

393432 votes

Mermaid Diagrams

Creating and refining Mermaid diagrams with live reload. Use when users want flowcharts, sequence diagrams, class diagrams, ER diagrams, state diagrams, or any other Mermaid visualization. Provides best practices for syntax, styling, and the iterative workflow using mermaid_preview and mermaid_save tools.

2032 votes

sleek-design-mobile-apps

Use when the user wants to design a mobile app, create screens, build UI, or interact with their Sleek projects. Covers high-level requests ("design an app that does X") and specific ones ("list my projects", "create a new project", "screenshot that screen").

5711 votes

swiftui-design-skill

SwiftUI frontend visual design skill. Creates beautiful, distinctive iOS/macOS interfaces that avoid generic AI slop patterns. Covers design direction, layout systems, typography, color, spacing, brand integration, and design review. Use when designing new SwiftUI views, reviewing UI quality, creating iOS prototypes, choosing visual styles, improving app aesthetics, or when the UI looks generic or AI-generated.

1801 votes

Ios Hig

Use when designing iOS interfaces, implementing accessibility (VoiceOver, Dynamic Type), handling dark mode, ensuring adequate touch targets, providing animation/haptic feedback, or requesting user permissions. Apple Human Interface Guidelines for iOS compliance.

761 votes
View all in design →