К основному содержанию
скилл CX Codex

21st-cli-use — скилл для Claude Code: что делает и как установить

Ищет, скачивает и ставит React- и shadcn-компоненты, темы и SVG-логотипы из каталога 21st.dev через утилиту 21st. Срабатывает при наличии components.json, избавляя от ручной вёрстки.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add 21st-dev/skill --skill 21st-cli-use -a claude-code
Открыть на GitHub

Что делает 21st-cli-use

Скилл учит агента работать с CLI @21st-dev/cli. Вместо самостоятельного написания кнопок или модалок агент ищет готовые элементы по каталогу через 21st search, читает разметку командой 21st get или ставит компонент прямо в проект с помощью 21st add <user>/<slug>. Код записывается в components/ui/<slug>.tsx, а пакетный менеджер проекта автоматически устанавливает нужные npm-зависимости.

Для работы требуется разовая авторизация: команда npx @21st-dev/cli login либо ключ в переменной окружения TWENTYFIRST_TOKEN или API_KEY_21ST. Поиск метаданных, просмотр превью, CSS тем и SVG-логотипы брендов из svgl.app полностью бесплатны. Загрузка исходного кода компонентов упирается в бесплатную дневную квоту.

Если на аккаунте не подключён доступ к 21st AI, команда 21st generate выдаст ошибку ai_subscription_required. В такой ситуации агент должен просто забрать готовый исходник из каталога и доработать его локально под ваши требования.

Какие задачи решает

  • найти готовые React-компоненты или темы в каталоге 21st.dev
  • установить компонент shadcn в проект одной командой через CLI
  • получить CSS-стили темы или код компонента по числовому ID
  • загрузить SVG-логотипы брендов из открытой библиотеки svgl.app

Примеры запросов агенту

  • найди компонент на 21st для таблицы тарифов
  • поставь наш компонент shadcn/button через 21st CLI
  • вытащи код компонента с id 143 из каталога 21st

Как установить 21st-cli-use

1Через Skills CLI (Vercel)

npx skills add 21st-dev/skill --skill 21st-cli-use -a claude-code

2Вручную: положить файлы

~/.claude/skills/21st-cli-use/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/21st-cli-use/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Из того же набора6

21st-ai Скилл для генерации и правки UI через CLI 21st: набросать варианты по промпту, посмотреть их в браузере и забрать код в проект. CX Codex +1 2 000установок 21st-registry Публикует React-компоненты, CSS-темы и шаблоны на 21st.dev и управляет уже опубликованным через CLI 21st. CX Codex +1 1 800установок 21st-ui-build Скилл для реализации страниц и компонентов в существующем веб-проекте: сначала читает дизайн-контекст и токены, потом ищет готовое в 21st. CX Codex +1 1 400установок 21st-ui-review Проверяет существующий UI на доступность, адаптивность и расхождения с дизайн-системой проекта. Пригодится перед релизом страницы или после чужого пул-реквеста. CX Codex +1 1 300установок 21st-ui-explore Скилл предлагает несколько разных направлений интерфейса, опираясь на дизайн-систему проекта и подборку референсов из 21st. Пригодится, когда неясно, как должна выглядеть новая страница. CX Codex +1 1 400установок

Похожие

use-topbar cognitedata Скилл ставит в приложение Flows/Fusion единый топбар из @aura/topbar: хлебные крошки, переключатель темы, кнопка Atlas. CX Codex +1 1 900установок shadcn shadcn-ui Скилл ведёт агента по работе с shadcn/ui: добавляет компоненты, ищет в реестрах, чинит верстку и собирает дизайн-систему по вашему описанию. CX Codex +1 123 300установок shadcn-component-discovery mattbx Скилл ищет готовые компоненты и реестры в экосистеме shadcn до того, как вы начнёте писать свой UI с нуля. CX Codex +1 731установок shadcn-svelte huntabyte Скилл помогает работать с shadcn-svelte: добавлять компоненты, составлять интерфейсы, исправлять стили и отлаживать проекты. Нужен, если вы пишете UI на Svelte с использованием shadcn-svelte или планируете начать. CX Codex +1 6 700установок beui starc007 Подбирает и ставит анимированные React-компоненты beUI через MCP или реестр shadcn. Пригодится при сборке интерфейсов для чатов и агентов. CX Codex +1 844установок agent-elements 21st-dev Помогает ассистенту собирать интерфейсы чатов и агентов на React 19 и Tailwind v4 через компоненты Agent Elements. Нужен для вывода карточек вызова инструментов, планов и подтверждений. CX Codex +1 724установок

Рядом в теме «Фронтенд и UI»

Всё по теме «Фронтенд и UI» →

Вопросы о 21st-cli-use

Как установить 21st-cli-use в Claude Code?

