Sign In
Share:

Official shadcn/ui skill: project-aware rules for adding, searching, composing and styling shadcn components via the shadcn CLI.

Security Reviewed

Official shadcn skill: one read-only script, no API keys; the agent runs shadcn CLI commands that download packages and write component files into your project.

What it looks like in Antigravity 2.0

Works (steps corrected)Installed with Option 1 in about 2 minutes and the agent followed the skill's rules. In an empty folder the example prompt only produced a dashboard component file; after one follow-up asking it to create a Vite + React app with shadcn init, it built and ran a working dashboard (sidebar, 4 stat cards, data table) in about 10 more minutes.Run by us on 2026-10-18 ยท desktop app, Gemini 3.8 Flash (High), Windows

Dashboard built by Antigravity with the shadcn skill: sidebar, four stat cards and a recent transactions table
What you get: a running shadcn dashboard with sidebar, stat cards and a data table.

How to get this result, step by step

  1. 1Open your project folder, start a new conversation and paste the install message. Press Enter.

    Install the "shadcn/ui" skill for Google Antigravity.
    Follow the steps at https://www.antigravityskills.org/install/shadcn-ui.md (source: https://github.com/shadcn-ui/ui/tree/main/skills/shadcn).
    Before running anything, show me what you will download and whether it includes scripts, and wait for my OK.
    Install it into this project (.agents/skills/) unless I say global. When done, check that Antigravity lists it as an installed skill.
    Antigravity 2.0 chat box with the shadcn/ui install message pasted in
  2. 2The agent lists the files and the one read-only script, then waits. Reply "OK".

    OK
    Antigravity agent listing the shadcn skill files and one read-only script, waiting for OK
  3. 3Check it is installed: in a new conversation type /shad and the skill shows up.

    /shad
    Antigravity slash menu showing shadcn after typing /shad
  4. 4Ask for the UI in plain words.

    Build a dashboard with a sidebar, stats cards, and a data table.
    Antigravity chat box with the prompt Build a dashboard with a sidebar, stats cards, and a data table
  5. 5It reads the shadcn docs and applies the skill's rules. Allow ui.shadcn.com when asked.

    Antigravity reading shadcn docs and planning with semantic tokens, Spinner, Badge and data-icon rules
  6. 6No app yet? Paste this follow-up. If it stalls after shadcn init, tell it init has finished.

    There is no app in this folder yet. Create a Vite + React app here with shadcn (npx shadcn@latest init), add the components the dashboard needs, keep one dashboard file, and start the dev server so I can open it in the browser.
    Antigravity summary: Vite and Tailwind set up, shadcn init with Base UI and Nova, components added, dev server running
On a phone-width screen the header buttons overflow; ask the agent to wrap them.
The same dashboard at phone width with header buttons cut off on the right
Full test log

Install method: Option 1 (pasted the agent prompt into a new conversation in an empty project folder).

  1. The agent read our install page and the GitHub folder, listed 21 files and said there is one script (scripts/showcase-coverage.mjs, read-only, no network). We replied OK.
  2. It copied the skill to .agents/skills/shadcn/ (21 files, 196 KB) and confirmed Antigravity registers it. In a new conversation, /shad shows shadcn in the menu.
  3. With the example prompt it read SKILL.md, ran shadcn info, read the sidebar, card and table docs from ui.shadcn.com (Antigravity asks to allow that site) and wrote a 640-line dashboard.tsx using SidebarProvider, Card, Table, InputGroup, Skeleton and Empty, as the rules require.
  4. There was no app in the folder, so nothing could run. We asked it to create a Vite + React app with npx shadcn@latest init. It picked Base UI and the Nova preset, added sidebar, card, table, badge and 9 more components, passed tsc -b && vite build and started the dev server on http://127.0.0.1:5173/.

What we corrected on this page

  • Start in a project that already has components.json, or ask for the app first (see the second prompt). In an empty folder the example prompt gives you a component file that cannot run.
  • After shadcn init finished, the agent kept waiting for the command to exit. Its output already said "Project initialization completed"; telling the agent so made it continue.
  • It left a second copy of dashboard.tsx in components/ at the project root; delete it. On a phone-width screen the header buttons run off the edge; the rest of the layout stacks fine.
  • Names, emails and amounts in the dashboard are invented sample data.

Install shadcn/ui in Google Antigravity

Antigravity loads skills from .agents/skills/ in your project or ~/.gemini/config/skills/ for all projects (official docs). Full guide

