compound-ui
Skill1 starsChanged 3 months agoMITView on GitHub
Build, review, or refactor React UI components into shadcn-style compound components. Use when creating composable component APIs, splitting prop-heavy components into named parts, wrapping Radix/Base UI primitives, adding asChild/Slot behavior, designing data-slot styling hooks, or enforcing accessible source-owned component primitives.
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- copywritingSkill
- create-durable-planSkill
- d3Skill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- heyapiSkill
- impitSkill
- intlayerSkill
- jsdocSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- permixSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- simplify-layoutSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- tailwind-variantsSkill
- takumiSkill
- tanstack-chartsSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill to create source-owned React components that compose like shadcn/ui: small named parts, explicit children, accessible …
- Distinctive: line 13
Read nearby project guidance, existing component files, package versions, styling utilities, primitive libraries, and test/story …
- Distinctive: line 14
Prefer the project's existing export, file, styling, icon, and accessibility patterns.
- Distinctive: line 16
Use references/source-map.md for current source links and captured guidance.
- Distinctive: line 17
Prefer current React, shadcn/ui, Radix UI, and local primitive docs before changing framework-sensitive code.
- Distinctive: line 26
Verify typecheck, lint, story/browser behavior, keyboard support, focus, accessible names, and responsive states when relevant.
- Very specific: line 30
Prefer compound parts and children over prop-heavy wrapper APIs.
- Very specific: line 31
Keep acceptable props narrow: DOM props, className, children, asChild, controlled state, event handlers, accessibility props, and …
- Distinctive: line 32
Use existing accessible primitives for complex behavior such as dialogs, menus, popovers, tabs, selects, tooltips, comboboxes, accordions, …
- Very specific: line 34
Add data-slot to every exported part, plus state/variant data attributes when useful for styling and tests.
- Distinctive: line 35
Keep state local unless parts must coordinate.
- Very specific: line 36
Add "use client" only when the component uses hooks, events, browser APIs, or client-only primitives.
- Distinctive: line 37
Do not hide required accessibility behind convenience defaults that callers cannot inspect or override.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Compound UI
Use this skill to create source-owned React components that compose like shadcn/ui: small named parts, explicit children, accessible primitives, class merging, and stable styling hooks.
Workflow
- Inspect the local UI stack before writing code:
- Read nearby project guidance, existing component files, package versions, styling utilities, primitive libraries, and test/story conventions.
- Prefer the project's existing export, file, styling, icon, and accessibility patterns.
- Refresh docs when exact APIs matter:
- Use references/source-map.md for current source links and captured guidance.
- Prefer current React, shadcn/ui, Radix UI, and local primitive docs before changing framework-sensitive code.
- Design the public API before implementation:
- Read references/component-contract.md.
- Define the root component, named subcomponents, legal nesting, controlled/uncontrolled state, and required accessibility parts.
- Implement in the shadcn style:
- Read references/authoring-patterns.md.
- Export source-owned named parts with
data-slot,classNamemerging, prop/ref pass-through, and minimal behavior props.
- Review before finishing:
- Use references/review-checklist.md.
- Verify typecheck, lint, story/browser behavior, keyboard support, focus, accessible names, and responsive states when relevant.
Enforcement Rules
- Prefer compound parts and
childrenover prop-heavy wrapper APIs. Do not createtitle,description,actions,icon,isLoading, or layout props when named subcomponents express the same structure better. - Keep acceptable props narrow: DOM props,
className,children,asChild, controlled state, event handlers, accessibility props, and intentional variants such asvariantorsize. - Use existing accessible primitives for complex behavior such as dialogs, menus, popovers, tabs, selects, tooltips, comboboxes, accordions, and roving focus.
- Preserve primitive contracts. Custom slotted children must spread incoming props and support refs according to the project's React version.
- Add
data-slotto every exported part, plus state/variant data attributes when useful for styling and tests. - Keep state local unless parts must coordinate. Use scoped context only for compound coordination and fail loudly when a required part is used outside its root.
- Add
"use client"only when the component uses hooks, events, browser APIs, or client-only primitives. - Do not hide required accessibility behind convenience defaults that callers cannot inspect or override.
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.

