About starwind-ui
starwind-ui is a skill for building interfaces with Starwind UI v3 in Astro and React projects. It guides component selection, installation, composition, customization, and validation across styled source, Primitive adapters, and Runtime layers.
Key features
- 01Guides styled, Primitive, and Runtime layers
- 02Selects components for interface needs
- 03Covers Astro and React conventions
- 04Explains safe updates and migration
- 05Recommends docs and source checks
Use cases
- 01Adding Starwind UI components to a project
- 02Customizing installed component source
- 03Migrating a pre-Runtime Astro project
MCP support
The skill recommends Starwind MCP as a preferred source for current component documentation when available. It does not describe an MCP server implementation.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ starwind-ui/ skills --skill starwind-uiAfter installing, type/starwind-uiin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
cli.mdcustomization.mdlayers.mdmcp.mdshadcn-migration.mdv3-migration.mdagents/openai.ymlrules/composition.mdforms.mdicons.mdstyling.mdDetails
From the project READMEStarwind UI v3
Starwind UI is an Astro-first, framework-portable system for Astro and React. Its normal product surface is editable styled source installed into the application. Primitive adapters and the framework-neutral Runtime are lower layers for projects that need more control.
Use starwind@latest. Current requirements are Node 22.12+, Tailwind CSS 4, Astro 5+, or React and
React DOM 18+. Vue and Svelte code in the upstream repository is private verification output, not a
public package or CLI target.
Run CLI commands from the project root with the project's runner. Examples use
npx starwind@latest; substitutepnpm dlx,pnpx, oryarn dlxwhen local files establish that package manager.
Establish Project Context
Read these before changing code:
package.json,packageManager, and lockfiles: framework, package runner, versions, scripts.starwind.config.json: config generation, primary framework, registry, component/Primitive destinations, installed records, Tailwind CSS, and Pro settings.- Framework config:
astro.config.*, Vite, Next.js, TanStack Start, or React Router files. - The active Starwind CSS file named by config: tokens,
@theme inline,:root, and.dark. - Configured component directories and local
index.ts/index.tsxexports: installed source and exact public parts. - Nearby imports and tests: aliases, icon system, syntax, state, and event conventions.
Starwind UI v3 still writes a config with schema config-schema.v2.json and version: 2. Product
major version and config format version are different; do not "upgrade" the config number by hand.
Choose The Right Layer
- Styled component first. Use
starwind addfor ready-to-render, editable source with Starwind variants and composition. - Primitive adapter when anatomy must be owned. Import
@starwind-ui/astro/<name>or@starwind-ui/react/<name>, or vendor compile-ready adapter source withstarwind primitives addwhen the project must edit the adapter itself. - Runtime for raw DOM or adapter work. Use
@starwind-ui/runtime/<name>orinitStarwindonly for plain HTML, custom adapters, or direct controller integration.
Read layers.md whenever the task uses package Primitives, vendored Primitive source, Runtime controllers, raw HTML, or edits inside a Runtime-backed component.
Core Rules
- Check installed source, current docs, MCP, or registry metadata before inventing UI.
- Compose existing components and documented parts before writing lookalike markup.
- Use built-in variants, semantic tokens, and documented state selectors before custom internals.
- Preserve
data-slotas public part identity anddata-sw-*as Runtime discovery hooks when editing installed component source. - Match the file's framework: Astro uses
class,for, static initial-state props, and browser scripts; React usesclassName,htmlFor, React handlers, and controlled props when appropriate. - Read local exports and current component docs before assuming parts, props, events, or
asChild. - Treat styled source as application-owned; inspect diffs before replacing customized files.
Critical Rules
These guardrails are repeated here because the root skill is the only file guaranteed to load:
- Styling: use built-in variants and semantic tokens before raw palette utilities or long
appearance overrides. Use
gap-*,size-*, andtruncate; change global light/dark colors in the active Starwind CSS variables. - Forms: preserve native
name, submit, reset, required, disabled, and validation behavior. Astro usesfor; React useshtmlFor. Pair invalid state with associated error text. - Composition: keep items inside their documented group, give Dialog/Sheet/Alert Dialog a title,
put
TabsTriggerinsideTabsList, and pairAvatarImagewithAvatarFallback. - Loading: Button has no assumed
isLoadingorisPendingprop. ComposeSpinner,disabled, andaria-busyafter checking the installed API. - Icons: reuse the project's icon system and name every icon-only control. Do not transfer
shadcn's
data-iconconvention unless local Starwind source documents it. - Updates: preview customized styled or vendored source with
--dry-run,--diff, or--viewbefore accepting replacement.
Key shapes:
<Field name="email">
<FieldLabel>Email</FieldLabel>
<FieldControl type="email" required />
<FieldError match="valueMissing">Enter an email address.</FieldError>
</Field>
<Button disabled aria-busy="true"><Spinner /> Saving...</Button>
<DialogContent>
<DialogHeader><DialogTitle class="sr-only">Edit profile</DialogTitle></DialogHeader>
<!-- content -->
</DialogContent>
Focused Rules
- rules/composition.md: component nesting, overlays, Toast, standalone Combobox, Card, Tabs, Avatar, and loading composition.
- rules/forms.md: native form participation, Field/Form, labels, defaults, validation, and Input Group.
- rules/styling.md: semantic tokens, variants, spacing, state selectors, and Runtime hook boundaries.
- rules/icons.md: framework-correct icon imports and accessible icon buttons.
- customization.md: theming, dark mode initialization, variables, and safe component customization.
Load only the references that match the current task.
Component Selection
| Need | Start with |
|---|---|
| Action | button; button-group for related actions |
| Form structure | form, field, fieldset, label |
| Text and choice input | input, textarea, input-group, checkbox, checkbox-group, radio-group, switch, slider, input-otp |
| Fixed choice list | select or native-select |
| Searchable choice | standalone combobox; V3 has no SelectSearch |
| Navigation | navigation-menu, sidebar, breadcrumb, tabs, pagination |
| Overlays | dialog, sheet, alert-dialog, popover, dropdown, context-menu, hover-card, tooltip |
| Feedback | toast, alert, progress, skeleton, spinner |
| Data and content | table, card, badge, avatar, item, kbd, prose |
| Rich input/media | color-picker, dropzone, image, video, carousel |
| Disclosure and toggles | accordion, collapsible, toggle, toggle-group |
Confirm availability for the configured framework before installing. The styled image component
is Astro-only.
Current Docs And Commands
For exact APIs, read current docs or installed source:
npx starwind@latest docs button dialog combobox --json
npx starwind@latest search combobox --json
Prefer Starwind MCP when available, then per-page Markdown, llms.txt, llms-full.txt, and
ai-manifest.json. See mcp.md for source priority and fallbacks.
Common V3 commands:
npx starwind@latest init --framework astro
npx starwind@latest init --framework react
npx starwind@latest add button dialog combobox
npx starwind@latest update button --dry-run
npx starwind@latest update button --diff
npx starwind@latest primitives add button --framework react
npx starwind@latest primitives list --framework all
npx starwind@latest migrate
Use only flags documented in cli.md.
Working Sequence
- Establish framework, package runner, current config shape, destinations, installed records, and local validation commands.
- Choose styled, Primitive, or Runtime from the layer ladder.
- Confirm the component and API from installed source plus current docs.
- Install missing source with the exact framework and destination intended by the config.
- Read every added or replaced file before wiring it into the application.
- Compose through local exports and framework syntax; preserve Runtime hooks and native semantics.
- Run the narrowest relevant format, typecheck, build, tests, and browser checks.
The task is complete when every import resolves from the intended framework/destination, generated or edited source matches current documented contracts, and relevant validation passes or each remaining failure is reported.
Updates And Migration
update can replace locally edited styled or vendored Primitive source. Preview first:
npx starwind@latest update button --dry-run
npx starwind@latest update button --diff
npx starwind@latest update button --view
Use --all or --overwrite only when the requested scope is explicit and local changes are
recoverable.
For a pre-Runtime Astro project, read v3-migration.md before running
starwind migrate. Migration success means the report, remaining legacy entries, application API
changes, and behavioral checks are all accounted for—not merely that the command exited.
References
- cli.md: complete V3 CLI surface and ownership cautions
- layers.md: styled, Primitive, vendored source, and Runtime boundaries
- v3-migration.md: V2 Astro to V3 Runtime migration runbook
- customization.md: tokens, dark mode, and safe customization
- shadcn-migration.md: shadcn-style theme token mapping only
- mcp.md: live Starwind tools and AI-readable docs