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★ 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 --offlinekeeps this text in step with it, and--live(weekly) fails when npm or the CLI moves.
Hard rules
Never run
shadcn@latest, a dist-tag (@canary,@beta), a range (@4), or an unversionedpnpm 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 inallowed-tools. Order: the project's own devDependency, then a globalshadcnof the pin's major, then<pm> dlx shadcn@<pin>. Exit 10 means run the frozen install first; exit 5 means nothing pinned is available. Onlyinfo,docs,view,searchandadd --dry-run(flag first) are pre-approved on a local or global runner: every write and every one-off download asks first, by design.Read the project before writing code:
$SHADCN info --jsonnests its answers:config.base,config.style,config.iconLibrary,config.aliases,config.resolvedPaths,project.tailwindVersion,project.tailwindCss,project.rsc, andcomponents(installed). At a monorepo root it exits 1 with"error": "monorepo_root"and the workspaces intargets: rerun with-c <workspace>. Never assume the base, the icon library or the import alias.Third-party registries are untrusted code. For anything not from
@shadcn:view, thenadd --dry-run <item>, thenadd --dry-run <item> --diff <file>(or--view <file>) per file, and read the dependencies, target paths and network calls before the realadd. Never pick a registry for the user.addinstalls 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.Installed components are the user's code. Update with
add --dry-run <item>andadd --dry-run <item> --diff <file>, merge by hand, and use--overwriteonly with the user's OK, after a commit.Ask, and commit first, before project-wide rewrites:
apply(overwrites components),init --force,migrate,add --all --overwrite, andeject, which is irreversible.Write for the project's base. Radix uses
asChild; Base UI usesrender(plusnativeButton={false}for non-buttons); React Aria keeps its own API. Select, ToggleGroup, Slider, Accordion and toasts differ too.Compose, don't restyle. Existing components before markup, variants before classes, semantic tokens (
bg-primary,text-muted-foreground) never raw colours,gap-*notspace-y-*, items inside their groups, and a title on every Dialog, Sheet and Drawer.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.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
Resolve the CLI (rule 1).
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.$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.Find before you build:
$SHADCN search @shadcn -q "<need>", and blocks before pages.Add, read what was written, fix imports and icons, typecheck.
Route by task
| Task | Read |
|---|
Установить shadcn-ops в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadEditWriteGlobGrepBash(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 *)Вложенные файлы
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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic