Agent skill

Chakra UI v3 Builder

by chakra-ui in chakra-ui/chakra-ui

Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

MITAuto-check passedFrontend & Design

Install Chakra UI v3 Builder

skills CLI
$ npx skills add chakra-ui/chakra-ui --skill chakra-ui-builder -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install chakra-ui/chakra-ui chakra-ui-builder --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/chakra-ui/chakra-ui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/chakra-ui-builder .claude/skills/chakra-ui-builder && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
chakra-ui-builder
GitHub stars
41k
Token cost
~3.1k tokens
SKILL.md length
1,079 words
Files
4 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

  • Works in 8 steps: Read the project context → Choose the right layout primitives → Use tokens, not raw values → …
  • Building a form, dashboard, navbar or pricing table with Chakra UI
  • SKILL.md covers Step 1 — Read the project…, Project setup, Step 2 — Choose the right… and Step 3 — Use tokens, not raw…, plus 7 more sections
  • Calls npm, pnpm and yarn

What it does

The agent starts by reading the project context in package.json: the Chakra version, with v3 patterns used unless the project is on v2, the framework (Next.js App Router or Pages Router, Vite or plain React), TypeScript or JavaScript, and the package manager as shown by the lockfile. It also glances at existing components to match their naming and file structure, and asks before building when requirements are vague or the choices matter.

Setup covers installing @chakra-ui/react and @emotion/react, then adding snippets with npx @chakra-ui/cli snippet add, which brings in the provider, toaster and tooltip and installs dependencies such as next-themes. The provider is wired into app/layout.tsx or pages/_app.tsx depending on the framework, with the hydration warning handled, and the CLI writes files to a framework-specific components/ui folder.

Building and theming topics include pages, forms, dashboards, navbars, cards, landing sections and pricing tables, plus color mode, brand colors, tokens, semantic tokens, recipes, slot recipes, typegen and ejecting the default theme. Reference notes cover charts, a component decision tree and theming.

When your agent uses it

  • Building a form, dashboard, navbar or pricing table with Chakra UI
  • Adding Chakra UI to a Next.js or Vite project
  • Defining brand colors, tokens and dark mode values
  • Creating recipes or slot recipes for reusable component styles
  • Building charts with Chakra

Example prompts

  • “Add Chakra UI to my Vite app and set up the provider and color mode.”
  • “Build a pricing table with three tiers using Chakra UI v3.”
  • “Add our brand colors as semantic tokens with dark mode values.”

Requirements

  • A React project with Node.js and a package manager
  • The @chakra-ui/react and @emotion/react packages

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Read the project context
  2. Choose the right layout primitives
  3. Use tokens, not raw values
  4. Responsive styles
  5. Forms
  6. Accessibility
  7. Next.js: where to add "use client"
  8. When to extract components, use recipes, and customize the theme

What it can do on your machine

Read from SKILL.md and the folder at commit f799e4d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • pnpm
    • yarn
    • bun
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, pnpm, yarn and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Chakra UI v3 Builder loads about 3.1k tokens when it runs, and up to ~11k if it reads all its reference files. Until then it costs about 245 tokens; SKILL.md has 1,079 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~245
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~11k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from chakra-ui/chakra-ui at commit f799e4d, republished under its MIT licence (© chakra-ui). 1,079 words, ~3,081 tokens.

Download SKILL.mdSave it as .claude/skills/chakra-ui-builder/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
chakra-ui-builder
description
Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form, dashboard, navbar, card, landing section, pricing table, or layout using Chakra UI; wants to add Chakra UI to a project, set up ChakraProvider, run CLI snippets, configure color mode, or fix provider wrapping; or asks about theming — defining brand colors, design tokens, semantic tokens, dark mode values, component recipes, slot recipes, typegen, or ejecting the default theme. Trigger on any Chakra UI building, setup, or theming or charts request, however casually phrased — "add my brand colors", "make a reusable card style", "build a bar chart", "show me a line chart", "make me a login form", "build a sidebar", "add Chakra to my app".

