Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

shadcn-ops

БесплатноЗапускает вложенные скриптыНе проверен

Use when building or fixing UI with shadcn/ui or in any project with a components.json: init, add, view, search, docs, info, presets and apply, Base UI vs…

0xDarkMatterот 0xDarkMatter★ 86 звёзд на GitHub

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

shadcn/ui Operations

Why: shadcn/ui copies component source into your project through a CLI that ships several releases a month. Its docs and official agent skill run that CLI as @latest, unpinned and pre-approved. This skill runs a pinned CLI, treats every registry as code you are about to install, and goes deep on the admin dashboards most projects build with it.

Versions verified 2026-11-10 against shadcn 4.23.0 (published 2026-10-27, no install scripts, Socket supply-chain score 97), ui.shadcn.com/docs and its llms.txt index. The pin and the other moving facts live in assets/shadcn-facts.json; scripts/check-shadcn-facts.py --offline keeps this text in step with it, and --live (weekly) fails when npm or the CLI moves.

Hard rules

  1. Never run shadcn@latest, a dist-tag (@canary, @beta), a range (@4), or an unversioned pnpm dlx shadcn / yarn dlx shadcn. Resolve the runner once per project:

    bash "<skill-dir>/scripts/shadcn-cmd.sh"     # {"prefix":"pnpm exec shadcn","source":"project",...}
    

    Then type that literal prefix in every command (pnpm exec shadcn info --json). This skill writes it as $SHADCN; don't store it in a shell variable, which neither survives between tool calls nor matches the pre-approved forms in allowed-tools. Order: the project's own devDependency, then a global shadcn of the pin's major, then <pm> dlx shadcn@<pin>. Exit 10 means run the frozen install first; exit 5 means nothing pinned is available. Only info, docs, view, search and add --dry-run (flag first) are pre-approved on a local or global runner: every write and every one-off download asks first, by design.

  2. Read the project before writing code: $SHADCN info --json nests its answers: config.base, config.style, config.iconLibrary, config.aliases, config.resolvedPaths, project.tailwindVersion, project.tailwindCss, project.rsc, and components (installed). At a monorepo root it exits 1 with "error": "monorepo_root" and the workspaces in targets: rerun with -c <workspace>. Never assume the base, the icon library or the import alias.

  3. Third-party registries are untrusted code. For anything not from @shadcn: view, then add --dry-run <item>, then add --dry-run <item> --diff <file> (or --view <file>) per file, and read the dependencies, target paths and network calls before the real add. Never pick a registry for the user.

  4. add installs npm packages. New ones follow the supply-chain rule: a 7-day cooldown and a behavioural scan (supply-chain-defense owns how), with the lockfile change committed beside the component.

  5. Installed components are the user's code. Update with add --dry-run <item> and add --dry-run <item> --diff <file>, merge by hand, and use --overwrite only with the user's OK, after a commit.

  6. Ask, and commit first, before project-wide rewrites: apply (overwrites components), init --force, migrate, add --all --overwrite, and eject, which is irreversible.

  7. Write for the project's base. Radix uses asChild; Base UI uses render (plus nativeButton={false} for non-buttons); React Aria keeps its own API. Select, ToggleGroup, Slider, Accordion and toasts differ too.

  8. Compose, don't restyle. Existing components before markup, variants before classes, semantic tokens (bg-primary, text-muted-foreground) never raw colours, gap-* not space-y-*, items inside their groups, and a title on every Dialog, Sheet and Drawer.

  9. Don't add the shadcn MCP server to Claude Code. It duplicates the CLI, runs in every session, and its documented config is unpinned. If a user insists, use the pinned project-scoped form in assets/mcp.json.example.

  10. Verify every change: typecheck and build after an add, read the files it wrote (imports, icon library, composition), and check keyboard and screen-reader basics; a11y-ops runs full audits.

Start here

  1. Resolve the CLI (rule 1).

  2. Audit the project. It only reads files; it never runs the CLI, a package manager or git:

    bash "<skill-dir>/scripts/run-python.sh" "<skill-dir>/scripts/shadcn-audit.py" .
    bash "<skill-dir>/scripts/run-python.sh" "<skill-dir>/scripts/shadcn-audit.py" apps/web --json | jq '.data[]'
    

    Exit 10 means findings (severity, id, file:line, message, fix; high first), 0 clean, 3 no components.json or not shadcn's (at a monorepo root it names the workspaces), 4 invalid JSON or a facts file missing a key.

  3. $SHADCN info --json, then $SHADCN docs <component> and fetch the URLs it prints before using a component whose API you haven't read in this session.

  4. Find before you build: $SHADCN search @shadcn -q "<need>", and blocks before pages.

  5. Add, read what was written, fix imports and icons, typecheck.

Route by task

Task Read
Полный SKILL.md на GitHub

Установить shadcn-ops в Claude Code и Claude Desktop

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

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

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

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

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

Read
Edit
Write
Glob
Grep
Bash(bash *shadcn-ops/scripts/*)
Bash(pnpm exec shadcn info *)
Bash(pnpm exec shadcn docs *)
Bash(pnpm exec shadcn view *)
Bash(pnpm exec shadcn search *)
Bash(pnpm exec shadcn add --dry-run *)
Bash(npx --no shadcn info *)
Bash(npx --no shadcn docs *)
Bash(npx --no shadcn view *)
Bash(npx --no shadcn search *)
Bash(npx --no shadcn add --dry-run *)
Bash(yarn run shadcn info *)
Bash(yarn run shadcn docs *)
Bash(yarn run shadcn view *)
Bash(yarn run shadcn search *)
Bash(yarn run shadcn add --dry-run *)
Bash(bunx --no-install shadcn info *)
Bash(bunx --no-install shadcn docs *)
Bash(bunx --no-install shadcn view *)
Bash(bunx --no-install shadcn search *)
Bash(bunx --no-install shadcn add --dry-run *)
Bash(shadcn info *)
Bash(shadcn docs *)
Bash(shadcn view *)
Bash(shadcn search *)
Bash(shadcn add --dry-run *)

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

assets/mcp.json.exampleassets/shadcn-facts.jsonreferences/admin-layouts.mdreferences/bases.mdreferences/charts.mdreferences/cli-and-pinning.mdreferences/components-json.mdreferences/composition-rules.mdreferences/data-tables.mdreferences/design-systems.mdreferences/forms.mdreferences/mcp.mdreferences/migrations-and-eject.mdreferences/monorepo.mdreferences/registry-authoring.mdreferences/supply-chain-and-registries.mdreferences/testing.mdreferences/theming.mdscripts/check-shadcn-facts.pyscripts/run-python.shscripts/shadcn-audit.pyscripts/shadcn-cmd.sh

FAQ

Что делает скилл shadcn-ops?

Use when building or fixing UI with shadcn/ui or in any project with a components.json: init, add, view, search, docs, info, presets and apply, Base UI vs Radix vs React Aria, Tailwind v4 theming with CSS variables, dark mode, admin dashboards (sidebar, dashboard and login blocks, data tables on TanStack Table, forms with Field and React Hook Form or TanStack Form, dialogs, sheets, toasts, charts, empty and loading states), monorepos, migrate, eject, registry authoring (registry.json, shadcn build), third-party registries and the shadcn MCP server. Runs the CLI pinned, never @latest; ships a project audit.

Как установить скилл shadcn-ops?

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

Скилл shadcn-ops запускает скрипты?

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

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

Сравнить shadcn-ops с