shadcn-ui-composition
Skill0 starsChanged 7 months agoApache-2.0View on GitHub
In this repository57 other files it gives its agents.
- ai-app-integrationSkill
- anti-llm-frontend-designSkill
- aspnet-core-web-developmentSkill
- async-python-patternsSkill
- browser-game-foundationsSkill
- browser-local-qaSkill
- build-mcp-server-sdk-v2Skill
- canva-design-opsSkill
- check-completionSkill
- cli-tool-creatorSkill
- cloudflare-agents-mcpSkill
- cloudflare-durable-objectsSkill
- cloudflare-workers-platformSkill
- deployment-preview-workflowsSkill
- docx-document-artifactsSkill
- durable-workflow-orchestrationSkill
- dynamic-og-imagesSkill
- eval-auditSkill
- evaluate-ragSkill
- figma-design-to-code-rulesSkill
- fine-tuningSkill
- frontend-product-builderSkill
- game-asset-pipeline-expansionSkill
- game-ui-playtestSkill
- generate-synthetic-dataSkill
- github-pr-ci-opsSkill
- gmail-inbox-opsSkill
- golden-datasetSkill
- huggingface-llm-trainerSkill
- javascript-monorepo-buildsSkill
- linear-issue-managementSkill
- media-generation-transcriptionSkill
- millrace-rs-contract-paritySkill
- minecraft-mod-qa-automationSkill
- notion-workspace-flowsSkill
- openai-docsSkill
- optimize-agentic-cliSkill
- pdf-artifact-workflowSkill
- phaser-2d-game-developmentSkill
- postgres-query-performanceSkill
- product-ui-polish-reviewSkill
- pydantic-v2-patternsSkill
- python-repo-refactoring-hygieneSkill
- rag-corpus-hygieneSkill
- react-next-performance-reviewSkill
- rust-best-practicesSkill
- skill-evaluation-harnessSkill
- tauri-desktopSkill
- tauri-mcp-cliSkill
- tauri-ptySkill
- tile-pixel-art-transitionsSkill
- train-sentence-transformersSkill
- typer-cli-patternsSkill
- using-dbt-for-analytics-engineeringSkill
- validate-evaluatorSkill
- visual-asset-pipelineSkill
- watchdog-file-watcher-patternsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 13 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Read project context first: package runner, alias, base, tailwind version, icon library, resolved paths, and installed components.
- Distinctive: line 20
If the registry is not named, ask which registry to use instead of guessing.
- Distinctive: line 21
Check whether the component already exists before you add or update it.
- Distinctive: line 22
Search registries, read the docs, and only then install or update through the project's runner.
- Distinctive: line 23
Prefer existing shadcn components and built-in variants before custom wrappers or raw markup.
- Distinctive: line 24
After install or update, review the changed files for alias paths, group wrappers, required titles, trigger wiring, and token overrides.
- Distinctive: line 27
Use the project's package runner for every shadcn CLI call.
- Very specific: line 28
Prefer existing components, built-in variants, and semantic tokens over custom div stacks or raw color classes.
- Very specific: line 29
Keep imports aligned with the repo alias.
- Very specific: line 30
Read base before deciding whether a trigger uses asChild or render.
- Very specific: line 31
Keep primitive structure intact: items stay inside their groups, tabs triggers stay inside TabsList, overlays carry their required titles, …
- Very specific: line 33
Use className for layout adjustments, not to override component colors or typography.
- Distinctive: line 34
Do not trust a screenshot alone.
- Distinctive: line 52
Search the registry for an existing fit before inventing custom UI.
- Distinctive: line 53
Read the docs for the candidate component or block.
- Distinctive: line 54
Add or update with the project's runner, using dry-run and diff when changing existing components.
- Distinctive: line 57
Prefer the narrowest fix that preserves the local component system.
- Distinctive: line 78
If the result only looks right, recheck the file-level composition instead of treating the screenshot as proof.
≈ “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 UI Composition
Purpose
Help agents work inside shadcn/ui projects without breaking the project's component graph, aliases, theme tokens, or primitive-specific composition. This is a guardrail, not a generic frontend design guide or a browser QA manual.
Use When
- the repo has
components.json, a registry, or an explicit shadcn/ui add, update, or debug task - you need to search, install, update, or repair shadcn components
- a copied component needs alias repair, token preservation, or composition cleanup
- the task is about component selection and structure, not broad UI invention
Do Not Use When
- the work is generic frontend design, layout, or branding without shadcn/ui
- the task is only browser QA or screenshot review
- another more specific skill already owns the broader workflow
- the request does not touch
components.json, a registry, or installed shadcn components
Quick Start
- Read project context first: package runner, alias, base, tailwind version, icon library, resolved paths, and installed components.
- If the registry is not named, ask which registry to use instead of guessing.
- Check whether the component already exists before you add or update it.
- Search registries, read the docs, and only then install or update through the project's runner.
- Prefer existing shadcn components and built-in variants before custom wrappers or raw markup.
- After install or update, review the changed files for alias paths, group wrappers, required titles, trigger wiring, and token overrides.
Operating Constraints
- Use the project's package runner for every shadcn CLI call; do not mix runners.
- Prefer existing components, built-in variants, and semantic tokens over custom
divstacks or raw color classes. - Keep imports aligned with the repo alias; rewrite third-party registry imports when they assume
@/components/ui/...or another default path. - Read
basebefore deciding whether a trigger usesasChildorrender. - Keep primitive structure intact: items stay inside their groups, tabs triggers stay inside
TabsList, overlays carry their required titles, and cards use their full composition when the surface needs them. - Preserve project theme tokens and local styling decisions unless the task explicitly changes them.
- Use
classNamefor layout adjustments, not to override component colors or typography. - Do not trust a screenshot alone; validate the installed files because import and composition mistakes can still render "fine" at first glance.
- Reject copy-pasted registry code that has not been reconciled with the repo.
Inputs This Skill Expects
- the current shadcn project context and installed components
- the user request and any named registry
- the repo alias, base, tailwind version, icon library, and package manager
- the changed files or registry output that need review
- any local theme tokens or component conventions that must be preserved
Output Contract
- a concise shadcn-specific plan or fix that names the component source, the project context used, and the reason for the choice
- the exact composition rule relied on when an overlay, menu, form, card, or tab is involved
- any alias or icon-library rewrites that were necessary
- the file-review result after add or update, including anything repaired before handoff
Procedure
- Inspect project context and installed components.
- Search the registry for an existing fit before inventing custom UI.
- Read the docs for the candidate component or block.
- Add or update with the project's runner, using dry-run and diff when changing existing components.
- Rewrite third-party imports to match the repo alias and icon library.
- Review the added files for missing groups, missing titles, wrong trigger wiring, broken imports, and token overrides.
- Prefer the narrowest fix that preserves the local component system.
Pitfalls And Gotchas
- Rejected trope: copy raw registry code and trust the screenshot.
- Better alternative: search, read docs, add or update, then review the changed files because shadcn mistakes often hide in imports and composition.
- Rejected trope: build dialogs, sheets, or drawers from generic wrappers.
- Better alternative: use the shadcn primitive and include its required title, even if it is visually hidden.
- Rejected trope: hardcode
@/components/ui/...imports or a default icon library in a repo that uses different aliases or icons. - Better alternative: rewrite imports to the repo's actual alias and icon library before you hand off.
- Rejected trope: replace a shadcn primitive with hand-rolled markup when the library already has the right component.
- Better alternative: compose the native component and use its built-in variant or slot API.
Progressive Disclosure
Keep SKILL.md compact and use it as the guardrail, not a full shadcn manual. Add support files only if repeated QA proves the skill needs them. Treat registry docs or examples as read-on-demand references, not blanket requirements. Do not widen into generic frontend design or browser QA.
Verification Pattern
- Confirm the project context was read before any add or update advice.
- Confirm the registry choice was explicit.
- Confirm installed files were checked after add or update, not just the rendered screen.
- Confirm changed files do not contain stale aliases, missing group wrappers, missing overlay titles, wrong
asChild/renderusage, raw color overrides, or icon-library mismatches. - Confirm at least one generic shortcut was rejected in favor of a shadcn-specific composition path.
- If the result only looks right, recheck the file-level composition instead of treating the screenshot as proof.
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.