Chakra UI Builder

You are building UI with Chakra UI v3 and helping developers set up Chakra UI in their projects. Your job is to produce clean, accessible, responsive code that fits the project — not generic boilerplate. Read the project context first, then build or set up.


Step 1 — Read the project context

Check package.json if available. Look for:

  • Chakra UI version (use v3 patterns by default; only use v2 if explicitly on v2)
  • Framework: Next.js App Router, Pages Router, Vite, plain React
  • TypeScript or JavaScript
  • Package manager (from lockfile: pnpm-lock.yaml, yarn.lock, bun.lock, package-lock.json)

Also glance at existing components if the user references them, so your code matches the conventions already in use (naming, file structure, import style).

If the requirements are vague or the component is complex enough that choices matter (layout direction, data shape, color palette, number of variants), ask before building rather than generating something that needs to be thrown away.


Project setup

If Chakra UI isn't installed yet, complete setup before building.

Install
bash
# npm
npm install @chakra-ui/react @emotion/react

# pnpm
pnpm add @chakra-ui/react @emotion/react

# yarn
yarn add @chakra-ui/react @emotion/react

# bun
bun add @chakra-ui/react @emotion/react
Generate snippets with the CLI
bash
npx @chakra-ui/cli snippet add

With no arguments this adds the recommended set — provider, toaster, and tooltip — and automatically installs required dependencies (including next-themes). Use --all to add every snippet, or snippet list to browse first.

The CLI detects your framework and writes files to the right place:

FrameworkOutput path
Next.js (with src/)src/components/ui/
Next.js (no src/)components/ui/
Vite / plain Reactsrc/components/ui/
Remixapp/components/ui/
Wire up the Provider

Next.js App Router (app/layout.tsx):

tsx
import { Provider } from "@/components/ui/provider"

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body>
        <Provider>{children}</Provider>
      </body>
    </html>
  )
}

suppressHydrationWarning prevents a mismatch caused by next-themes injecting the color-mode class. Do not add "use client" to layout.tsx — the generated provider file already has it.

Next.js Pages Router (pages/_app.tsx):

tsx
import { Provider } from "@/components/ui/provider"

export default function App({ Component, pageProps }) {
  return (
    <Provider>
      <Component {...pageProps} />
    </Provider>
  )
}

Vite (src/main.tsx):

tsx
import { Provider } from "./components/ui/provider"

createRoot(document.getElementById("root")!).render(
  <StrictMode>
    <Provider>
      <App />
    </Provider>
  </StrictMode>,
)
Manual Provider (if CLI is unavailable)

If the CLI fails, create components/ui/provider.tsx manually and install next-themes separately:

tsx
"use client"
import { ChakraProvider, defaultSystem } from "@chakra-ui/react"
import { ThemeProvider } from "next-themes"

export function Provider({ children }: { children: React.ReactNode }) {
  return (
    <ChakraProvider value={defaultSystem}>
      <ThemeProvider attribute="class" disableTransitionOnChange>
        {children}
      </ThemeProvider>
    </ChakraProvider>
  )
}
Common setup issues
  • Unstyled components — app is not wrapped in <Provider>. Check the import path and that Provider wraps the component tree.
  • Hydration mismatch — add suppressHydrationWarning to <html> in App Router.
  • next-themes not found — install it: npm install next-themes (only needed for the manual fallback; the CLI handles it automatically).
  • extendTheme not exported — this is a v2 pattern. Use createSystem in v3.

Step 2 — Choose the right layout primitives

Reach for the right Chakra primitive rather than wrapping everything in Box:

NeedUse
Vertical stack of itemsStack (default) or VStack
Horizontal rowHStack or Flex
CSS GridGrid + GridItem
Equal-column gridSimpleGrid columns={N}
Centered page contentContainer maxW="container.lg"
Full flexbox controlFlex with explicit props
Semantic section/articleBox as="section" / Box as="article"