EasiestOption 1: paste this to your Antigravity agent
Install the "shadcn/ui" skill for Google Antigravity.
Follow the steps at https://www.antigravityskills.org/install/shadcn-ui.md (source: https://github.com/shadcn-ui/ui/tree/main/skills/shadcn).
Before running anything, show me what you will download and whether it includes scripts, and wait for my OK.
Install it into this project (.agents/skills/) unless I say global. When done, check that Antigravity lists it as an installed skill.

The agent reads the install file, shows you what it will download and waits for your OK.

Option 2: install it yourself
  1. 1. Download the repository
    git clone --depth 1 https://github.com/shadcn-ui/ui /tmp/shadcn-ui

    The skill lives in skills/shadcn. A sparse checkout also works: git clone --depth 1 --filter=blob:none --sparse https://github.com/shadcn-ui/ui /tmp/shadcn-ui && git -C /tmp/shadcn-ui sparse-checkout set skills

  2. 2. Copy the skill into this project (workspace skill)
    mkdir -p .agents/skills && cp -r /tmp/shadcn-ui/skills/shadcn .agents/skills/

    Run from your project root. Antigravity then reads .agents/skills/shadcn/SKILL.md.

  3. 3. Or install it for all projects (global skill)
    mkdir -p ~/.gemini/config/skills && cp -r /tmp/shadcn-ui/skills/shadcn ~/.gemini/config/skills/

    Use this instead of the previous step. For the Antigravity CLI the global folder is ~/.gemini/antigravity-cli/skills/.

  4. 4. Check that Antigravity sees it

    Antigravity 2.0 app: start a new conversation and ask "What skills do you have?" (the app has no /skills command). Antigravity CLI: run /skills; in a session that was already open, run /skills reload first. The skill is listed as shadcn.

The shadcn docs name only Claude Code as an example and install with npx skills add shadcn/ui; Antigravity is not mentioned anywhere in the repository. Needs Node.js; no API keys. The skill is active in projects with a components.json file.

Using Claude Code, Cursor or Codex? See other assistants below.

What is shadcn/ui?

The official shadcn skill, for React developers who want an agent to add and compose shadcn/ui components correctly in their own project. It reads your project setup with the shadcn CLI, then follows written rules for forms, styling, icons, chat UIs and theming.

How to use shadcn/ui?

Use it in a project that has a components.json file and ask for UI in plain words, such as a login form or a dashboard with a sidebar and data table. The agent checks installed components, looks up docs with npx shadcn@latest docs, adds what is missing and follows the composition rules.

Key features of shadcn/ui

  • โœ“We counted at ba1503c: 21 files, 158,662 bytes; SKILL.md has 296 lines and the frontmatter sets user-invocable: false, so it loads automatically
  • โœ“We counted: 6 rule files (forms, styling, composition, icons, chat, base-vs-radix) with incorrect/correct examples, plus 8 evals in evals/evals.json; rules/chat.md now also covers Trace (assistant activity rows) and CodeBlock, added in 4233ed1 (2026-10-14)
  • โœ“New since our 2026-10-06 review (commit 2d3f1cd, 2026-10-09): a DESIGN.md workflow, 2 guides (386 and 268 lines), 3 showcase templates and a coverage script; the agent scaffolds an app from a preset, runs add --all and builds a design system page
  • โœ“README says (skills docs page): project context comes from shadcn info --json; we counted 6 named presets (nova, vega, maia, lyra, mira, luma) and 6 templates (next, vite, start, react-router, astro, laravel)
  • โœ“Component picker table: Dialog vs Sheet vs Drawer vs AlertDialog, ToggleGroup for 2-5 options, Empty for empty states

When to use shadcn/ui

  1. 1Add a login or settings form
  2. 2Dashboard with sidebar, stats cards and data table
  3. 3Switch a project to another preset
  4. 4Turn a DESIGN.md into a themed shadcn app

Installation & Setup Guide

Agent Rules / Prompt Setup

Follow these steps (taken from the project's own docs) to configure shadcn/ui in your development environment.

Step 1: Claude Code and other agents: skills CLIclaude
npx skills add shadcn/ui

Documented on the shadcn/ui Skills docs page (apps/v4/content/docs/(root)/skills.mdx), which uses Claude Code as its example assistant.

Step 2: Cursorcursor

Not documented by the project for the skill. The docs only describe the shadcn MCP server for Cursor (.cursor/mcp.json, apps/v4/content/docs/(root)/mcp.mdx), and the repo ships a .cursor-plugin/plugin.json manifest.

Usage Example & Verification

Prompt / Request Example
1) README example (docs page skills.mdx): "Build a dashboard with a sidebar, stats cards, and a data table."
-> The agent checks which components are installed, adds missing ones with npx shadcn@latest add, and composes Sidebar + Card + Chart + Table with semantic colors.

