SKILL.md--- name: coss description: Helps implement coss UI components correctly. Use when building UIs with coss primitives (buttons, dialogs, selects, forms, menus, tabs, inputs, toasts, etc.), migrating from shadcn/Radix to coss/Base UI, composing trigger-based overlays, or troubleshooting coss component behavior. Covers imports, accessibility, Tailwind styling, and common pitfalls. compatibility: Requires Tailwind CSS v4 and @base-ui/react. Designed for React projects using the coss component registry. license: MIT metadata: author: cosscom --- # coss ui coss ui is a component library built on Base UI with a shadcn-like developer experience plus a large particle catalog. ## What this skill is for Use this skill to: - pick the right coss primitive(s) for a UI task - write correct coss usage code (imports, composition, props) - avoid common migration mistakes from shadcn/Radix assumptions - reference particle examples to produce practical, production-like patterns ## Source of truth - coss components docs: `apps/ui/content/docs/components/*.mdx` - `https://github.com/cosscom/coss/tree/main/apps/ui/content/docs/components` - coss particle examples: `apps/ui/registry/default/particles/p-*.tsx` - `https://github.com/cosscom/coss/tree/main/apps/ui/registry/default/particles` - coss particles catalog: `https://coss.com/ui/particles` - docs map for agents: `https://coss.com/ui/llms.txt` ## Out of scope - Maintaining coss monorepo internals/build pipelines. - Editing registry internals unless explicitly requested. ## Principles for agent output 1. Use existing primitives and particles first before inventing custom markup. 2. Prefer composition over custom behavior reimplementation. 3. Follow coss naming and APIs from docs exactly. 4. Keep examples accessible and production-realistic. 5. Prefer concise code that mirrors coss docs/particles conventions. 6. Assume Tailwind CSS v4 conventions in coss examples and setup guidance. ## Critical usage rules Always apply before returning coss code: - Do not invent coss APIs. Verify against component docs first. - For trigger-based primitives (Dialog, Menu, Select, Popover, Tooltip), follow each primitive's documented trigger/content hierarchy and composition API; do not mix patterns across components. - Preserve accessibility labels and error semantics. - Consult primitive-specific guides for component invariants and edge cases. - For manual install guidance, include all required dependencies and local component files referenced by imports. - Prefer styled coss exports first; use `*Primitive` exports only when custom composition/styling requires it. Rule references (read on demand when the task touches these areas): - `./references/rules/styling.md` — Tailwind tokens, icon conventions, data-slot selectors - `./references/rules/forms.md` — Field composition, validation, input patterns - `./references/rules/composition.md`