Avoid deep nesting. If you're three Box levels deep with no semantic reason, flatten it. Prefer gap over margin between siblings.


Step 3 — Use tokens, not raw values

Chakra v3 ships semantic tokens that automatically adapt to light/dark mode. Prefer them over hard-coded palette values — they make the component theme-aware without any extra work.

tsx
// Prefer semantic tokens
<Box bg="bg.subtle" color="fg.default" borderColor="border.subtle" />
<Text color="fg.muted" />
<Box shadow="md" rounded="lg" />

// Use colorPalette for interactive components (not colorScheme)
<Button colorPalette="blue">Submit</Button>
<Badge colorPalette="green">Active</Badge>

Use raw palette values (blue.500, gray.100) only when a specific color is intentional and should not shift with color mode.


Step 4 — Responsive styles

Chakra uses mobile-first breakpoints. Use array or object syntax consistently:

tsx
// Array: [base, sm, md, lg, xl]
<Box px={[4, 6, 8]} fontSize={["sm", "md", "lg"]} />

// Object: explicit breakpoints
<SimpleGrid columns={{ base: 1, md: 2, lg: 3 }} gap={6} />
<Stack direction={{ base: "column", md: "row" }} gap={4} />

Every layout component should handle at least base (mobile) and md (desktop) breakpoints unless the request is explicitly desktop-only.


Step 5 — Forms

Use Field.Root for all form fields — it wires up label, input, error, and help text correctly:

tsx
<Field.Root invalid={!!error} required>
  <Field.Label>Email address</Field.Label>
  <Input type="email" placeholder="you@example.com" />
  <Field.ErrorText>{error}</Field.ErrorText>
  <Field.HelpText>We'll never share your email.</Field.HelpText>
</Field.Root>

For form submission state, use disabled (not isDisabled) on inputs and buttons. Group related fields in a Stack gap={4}.


Step 6 — Accessibility

Chakra's built-in components handle most accessibility automatically — don't override it. The things you do need to provide:

  • Icon-only buttons: always add aria-label
    tsx
    <IconButton aria-label="Close dialog" icon={<CloseIcon />} />
  • Images: always pass meaningful alt text (or alt="" for decorative)
  • Form labels: use Field.Label or ensure htmlFor matches the input id
  • Interactive custom elements: if you build something with onClick on a Box, use as="button" or an actual <button> so keyboard navigation works
  • Semantic headings: use h1–h6 hierarchy; don't skip levels
  • Color contrast: don't use light gray text on white backgrounds; rely on semantic tokens which are contrast-tested

Show full SKILL.md (431 more words)Show less

Step 7 — Next.js: where to add "use client"

In Next.js App Router, Server Components are the default. Add "use client" only to files that need it — not to entire layouts or pages.

A component needs "use client" when it:

  • Uses React hooks (useState, useEffect, useContext, etc.)
  • Handles browser events (onClick with state, form submission, etc.)
  • Uses browser APIs
tsx
// Server Component — no directive needed
export default function ProductCard({ name, price }: Props) {
  return (
    <Box p={4} borderWidth={1} rounded="md">
      <Text fontWeight="bold">{name}</Text>
      <Text color="fg.muted">{price}</Text>
    </Box>
  )
}

// Client Component — needs the directive
;("use client")
export function AddToCartButton({ productId }: { productId: string }) {
  const [added, setAdded] = useState(false)
  return (
    <Button onClick={() => setAdded(true)} colorPalette="blue">
      {added ? "Added!" : "Add to cart"}
    </Button>
  )
}

The goal is to push interactivity to the leaves — keep as much of the tree as Server Components as possible.


Step 8 — When to extract components, use recipes, and customize the theme

Extract a component when the same structure appears more than twice, or when a piece is complex enough that naming it makes the parent clearer.

