shadcn

Manage shadcn/ui components with CLI dry-run and diff workflows.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/andreasasprou/polaris --skill shadcn-andreasasprou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shadcn
Source: https://github.com/andreasasprou/polaris/tree/main/.agents/skills/shadcn
Command: npx skills add https://github.com/andreasasprou/polaris --skill shadcn-andreasasprou

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill centralizes and automates common shadcn/ui workflows so developers can safely add, update, audit, and compose UI components without guessing registry sources or corrupting project-specific configuration.

Core Features & Use Cases

  • Inventory & context discovery: Reads project config to determine framework, aliases, tailwind version, icon library, and resolved paths before making changes.
  • Safe component installation & updates: Uses the shadcn CLI with dry-run, diff, and view modes to preview changes and perform smart merges while preserving local edits.
  • Styling and composition enforcement: Provides explicit rules and checklists for styling, forms, composition, icons, and presets to ensure accessibility and consistent patterns.
  • Use case: Add a button component from a registry, preview diffs against local files, fix import aliases and icon library mismatches, and then apply only the validated changes.

Quick Start

Run the shadcn CLI to inspect project info and use add --dry-run and --diff to preview component changes before applying them.

Frequently Asked Questions about shadcn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely add shadcn/ui components without overwriting local edits?

To safely add shadcn/ui components, use the CLI add command with --dry-run and --diff flags to preview changes, validate imports, and perform smart merges that preserve your local edits before applying them.

How do I fix import alias and icon library mismatches in shadcn/ui projects?

Fix import alias and icon library mismatches by auditing the project context through components.json, enforcing styling and composition rules, and validating the resolved paths before updating the shadcn/ui components.

Can I use shadcn CLI workflows to manage component registries and presets?

Yes, you can manage component registries and presets using shadcn CLI workflows, which support adding, searching, and composing UI components while enforcing project-context checks and safe operations.

What's the best way to preview component changes before updating a Tailwind project?

The best way to preview component changes is using the shadcn CLI view and add --dry-run commands, which display diffs against local files to help you validate styling and composition before applying updates.

Why does the shadcn CLI require a components.json configuration file?

The shadcn CLI requires a components.json configuration file to perform inventory and context discovery, determining the framework, aliases, Tailwind version, and resolved paths before making any safe operations.

Are there limitations when merging shadcn/ui updates into existing projects?

Limitations when merging shadcn/ui updates include potential styling mismatches and icon library conflicts, which is why enforcing CLI-driven safe operations, project-context checks, and dry-run previews are required before applying changes.