Skip to main content
command CX Codex

shadcn-init — Claude Code command: what it does, how to install

The shadcn-init command sets up shadcn/ui in a project and adds a defined set of components. Use it when you want the UI files placed in the expected directory with the new-york theme.

AGPL-3.0 ★ 267 updated 2026-02-20

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/shadcn-init.md
Open on GitHub

What shadcn-init does

The command runs npx shadcn@latest init in the 10xRules.ai project, then adds button, card, input, tabs, table, dialog, sheet, form, textarea, select, switch, and toast. It checks that the components are under src/components/ui and that the selected theme is new-york.

The setup must not use the --defaults flag. That restriction matters: an initialization run with that flag does not follow this command’s instructions. Components are added through a separate npx shadcn@latest add call.

What it helps with

  • initialize shadcn/ui in a project
  • add the specified UI components
  • check that components are in src/components/ui
  • verify the new-york theme

Example prompts for the agent

  • Set up shadcn/ui in this project and add the required components with /shadcn-init.
  • Prepare the shadcn/ui components under src/components/ui using the new-york theme.

How to install shadcn-init

Manually: put the files in place

.claude/commands/shadcn-init.md

Call it with /shadcn-init. For all projects use ~/.claude/commands/

Questions about shadcn-init

How do I install shadcn-init in Claude Code?

Copy the command file to .claude/commands/shadcn-init.md.

What does shadcn-init do?

It initializes shadcn/ui, adds a defined component set, then checks the component directory and theme.

Can I use the --defaults flag?

No. The command’s instructions explicitly prohibit --defaults during initialization.

Similar slash commands

All slash commands for Frontend and UI →

From the same set24

The whole set →
shadcn-status-checkpoint shadcn-status-checkpoint — a command that documents implementation progress for UI components in a structured markdown file. Keeps your work history clear when developing complex views across multiple AI conversations. CX Codex +1 ★ 267repo stars astro Guidelines for Claude Code to generate server-side pages and endpoints in Astro. Ensures type safety, middleware handling, and request validation. CX Codex +1 ★ 267repo stars playwright-e2e-testing Enforces Playwright E2E testing standards: Page Object Model, locators, browser context isolation, and parallel runs. CX Codex +1 ★ 267repo stars react-development react-development sets coding standards for React components inside an Astro app: hooks over classes, memoization, Tailwind-driven responsiveness. CX Codex +1 ★ 267repo stars github-action Guides Claude Code in generating GitHub Actions workflows with scoped secrets, composite steps, and upstream version checks. CX Codex +1 ★ 267repo stars shadcn-resume-implementation shadcn-resume-implementation is a Claude Code command that resumes frontend work from a saved status. It uses the implementation plan, frontend rules, and type definitions. CX Codex +1 ★ 267repo stars shadcn-plan-summary shadcn-plan-summary — a command that captures decisions from UI architecture sessions. Extracts choices about layout, flows, API integration, and state management, then compiles them into a structured report for the next development phase. CX Codex +1 ★ 267repo stars test-plan test-plan is a Claude Code rule that builds a project-specific test plan from the codebase and tech stack. It writes the result in Polish as Markdown. CX Codex +1 ★ 267repo stars

Project sponsors

Companies that keep this analytics open