Выполните команду npx skills add 21st-dev/skill --skill 21st-cli-use -a claude-code. Скилл загрузится в ~/.claude/skills/21st-cli-use/SKILL.md.

Что делает скилл 21st-cli-use?

Он обучает агента консольным командам утилиты 21st: поиску компонентов и тем, загрузке логотипов, установке кода в components/ui и настройке зависимостей.

Нужен ли платный аккаунт для работы с 21st-cli-use?

Поиск, превью, стили тем и логотипы бесплатны. Скачивание кода компонентов расходует бесплатный дневной лимит, а генерация через 21st generate требует отдельного доступа к 21st AI.

Исходный текст

SKILL.md · Apache-2.0
---
name: 21st-cli-use
description: >-
  Search, 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 CLI — find, install & generate from the terminal

The `21st` CLI (`npx @21st-dev/cli`, bin `21st`) is the command-line surface for
the 21st.dev catalog. Search first, install what fits, and only hand-write UI
when nothing matches. To **publish** your own components/themes/templates, use
the `21st-registry` skill; to publish a project's design as a theme, use
`21st-design-sync`.

## Auth (do this once)

Two interchangeable credentials, both sent as the API key:

1. **Login session** — `npx @21st-dev/cli login` opens the browser and saves a
   token to `~/.config/21st/auth.json`. Best for interactive/dev machines.
2. **API key** — `21st_sk_…` from **https://21st.dev/mcp** (or
   **https://21st.dev/settings/api-keys**). Pass via `--api-key <key>` or the
   `TWENTYFIRST_TOKEN` / `API_KEY_21ST` env var. Best for CI.

`21st whoami` shows the signed-in account; `21st usage` shows retrieval
tier/quota and the `21st AI generation` status, not an AI credit balance.
For structured status, use MCP `get_usage.aiGenerationEnabled` or CLI 1.17.1+
`21st usage --json`. Missing or unknown status does not grant AI access. `21st logout`
clears the saved login.

## Metering

Metadata (search, previews, a theme's CSS) is **free**. Retrieving component
**code** (`21st get`, install) has a free daily quota; Builder includes
unlimited retrieval. Hosted 21st AI requires separate AI access and consumes
AI credits. Base Builder has AI off. Check `21st usage` before choosing
generation: when AI is not explicitly enabled, search and retrieve code,
then adapt it with your own coding agent. Do not retry a generation denied
with `ai_subscription_required` until AI access is enabled.

---

## Find

```bash
# Search everything (components + themes + templates)
21st search "pricing table" --limit 10
21st search button --type c        # components only (c | theme | template)
21st search dark --type theme
# Filters: --tag <slug> --color <bucket> --sort <s> --free|--paid
#          --author <username> --mine --liked   --json for machine output
```

**Always search before hand-writing a component** — a close match is usually
faster to install and adapt than to build from scratch.

## Logos

```bash
21st logo discord            # search brand + UI SVG logos (free, no login)
21st logo "next js" --limit 5 --json
```

Prints each logo's name and SVG url(s) to curl straight into a project. Uses the
open svgl.app library; free and unmetered on every plan.

## Pull code

```bash
# Print a component's code + demo (by the id from search)
21st get 143 [--json]

# Print a theme's CSS (by a theme id from `search --type theme`)
21st theme <id> [--json]
```

## Install

```bash
# Install a component into the current project (shadcn under the hood)
21st add <user>/<slug>            # e.g. 21st add shadcn/button
21st add @<team>/<slug>           # from a team library
# --print to dump the shadcn command instead of running it
```

`21st add` resolves the registry item, writes it to `components/ui/<slug>.tsx`,
and installs npm deps with the project's package manager. Public/unlisted items
also work with stock shadcn:
`npx shadcn@latest add "https://21st.dev/r/<user>/<slug>"`.

## Generate

When nothing in the catalog fits and `21st usage` explicitly reports AI
generation enabled, sketch it with hosted 21st AI and iterate from
the terminal. That loop (`21st generate` → `generation` → `iterate` → `take`)
lives in the **`21st-ai`** skill. With AI off, adapt catalog code locally instead:

```bash
21st generate "a glassy pricing section with a monthly/yearly toggle"
```

Opens a preview; from there you edit any variant and pull its code. See the
`21st-ai` skill for the full generate/iterate/grab-code flow and metering.

---

## Bookmarks, teams & MCP config

```bash
21st bookmarks [--type component|theme|template]
21st bookmark <id> --type <kind> [--remove]     # heart / un-heart
21st lists                          # your bookmark lists
21st list <listId>

21st teams                          # your teams
21st team <teamId>                  # a team's libraries
21st team-components <teamId> [--library <id>]

21st init --client cursor|claude|codex|vscode|devin [--write]      # write MCP config
21st install-skill                  # install the 21st skills globally
```

© 21st-dev · Apache-2.0 · 21st-dev/skill

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой