shadcn-library
Skill0 starsChanged 12 days agoMITView on GitHub
Use when creating or adding shadcn/ui components in any project — copy the raw source from a local snapshot of the shadcn/ui registry (create it with the refresh procedure below) instead of writing components from memory or hand-rolling equivalents. Covers copying, adapting imports, and restyling.
In this repository34 other files it gives its agents.
- chatgpt/AGENTS.mdAGENTS.md
- opencode/AGENTS.mdAGENTS.md
- zcode/AGENTS.mdAGENTS.md
- claude/CLAUDE.mdCLAUDE.md
- agent-doc-authoringSkill
- agent-experienceSkill
- ai-image-promptsSkill
- api-behavior-flowSkill
- architecture-and-performanceSkill
- behavioral-testingSkill
- behavior-auditSkill
- browser-tabs-uiSkill
- code-qualitySkill
- context-compactSkill
- design-principlesSkill
- design-to-deliverySkill
- design-validationSkill
- e2e-test-authoringSkill
- engineering-reviewSkill
- excalidrawSkill
- external-ai-consultSkill
- google-omni-videoSkill
- llm-agent-tool-disciplineSkill
- parallel-subagentsSkill
- qa-test-scenariosSkill
- reliable-executionSkill
- research-and-reuseSkill
- server-security-hardeningSkill
- session-handoffSkill
- sudo-handoffSkill
- task-intakeSkill
- tauri-v2-docsSkill
- test-failure-triageSkill
- user-behavior-flowSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Why: when shadcn/ui is the project's chosen system, copying verified raw source is faster and more reliable than regenerating it from …
- Very specific: line 17
Pick from the snapshot: Read ~/.agents/component-library/shadcn/INDEX.md.
- Very specific: line 25
Verify: run the applicable project typecheck/lint through code-quality, confirm imports resolve, and inspect rendered keyboard/focus and …
- Very specific: line 29
When the user asks to refresh the library: refetch https://ui.shadcn.com/r/index.json, then per component …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
shadcn Library
Local raw snapshot of the shadcn/ui registry at ~/.agents/component-library/shadcn/ (see its INDEX.md for the component list and dependencies). If the snapshot does not exist on this machine yet, create it with the snapshot refresh procedure at the end of this skill, or fetch the same JSON from the registry URLs directly for a one-off component.
Why: when shadcn/ui is the project's chosen system, copying verified raw source is faster and more reliable than regenerating it from memory, and works offline. Do not introduce shadcn into a project with another established system merely because this skill exists.
Non-negotiable: the snapshot is raw upstream source. It carries no design decisions. Every project has its own design system — restyle at copy time; never carry over upstream visual styling (colors, radii, shadows, typography) into a project that defines its own.
Procedure
- Check the project first. Search its existing components and reuse them before copying. For missing shadcn primitives, use the local snapshot as stated in this skill's description; do not switch to the registry CLI by default. Inspect the project's framework, React/Tailwind versions and primitive dependencies for snapshot compatibility.
- Pick from the snapshot. Read
~/.agents/component-library/shadcn/INDEX.md; find the component and its deps (dependencies= npm packages,registryDependencies= other components in the same lib — copy those too). - Copy the source into the project's component dir (typically
components/ui/<name>.tsx). Do not rename internals (data-slotattributes stay). - Adapt imports to the project's convention:
from "cn"→ the project'scnutil (usually@/lib/utils)from "radix-ui"→ either install the unifiedradix-uipackage, or split into@radix-ui/react-<primitive>per the project's existing imports- lucide-react icons: swap to the project's icon family if it uses a different one
- Resolve missing deps against the project's package manager, existing versions and lockfile. Verify compatibility before adding only the dependencies required by the chosen component; do not migrate the project's Radix package layout incidentally.
- Restyle to the project's design system — map
classNamevalues onto the project's tokens/CSS variables. Match existing components in the project (radius scale, color tokens, spacing). - Verify: run the applicable project typecheck/lint through
code-quality, confirm imports resolve, and inspect rendered keyboard/focus and interaction states viadesign-validationwhen a preview is available. Report unverified rendering explicitly.
Update the snapshot
When the user asks to refresh the library: refetch https://ui.shadcn.com/r/index.json, then per component https://ui.shadcn.com/r/styles/new-york-v4/<name>.json, write each files[].content, regenerate MANIFEST.json and INDEX.md. Skip entries that 404 (dead upstream).
Validation
- The component was reused locally or copied from the inspected snapshot; imports/dependencies match the target project and existing user code was preserved.
- Applicable installed checks ran, rendered interaction checks are recorded or explicitly unverified, and no registry fetch was substituted for the local source without an explicit refresh request.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

