Command Palette

Search for a command to run...

Назад к скиллам
скилл № 65496

21st-dev-components

Use when the user wants to build a React site or app section from 21st.dev components, clone the structure of a reference site with 21st.dev building blocks…

БесплатноЗапускает вложенные скрипты
J-StaR-Films-Studiosот J-StaR-Films-Studios★ 27 звёзд на GitHub

Установить 21st-dev-components в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

21st.dev Reference-to-Component Skill

This skill routes between two flows:

  • Auto mode: the user provides a reference site URL and wants the agent to inspect it, infer the required sections, choose matching 21st.dev components automatically, and integrate them.
  • Manual mode: the user wants guided collection. The agent lists the sections, tells the user what to fetch from 21st.dev, then integrates the returned handoff.

Use this skill only for React-family projects. If the repo is not React-based, explain that v1 of this skill is React-only and stop.

Bundled Resources

  • references/categories.md Use for section-to-category mapping and direct 21st.dev category URLs.
  • references/manual-handoff-template.md Use when the user is gathering components manually.
  • references/section-detection-rubric.md Use during Auto mode after crawling the reference site.
  • scripts/resolve-21st-component.mjs Resolve a 21st.dev component page into normalized metadata.
  • scripts/fetch-21st-source.mjs Fetch raw source from 21st CDN URLs.
  • scripts/build-manual-handoff-template.mjs Generate a manual handoff markdown file for the user.

Raw Code Resolution Standard

Do not derive 21st.dev CDN source URLs by string concatenation or by manually modifying the community page URL.

Always treat the user-facing 21st.dev component page as the source of truth, then resolve it into metadata before fetching code.

Required workflow

  1. Start with the 21st.dev community component URL.
  2. Run the resolver script on that page URL.
  3. Read codeUrl and demoCodeUrl from the resolver output.
  4. Fetch source from those returned URLs.
  5. Only fall back to manual copy/paste if resolution succeeds but raw source cannot be fetched in the current environment.

Command

node scripts/resolve-21st-component.mjs --url "<21st-component-url>" --json

Why this rule exists

21st.dev community URLs do not always map cleanly to CDN paths. Mismatches can include:

  • author slug differences between page URL and CDN path
  • internal user IDs in CDN paths instead of public author names
  • timestamped filenames such as code.1748367465506.tsx
  • version query params such as ?v=1
  • demo paths that are not reliably predictable

Because of this, the correct standard is:

community page URL -> resolve metadata -> fetch codeUrl / demoCodeUrl

not:

community page URL -> manually transform into CDN URL

Manual fallback rule

If the resolver returns metadata but the environment cannot fetch the raw source files, ask the user for one of these:

  • pasted code from the 21st.dev Copy Code action
  • downloaded component source
  • permission to use an alternate environment that can fetch the returned CDN URLs

This resolution step is mandatory in both Auto mode and Manual mode whenever the environment allows it.

Mode Router

Use Auto mode when

  • The user gives a live reference site URL.
  • The user says "build me something like this", "clone this layout", or "crawl this site and rebuild it".
  • The user expects the agent to choose components automatically.

Use Manual mode when

  • The user says they will browse 21st.dev themselves.
  • The user pastes 21st.dev component URLs, copied prompts, code fences, or a markdown handoff file.
  • The user wants the agent to tell them exactly what sections to gather.

If Auto mode fails because the site is blocked, brittle, or the 21st lookup is weak, fall back to Manual mode immediately and generate the handoff template instead of dead-ending.

Auto Mode Workflow

Step 1: Crawl the reference site in a browser

Use the browser-first workflow from the webapp-testing skill. Do not rely only on raw HTML if the page is clearly client-rendered.

What to inspect:

  • header / navbar / announcement bars
  • hero block
  • feature grids or card rows
  • social proof / logos
  • testimonials
  • pricing
  • FAQ
  • forms / auth blocks
  • footer
  • app shell elements such as sidebar, table, tabs, or modals

Load references/section-detection-rubric.md if the page structure is not obvious.

Step 2: Build a page anatomy model

Write down the major sections in visual order. For each section, capture:

  • section name
  • rough structure
  • visual tone
  • obvious dependencies such as carousels, motion, video, maps, charts, or forms

Step 3: Map sections to 21st.dev categories

Load references/categories.md and map each detected section to one or more category slugs.

Rules:

  • Match structure first, style second.
  • Use one primary category and optional supporting categories.
  • Decorative elements like shaders, backgrounds, or borders are secondary, not the main section match.

Step 4: Discover and resolve candidate components

Search 21st.dev for each mapped category. Once you have likely component URLs:

  1. Resolve each page:
    node scripts/resolve-21st-component.mjs --url "<21st-component-url>" --json
    
  2. Inspect:
    • dependency count
    • component/d
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • 21st-handoff.md
  • references/categories.md
  • references/manual-handoff-template.md
  • references/section-detection-rubric.md
  • scripts/_shared.mjs
  • scripts/build-manual-handoff-template.mjs
  • scripts/fetch-21st-source.mjs
  • scripts/resolve-21st-component.mjs

FAQ

Что делает скилл 21st-dev-components?

Use when the user wants to build a React site or app section from 21st.dev components, clone the structure of a reference site with 21st.dev building blocks, browse 21st.dev manually and return copied prompts/code, or says things like "build me a site like this", "use 21st.dev", "copy prompt", "component URL", "hero from 21st", or "match this landing page with ready-made components".

Как установить скилл 21st-dev-components?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл 21st-dev-components запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить 21st-dev-components с