Suggest a recipe when a component has meaningful style variants that a developer would want to customize. Suggest a slot recipe for components with multiple coordinated parts (card with header/body/footer, stat with label/value/icon, etc.).

For deeper theming work — defining brand color tokens, semantic tokens with dark mode values, full recipe/slot-recipe authoring, typegen, or ejecting the default theme — read references/theming.md before responding. It covers the complete defineConfig / createSystem API with full examples.

For any chart request — bar charts, area charts, line charts, pie/donut charts, BarList, BarSegment, or anything involving @chakra-ui/charts — read references/charts.md before responding. It covers the useChart hook, all three chart types, Recharts integration, color tokens, and complete runnable examples.

When you're unsure which component to use, or the user hasn't specified one, read references/component-decision-tree.md. It covers every Chakra component with guidance on when to choose one over a similar alternative.


Output format

Produce:

  1. Complete, runnable code — correct imports, no placeholders like TODO or ...rest of component
  2. Proper import statements — group Chakra imports, then local imports
  3. Component separation — split into multiple components/files if the component is complex or contains clearly separable parts
  4. Responsive styles — at minimum base and md breakpoints for layout
  5. Brief explanation after the code — 2–4 sentences on the key decisions made (layout approach, accessibility choices, responsive strategy). Skip the explanation if the request was trivial.
tsx
// Good import style
import { Box, Button, Field, Stack, Text } from "@chakra-ui/react"
// Then local
import { SomeLocalComponent } from "./SomeLocalComponent"

When to ask first

Build immediately if the request is clear enough to produce something useful. Ask first when:

  • The data shape is unknown and it changes the entire structure (e.g., "build a table" — how many columns? what data?)
  • There are meaningful design choices the user might care about (layout direction, number of columns, color palette)
  • The user references files or existing components you haven't seen

When in doubt, state your assumptions at the top of the response and build — it's faster for the user to redirect from something concrete than from nothing.

© chakra-ui, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/chakra-ui-builder of chakra-ui/chakra-ui.

  • SKILL.md
  • references/charts.md
  • references/component-decision-tree.md
  • references/theming.md

Open the folder on GitHubat commit f799e4d

Compare with similar skills

Chakra UI v3 Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Chakra UI v3 Builder compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Chakra UI v3 Builder this skillchakra-ui/chakra-ui41k—~3.1kAutomated safety check: PassMIT
Shadcn Tailwind UILiarMTTT/TavernWeave150—~1.7kAutomated safety check: PassCustom licence
UI Design Systemtry-works/role-model118—~5kAutomated safety check: PassMIT
Tailwind V4 Shadcnsecondsky/claude-skills227—~4kAutomated safety check: PassMIT
Creative Tim UI Blockscreativetimofficial/ui12k—~2.1kAutomated safety check: NotesMIT
Tailwind V4 Shadcnever-works/ever-works1582 repos~3.8kAutomated safety check: PassMIT

Similar skills

  • Shadcn Tailwind UI

    LiarMTTT/TavernWeave

    Build, restyle, or review accessible React interfaces that use shadcn/ui, Radix UI primitives, and Tailwind CSS.

    150 GitHub stars~1.7k tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed
  • UI Design System

    try-works/role-model

    React UI component systems with TailwindCSS + Radix + shadcn/ui.

    118 GitHub stars~5k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Tailwind V4 Shadcn

    secondsky/claude-skills

    | Production-tested setup for Tailwind CSS v4 with shadcn/ui, Vite, and React.

    227 GitHub stars~4k tokensUpdated 9 days ago
    Frontend & DesignAuto-check passed
  • Creative Tim UI Blocks

    creativetimofficial/ui

    Helps install, generate and review Creative Tim UI blocks: shadcn/ui-based React and Tailwind sections that follow a restrained, production-minded design philosophy.

    12k GitHub stars~2.1k tokensUpdated 6 mo ago
    Frontend & DesignAuto-check: notes
  • Tailwind V4 Shadcn

    ever-works/ever-works

    Production-tested setup for Tailwind CSS v4 with shadcn/ui, Vite, and React.

    158 GitHub starsUsed in 2 repos~3.8k tokens
    Frontend & DesignAuto-check passed
  • Stitch to React and Vite Dashboard

    google-labs-code/stitch-skills

    Official

    Turns Stitch screens into a React, Vite and TypeScript dashboard with TanStack Query data fetching, DESIGN.md tokens as CSS variables and optional read-only Web3 data.

    8.4k GitHub stars~914 tokensUpdated 1 mo ago
    Frontend & DesignAuto-check: notes

