shadcn skill for Codex.
The shadcn skill teaches Codex to build with shadcn/ui the way its maintainers intend: search the registry before writing custom markup, compose full components, and style with semantic tokens instead of raw colors. It ships in OpenAI’s Build Web Apps plugin.
Updated November 12, 2026 · 3 min read
At a glance
| Skill name | shadcn |
| Comes with | The Build Web Apps plugin, by OpenAI |
| Install | codex plugin add build-web-apps@openai-curated, or /plugins in Codex |
| Codex uses it | In any project with a components.json file, or when you mention shadcn/ui, a registry or a --preset code |
| Source | openai/plugins on GitHub |
What it does
Before it starts, the skill runs npx shadcn@latest info --json so Codex knows your project’s config and which components are already installed. Then it follows four principles: use an existing component first, compose rather than reinvent, use built-in variants before custom styles, and use semantic colors.
It also enforces specific rules, each backed by a reference file with wrong and right code:
- Styling:
gap-*instead ofspace-y-*,size-10instead ofw-10 h-10, no manualdark:color overrides,cn()for conditional classes. - Forms:
FieldGroupandFieldfor layout,data-invalidandaria-invalidfor validation,ToggleGroupfor small option sets. - Structure: every dialog, sheet and drawer has a title; cards use their full set of parts; avatars always have a fallback.
- Components over markup:
Alertfor callouts,Emptyfor empty states,Skeletonfor loading,Badgeinstead of styled spans,sonnerfor toasts.
When to use it
Install it if your project uses shadcn/ui, or if you want Codex to start one. It stops the most common problem with AI-written shadcn code: components that look right but are assembled from raw divs and hard-coded colors, so they break in dark mode and drift from your theme.
Try it
Use the shadcn skill. Build an account settings page with shadcn/ui: a profile form (name, email, avatar), notification switches, and a danger zone with a confirmation dialog. Use only existing components and semantic colors.
Does it work in Claude Code?
The instructions are a standard SKILL.md, so you can copy the folder from GitHub into ~/.claude/skills. Claude Code doesn’t run the ! command at the top that injects your project context, so ask it to run npx shadcn@latest info first.