Agent skill

shadcn Skill: shadcn/ui Rules for AI Agents

The shadcn skill teaches an AI coding agent to find, install, compose and style shadcn/ui components with the correct APIs, using your project's own components.json as context.

Install
git clone https://github.com/shadcn-ui/ui.git
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the shadcn skill?

The shadcn skill is a SKILL.md maintained inside the shadcn-ui/ui repository. It reads your project through the shadcn CLI's info command, then makes your agent use existing components, compose them, use variants and semantic colors, and follow written rules for forms, styling, composition and icons. It does not design anything for you.

The shadcn skill lives in the skills/shadcn folder of the shadcn-ui/ui repository, next to the library's own code. It is the maintainers' own guidance for agents that work with shadcn/ui, where components are added to your project as source code through the CLI.

The skill's frontmatter marks it user-invocable: false, so it works as background knowledge instead of a command you call. The docs say it activates when it finds a components.json file in your project.

What changes in your agent's output

  • The skill injects the result of npx shadcn@latest info --json, so the agent sees your framework, aliases, Tailwind version, base library, icon library and resolved paths.
  • It tells the agent to search registries before writing custom UI, then compose, for example a settings page from Tabs, Card and form controls.
  • Semantic colors replace raw ones. The skill names bg-primary and text-muted-foreground and rejects values such as bg-blue-500.
  • Forms use FieldGroup and Field instead of a div with space-y classes, and validation uses data-invalid together with aria-invalid.
  • Dialog, Sheet and Drawer always get a title, and a loading button composes a Spinner because Button has no isPending prop.

What the rules cover

The critical rules each link to a rules file with incorrect and correct code pairs: styling, forms, composition, icons, and a base-versus-radix file for the differences between the two base libraries. There is also a chat-interface section for components such as MessageScroller, Message, Bubble, Attachment and Marker.

Who the shadcn skill is for

Best for

  • Projects that already use shadcn/ui, or that start from its CLI.
  • Agents that keep writing space-y stacks, raw color classes or untitled dialogs.
  • Teams that switch visual presets and want the agent to use the CLI's preset commands instead of hand-editing tokens.

Not for

  • Choosing a visual direction. The skill enforces component usage rather than taste. Pair it with design-taste-frontend or ui-ux-pro-max for that.
  • Projects without shadcn/ui. The docs say the skill activates when it finds a components.json file.
  • Searching and installing from registries as a live tool. That job belongs to the shadcn MCP server.

Use it with UiChemy

shadcn/ui output is React code, so it suits a front end you ship yourself. If your target is a WordPress site, UiChemy builds there instead: UiChemy AI to WordPress imports an existing AI build, and Composer edits the result in Elementor or Gutenberg. Click Get Started on uichemy.com.