/21st:21st-design-syncfrom 21st
Publishes a project's shadcn/Tailwind CSS design tokens (light/dark variables) to the 21st.dev community as a shareable theme using the `21st publish-theme` CLI command.
Ships in 21st. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Take the design a project already ships (its light + dark CSS variables) and
publish it to the public 21st.dev theme library so anyone can preview,
bookmark, and apply it. Under the hood this is one CLI call:
21st publish-theme <file.css> --name "…".
publish-theme is a management endpoint: it
accepts a 21st_sk_… key only, not a 21st login session token. Get one
at https://21st.dev/mcp (or https://21st.dev/settings/api-keys) and pass it via
--api-key 21st_sk_… or the TWENTYFIRST_TOKEN / API_KEY_21ST env var. If
the user has no key, point them there — don't try to mint one.@21st-dev/cli (bin 21st). Use npx @21st-dev/cli
if it isn't installed.is_public in the community library (there is no unlisted/private option for
themes). Confirm with the user before publishing.Locate the file that defines the shadcn/Tailwind theme variables. Check, in order:
app/globals.css, src/app/globals.csssrc/index.css, styles/globals.css, app/styles/globals.cssYou're looking for a :root { … } block of CSS custom properties
(--background, --foreground, --card, --primary, --secondary,
--muted, --accent, --destructive, --border, --input, --ring, the
--chart-* / --sidebar-* tokens, --radius) and a matching .dark { … }
block. Values may be hsl(...), oklch(...), hex, or raw channels — keep them
exactly as the project wrote them.
Tailwind v4 projects usually keep the same :root / .dark blocks plus an
@theme inline mapping; you only need the :root and .dark token values,
not the @theme mapping.
The publish endpoint parses --name: value; pairs out of a :root { … } block
and a .dark { … } block, and requires both to be non-empty. So the file
you publish must contain both.
:root and .dark blocks into a standalone file
(e.g. project-theme.css). Nothing else is required.:root and no .dark (or an empty one),
generate a dark variant before publishing — don't ship a theme with an empty
dark mode. Reuse the add-dark-mode / oklch-skill approach: invert
lightness while preserving hue/chroma so the dark set stays on-brand. Keep the
same token names.Minimal shape:
:root {
--background: 0 0% 100%;
--foreground: 240 10% 4%;
--primary: 240 6% 10%;
/* …the rest of the project's light tokens… */
--radius: 0.5rem;
}
.dark {
--background: 240 10% 4%;
--foreground: 0 0% 98%;
--primary: 0 0% 98%;
/* …the rest of the project's dark tokens… */
}
package.json, the repo, or the site title. Ask the user if it's
ambiguous.dark, minimal, neutral, vibrant, saas. Pass comma-separated.21st publish-theme ./project-theme.css \
--name "Acme" \
--tags dark,minimal \
--api-key 21st_sk_… # or set TWENTYFIRST_TOKEN
The command prints the live theme URL (https://21st.dev/community/themes/<slug>).
Share it with the user.
publish-theme creates a NEW theme (there's no upsert-by-slug like
components have). Running it twice = two themes in the library.21st edit <theme-id> --type theme [--name "…"] [--tags a,b].21st delete <theme-id> --type theme --yes (soft-unpublish, reversible)./design-sync skill, a different destination.21st-registry.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub 21st-dev/claude-code-plugin --plugin 21st7 skills in this plugin
/21st-aiGenerate and iterate on UI with 21st AI from the terminal via the `21st` CLI (`@21st-dev/cli`): sketch a UI from a prompt, preview the variants in the browser, edit any variant in place with a natural-language change, and pull the final code into the project. Use whenever the user wants to BUILD / SKETCH new UI ("sketch a pricing page", "generate a hero with 21st", "make me a <X> section"), ITERATE on a generated draft ("edit the third variant", "add a toggle to that take"), or GRAB the code of a draft ("pull that variant's code", "сгенери UI на 21st", "поправь третий вариант", "забери код того наброска"). For finding/installing existing components use the `21st-cli-use` skill; to publish your own, `21st-registry`./21st-cli-useSearch, install and pull code from the 21st.dev catalog with the `21st` CLI (`@21st-dev/cli`): find React/shadcn components, themes and templates, print a component's code or a theme's CSS, install an item into the project, or generate a new component with 21st AI. Use whenever the user says "search/find a component/theme on 21st", "install our team's Button", "add @user/slug", "pull that component's code", "найди компонент на 21st", "поставь наш компонент", or wants to script catalog access from the shell/CI. Auto-activate when a project has a `components.json` — search 21st before hand-writing UI./21st-registryPublish your own work to 21st.dev and manage it from the terminal with the `21st` CLI (`@21st-dev/cli`): publish a React component to a team library, publish a CSS theme or a template listing, edit / unpublish / delete your published items, list and reopen existing component work, and read/replace your public profile page (bento board). Triggers when the user says "publish/share/upload this to 21st", "залей в наш регистр", "опубликуй компонент/тему/темплейт", "share with team", "make this reusable", "unpublish/edit/delete my component", "change its visibility", "find/open my old component or draft", "найди/открой мой старый компонент или драфт", "add this to my 21st profile/bento", "update my profile page", "обнови мой профиль на 21st", "добавь блок в бенто", "add controls/knobs to my demo", "сделай демо с контролами". For finding and installing existing items use `21st-cli-use`; for turning a project's design tokens into a theme use `21st-design-sync`./21st-ui-buildBuild or substantially change production UI using the current project's design context, existing components, and grounded 21st inspiration. Use when implementing a page, section, component, responsive redesign, or visual polish in an existing web project. Trigger for requests such as "build this UI", "implement this screen", "make this page production-ready", or "use 21st to create the interface". Use 21st-ui-explore first when the visual direction is intentionally undecided, and 21st-ui-review for critique-only work./21st-ui-exploreExplore and compare multiple meaningfully different UI directions grounded in the current project's design system and 21st inspiration. Use when the user wants options, variants, concepts, a redesign direction, visual experimentation, or is unsure how a new interface should look. Trigger for requests such as "show me three directions", "explore alternatives", "what could this page look like", or "generate variants". Do not use for a straightforward implementation with an already-selected direction./21st-ui-reviewReview existing UI against the project's design context, accessibility expectations, responsive behavior, interaction quality, and high-confidence production rules. Use for UI audits, design QA, frontend review, accessibility review, consistency checks, or requests to find and safely fix visual defects. Trigger for requests such as "review this UI", "audit this page", "find design issues", "check responsiveness", or "fix obvious UX problems". Use 21st-ui-build when the request is primarily to create new UI.Other plugins' skills for the same job