2) README example (same page): "Switch to --preset [CODE]"
-> It asks overwrite / partial / merge / skip, then runs npx shadcn@latest apply <code> (or init --preset) as you chose.

3) Our example: "Apply this DESIGN.md to a new Vite app and build a design system page."
-> Triggers the design-system workflow: init with a preset, add --all, map tokens to the theme variables, then a page of color roles and state matrices.

Security Review

Static review
Reviewed Date
2026-10-21
Audited Ref / Commit
ba1503c64472b82256d9de95e2e62c5901a38e8b
Reviewer
antigravityskills.org (static code review)

Official shadcn skill: one read-only script, no API keys; the agent runs shadcn CLI commands that download packages and write component files into your project.

Full review: scope, findings, risks
Audit Scope:shadcn-ui/ui at HEAD ba1503c (2026-10-19; skills/shadcn last changed in 4233ed1 on 2026-10-14): SKILL.md in full, rules/chat.md changes since our 2026-10-14 review at 954ce95 (new Trace and CodeBlock rules), design-system.md, design-system-page.md, scripts/showcase-coverage.mjs, agents/openai.yml, evals/evals.json, apps/v4/content/docs/(root)/skills.mdx and mcp.mdx, .cursor-plugin/plugin.json, LICENSE.md. Earlier reviews were at 4a90344 (2026-10-06) and 954ce95 (2026-10-14); the 954ce95-to-HEAD diff touches only SKILL.md and rules/chat.md, which contain no commands beyond the shadcn CLI.
Key Findings:No executable code except one read-only Node script. All actions go through the official shadcn CLI: network downloads of packages and registry items, file writes into the project, and npm install of font packages in the DESIGN.md workflow. No API keys.
Identified Operational Risks & Permissions:Medium-low. The agent runs CLI commands that download and write code; the skill requires explicit approval before --overwrite and tells the agent to read third-party registry code after adding it.

Static review at ba1503c (diff from 954ce95 limited to SKILL.md and rules/chat.md, Markdown only). skills/shadcn/ has 21 files: SKILL.md, cli.md, customization.md, registry.md, mcp.md, design-system.md, design-system-page.md, 6 rules/*.md, evals/evals.json, agents/openai.yml, 2 PNG icons, 3 showcase templates (2 .tsx, 1 .css) and scripts/showcase-coverage.mjs. The script only reads a ui directory and showcase sources and prints how many components are shown (no network, no writes, no subprocess). SKILL.md sets allowed-tools to Bash(npx shadcn@latest *), Bash(pnpm dlx shadcn@latest *) and Bash(bunx --bun shadcn@latest *) and embeds !`npx shadcn@latest info --json`. The agent is told to run init, add, search, docs, apply and preset commands, which download the shadcn package and registry items and write files; design-system.md also has it run npm install for @fontsource-variable font packages and add --all -y. SKILL.md requires explicit user approval before --overwrite and says to read and verify third-party registry code after adding it. No API keys or environment variables.

Operational Notes & Known Limitations

Known Limitations

  • โ€ขNeeds Node.js and a project with components.json; every command goes through npx, pnpm dlx or bunx and downloads the latest shadcn package
  • โ€ขSKILL.md injects project context with the !`npx shadcn@latest info --json` syntax; if your agent does not run that, ask it to run the command itself
  • โ€ขThe DESIGN.md workflow tells the agent to run npm install for font packages (@fontsource-variable/...) and add --all -y
  • โ€ขReact and shadcn/ui only; the repo does not mention Antigravity (we searched)

Frequently Asked Questions

Is the shadcn/ui skill safe?

In our static review of commit ba1503c it is Markdown, images, one small read-only script (showcase-coverage.mjs) and evals. It tells the agent to run the shadcn CLI, limited by allowed-tools to npx, pnpm dlx and bunx shadcn@latest, which downloads packages and writes component files into your project.

How do I install shadcn/ui skill in Antigravity?

Clone github.com/shadcn-ui/ui, copy skills/shadcn into .agents/skills/ (or ~/.gemini/config/skills/), and ask "What skills do you have?" (CLI: /skills). Use it in a project with a components.json.

Is this the official shadcn skill?

Yes. It lives in the shadcn-ui/ui repository under skills/shadcn and is documented on the shadcn/ui Skills page.

Does it need the shadcn MCP server?

No. It works through the CLI; mcp.md only documents the optional MCP server.

Supported Platforms

antigravityclaudecursor