Agent skill Frontend
coss UI
Build or refine reusable components for a web interface.
Install the skill
Run the command from your project root with Node.js and npm.
npx skills@latest add cosscom/ui --skill coss --agent claude-code --yesCheck this file in your project.claude/skills/coss/SKILL.md
Other ways to install
Choose an assistant interactively
npx skills@latest add cosscom/ui --skill cossSelect your assistant and choose the project installation scope.
Official instructions
The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use a React project with Tailwind CSS v4. Check the existing coss components and @base-ui/react dependency. The component registry uses a separate shadcn CLI runner.
View operation manualWhat this skill helps with
- Build or refine reusable components for a web interface.
Good for
- Component implementation
- Primitive system
- coss styled components compose Base UI APIs.
- Registry scope
- Preview the specific component, the added dependencies, existing-file overwrites, and any CSS changes.
- Use cases
- Items-first Select and ToastProvider with toastManager.
- Skill name
coss- Repository
cosscom/ui
Check the registry diff before adding a component
A broad setup command
Initialize coss and replace anything needed for this one select.
Theme setup and component imports can change shared CSS, font setup, dependencies, and files used elsewhere.
A scoped addition with working behavior
- Identify the existing UI files and the state for the requested action.
- Preview only the needed registry component.
- Review and approve shared files, configuration, or dependency changes before applying.
coss UI operation manual
Use the official coss skill to wire one server-rendered Select or migrate one save notification to Base UI toasts. Replace the bracketed details with your project paths.
Reuse an existing Select when present, then check the initial label and form submission through hydration.
Check the target app and preview only Select
Find existing imports and inspect the effects of adding the specific registry item.
Prompt · Step 1Use the installed coss skill to prepare [Select field and React app path]. Inspect the existing Select, package manifest, CSS entry, aliases, and components.json. Confirm Tailwind v4, the Base UI dependency, and which registry the project already uses. If Select is missing in a configured project, use the project’s runner to preview add @coss/select --dry-run. List exact files, dependencies, lockfile effects, and any CSS changes. If the application needs initialization, a registry entry, a theme or font change, dependency changes, or an overwrite, obtain approval for that specific mutation before applying it. Avoid a full coss install for this one field.npx shadcn@latest add @coss/select --dry-runCompose the field with coss parts
Provide options before hydration and render the trigger, value, popup, and options using their supported APIs.
- The selected label is correct on initial render and after hydration.
- The accessible label and submitted value match the field contract.
Prompt · Step 2Use coss and its references/primitives/select.md to implement [confirmed Select field] in [route or component]. Reuse the existing styled exports. Give Select the items before hydration, compose SelectTrigger, SelectValue, SelectPopup, and SelectItem, and use the placeholder on SelectValue. If selected values are objects, use the documented itemToStringValue where a stable form string is needed. For a form, preserve the existing label, error, disabled state, and submitted value. Verify the initial label before and after hydration, keyboard selection and Escape, and the actual form result using test data.
Find the correct coss primitive or registry step
Use the current installed reference for the exact component before applying any changes.
The registry might overwrite a shared fileRegistry preview
- Command or reference
references/cli.md · add preview mode- Examples
- Run --dry-run for a single item, then inspect --diff or --view if supported.
The selected label changes after hydrationSelect
- Command or reference
references/primitives/select.md- Examples
- Use items-first and verify the initial selected label and stable submitted value.
Code assumes Sonner APIsToasts
- Command or reference
references/primitives/toast.md- Examples
- Find the actual coss provider and use toastManager.add scoped to the requested action.
coss UI troubleshooting
Does installing the coss skill add components to my app?
The skills command installs instructions and references. Preview and confirm the separate component registry operation when you need a missing component.
Why should I start with a dry run?
The tested coss Toast preview proposed an overwrite of an existing button, two new files, CSS variables, and @base-ui/react. Your project’s exact plan depends on which files and packages it already has.
Can I keep Radix or Sonner examples unchanged?
Use the current coss component references. They document Base UI composition for Select and the coss provider and toastManager for notifications.