More from chakra-ui/chakra-ui

  • Chakra UI v2 to v3 Migration

    chakra-ui/chakra-ui

    Guides an upgrade from Chakra UI v2 to v3: inspect the project, swap packages, run the official codemod, then fix provider, color mode, props, theming and Next.js code.

    41k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Reviews and converts UI code to Chakra UI v3, producing a critique, rewritten code or both, from plain HTML, Tailwind, CSS Modules or styled-components.

    41k GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed

Questions about Chakra UI v3 Builder

What does Chakra UI v3 Builder do?

Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes. js App Router or Pages Router, Vite or plain React), TypeScript or JavaScript, and the package manager as shown by the lockfile. It also glances at existing components to match their naming and file structure, and asks before building when requirements are vague or the choices matter.

When should I use Chakra UI v3 Builder?

Chakra UI v3 Builder fits situations like: building a form, dashboard, navbar or pricing table with Chakra UI; adding Chakra UI to a Next.js or Vite project; defining brand colors, tokens and dark mode values; creating recipes or slot recipes for reusable component styles.

How do I install Chakra UI v3 Builder in Claude Code?

Run `npx skills add chakra-ui/chakra-ui --skill chakra-ui-builder -a claude-code`. Or copy the skill folder (skills/chakra-ui-builder in chakra-ui/chakra-ui) into .claude/skills/chakra-ui-builder in your project. Claude Code loads it when a task matches its description.

How do I install Chakra UI v3 Builder in Codex?

Run `npx skills add chakra-ui/chakra-ui --skill chakra-ui-builder -a codex`. Or copy the skill folder (skills/chakra-ui-builder in chakra-ui/chakra-ui) into .agents/skills/chakra-ui-builder in your project. Codex loads it when a task matches its description.

Can I use Chakra UI v3 Builder in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add chakra-ui/chakra-ui --skill chakra-ui-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/chakra-ui-builder, .gemini/skills/chakra-ui-builder, .github/skills/chakra-ui-builder and .opencode/skills/chakra-ui-builder in your project.

What does Chakra UI v3 Builder need to run?

Going by SKILL.md and its folder, Chakra UI v3 Builder needs the command-line tools its instructions call (npm, pnpm, yarn, bun and npx). Our summary lists: A React project with Node.js and a package manager; The @chakra-ui/react and @emotion/react packages.

Does Chakra UI v3 Builder access the network?

SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Chakra UI v3 Builder safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Chakra UI v3 Builder use?

Chakra UI v3 Builder is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Chakra UI v3 Builder use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.4k tokens, read only when the agent opens those files.

What are the alternatives to Chakra UI v3 Builder?

Skills that share tags, products or a category with Chakra UI v3 Builder: Shadcn Tailwind UI (LiarMTTT/TavernWeave, 150 stars), UI Design System (try-works/role-model, 118 stars), Tailwind V4 Shadcn (secondsky/claude-skills, 227 stars) and Creative Tim UI Blocks (creativetimofficial/ui, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Chakra UI v3 Builder?

chakra-ui (a GitHub organization) maintains it in chakra-ui/chakra-ui, which has 40,676 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 6, 2026.

Source: chakra-ui/chakra-ui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.