Apply shadcn/ui Components

VerifiedCaution

Applies shadcn/ui components to React pages and components while integrating the project's custom theme from index.css, with a structured workflow and build verification.

Sby Skills Guide Bot
DevelopmentIntermediate
9/14/2026
Claude Code
#shadcn-ui#react#ui-components#tailwind#theming

Recommended for

Automated summary

Applies shadcn/ui components to specified React pages and components while using the project's custom CSS-variable theme.

Strengths

  • Creates a per-file todo list and tracks progress through the styling workflow.
  • Uses shadcn MCP registry tools to fetch component examples before editing.
  • Shows how to apply custom CSS variables with Tailwind arbitrary-value classes.
  • Runs npm run build at the end to catch import, dependency, and syntax issues.

Limitations

  • Assumes a React project with shadcn/ui and a theme defined in frontend/src/index.css with the listed --color-* variables.
  • Depends on shadcn MCP tools and npx commands being available in the environment.
  • Verification is limited to npm run build; it does not include visual or functional testing.
When to use it

Use when styling specific React pages or components with shadcn/ui in a project that has an existing custom theme.

When not to use it

Do not use for non-React or non-shadcn projects, or when the expected theme variables and file paths are absent.

Security analysis

Caution
Quality score90/100

The skill uses Bash for legitimate package installation and build verification. It does not instruct destructive actions, exfiltration, or obfuscated commands, but network-based package installation and build execution warrant a caution rating.

Findings
  • •Executes `npx shadcn@latest add ...` which downloads and installs third-party components from the network.
  • •Runs `npm run build` which executes project build scripts via Bash.
How this analysis is made

Examples

Style authentication pages
Style Login.jsx, SignUp.jsx, and ForgotPassword.jsx with shadcn/ui components, using the custom theme variables from frontend/src/index.css.
Apply shadcn to navigation
Apply shadcn/ui styling to NavBar.jsx and keep all existing navigation behavior intact.
Style a data table page
Style the Users page with shadcn/ui Card, Table, Input, and Button components, using the project's custom primary and accent colors.

name: apply-shadcn description: Apply shadcn/ui components to React pages and components. This skill should be used when styling specific pages or components with shadcn/ui in a React project that has custom theming. The user will specify which pages or components to style. allowed-tools: Bash, Write, Edit, Read, Glob, Grep, TodoWrite, mcp__shadcn__get_project_registries, mcp__shadcn__search_items_in_registries, mcp__shadcn__view_items_in_registries, mcp__shadcn__get_item_examples_from_registries, mcp__shadcn__get_add_command_for_items, mcp__shadcn__get_audit_checklist

Overview

This skill applies shadcn/ui components to React pages and components while integrating with the project's custom theme defined in frontend/src/index.css.

When to Use This Skill

Use this skill when the user requests to:

  • Style specific pages with shadcn/ui components
  • Apply shadcn/ui to a list of components
  • Add shadcn/ui styling to authentication pages, navigation, or other UI elements

The user will provide either:

  • A list of page/component names to style (e.g., "Style Login.jsx, SignUp.jsx, and NavBar.jsx")
  • A category of pages to style (e.g., "Style all authentication pages")

Workflow

Step 1: Create a Todo List

Create a todo list with one task per page or component that needs styling. Each task should be named after the file being styled (e.g., "Style Login.jsx", "Style NavBar.jsx").

Step 2: Install Required shadcn Components

Before styling any pages, ensure the necessary shadcn components are installed. Common components needed:

npx shadcn@latest add card input button table label separator navigation-menu

Adjust the component list based on what the pages require.

Step 3: Style Each Page or Component

For each page or component in the todo list, follow this process:

  1. Mark the task as in_progress in the todo list

  2. Read the existing file to understand its current structure and functionality

  3. Use the MCP tool to get component examples: Call mcp__shadcn__get_item_examples_from_registries to retrieve usage examples for the shadcn components needed (e.g., Card, Input, Button, Table)

  4. Review the examples to understand:

    • Proper component structure and composition
    • Correct props and patterns
    • Layout best practices
  5. Apply shadcn styling with custom theme integration:

    • Replace existing HTML elements with shadcn components
    • Integrate custom CSS variables from frontend/src/index.css for colors
    • Maintain existing functionality and logic
    • Follow the theme integration guidelines below
  6. Mark the task as completed in the todo list

  7. Move to the next page or component

Step 4: Verify All Tasks Complete

After styling all pages, verify that every task in the todo list is marked as completed.

Step 5: Verify Setup

Run npm run build to validate imports, dependencies, and syntax

Theme Integration Guidelines

CRITICAL: The project uses custom CSS variables defined in frontend/src/index.css. When styling components that need custom colors, use these variables instead of shadcn's default theme classes.

Custom CSS Variables

Available custom variables from frontend/src/index.css:

  • --color-primary-{50-950} - Primary color scale
  • --color-secondary-{50-950} - Secondary color scale
  • --color-accent-{50-950} - Accent color scale
  • --color-success-{50-900} - Success colors
  • --color-error-{50-900} - Error colors

Example: Styling Primary Buttons

Use custom CSS variables with Tailwind's arbitrary value syntax:

<Button
  className="w-full bg-[var(--color-primary-600)] hover:bg-[var(--color-primary-700)] text-white"
>
  Button Text
</Button>

Why use custom variables: The custom theme uses specific color values (e.g., purple hue at 250) that differ from shadcn's default theme. Using bg-[var(--color-primary-600)] ensures styled pages match the rest of the application.

Common shadcn Components Used

  • card - Card, CardContent, CardDescription, CardHeader, CardTitle
  • input - Input
  • button - Button
  • table - Table, TableBody, TableCell, TableHead, TableHeader, TableRow
  • navigation-menu - Navigation menu components
  • label - Label
  • separator - Separator

Notes

  • Always use the MCP tool before editing to understand proper component usage
  • Preserve existing component functionality and logic
  • Integrate custom theme variables for consistent styling
  • Work through the todo list systematically, one page at a time
  • Mark each task as completed immediately after finishing it

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/apply-shadcn-ui-components-mu0qzodn/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/apply-shadcn-ui-components-mu0qzodn' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/apply-shadcn-ui-components-mu0qzodn/download' --output '.skill-downloads/apply-shadcn-ui-components-mu0qzodn/SKILL.md.part' && mv '.skill-downloads/apply-shadcn-ui-components-mu0qzodn/SKILL.md.part' '.skill-downloads/apply-shadcn-ui-components-mu0qzodn/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash, Write, Edit, Read, Glob, Grep, TodoWrite, mcp__shadcn__get_project_registries, mcp__shadcn__search_items_in_registries, mcp__shadcn__view_items_in_registries, mcp__shadcn__get_item_examples_from_registries, mcp__shadcn__get_add_command_for_items, mcp__shadcn__get_audit_checklist

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/apply-shadcn-ui-components-mu0qzodn/SKILL.md' && test -s '.skill-downloads/apply-shadcn-ui-components-mu0qzodn/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/apply-shadcn' && cp -R '.skill-downloads/apply-shadcn-ui-components-mu0qzodn' '.claude/skills/apply-shadcn'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/apply-shadcn-ui-components-mu0qzodn'

openskills read 'apply-shadcn-ui-components-mu0qzodn'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/apply-shadcn-ui-components-mu0qzodn/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills