Agent skill

Author UI Primitives

by remix-run in remix-run/remix

Build idiomatic headless primitives in packages/ui for Remix.

MITAuto-check passedDevelopment

Install Author UI Primitives

skills CLI
$ npx skills add remix-run/remix --skill author-ui-primitives -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install remix-run/remix author-ui-primitives --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/remix-run/remix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/author-ui-primitives .claude/skills/author-ui-primitives && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
author-ui-primitives
GitHub stars
33k
Token cost
~2.5k tokens
SKILL.md length
1,053 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
MIT

At a glance

Build idiomatic headless primitives in packages/ui for Remix.

  • Revising accessible UI behavior
  • SKILL.md covers Source Layout, Layering, Public API Shape and Component Runtime, plus 8 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Required structural styles

What it does

Author UI Primitives is an agent skill from remix-run/remix. Build idiomatic headless primitives in packages/ui for Remix. Use when authoring or revising accessible UI behavior, required structural styles, public primitive events, or shared primitive utilities under packages/ui/src.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with Remix. The repository describes itself as: The fully-stacked web framework. The licence is MIT.

When your agent uses it

  • Revising accessible UI behavior
  • Required structural styles
  • Public primitive events
  • Shared primitive utilities under packages/ui/src

Example prompts

  • “/author-ui-primitives”

What it can do on your machine

Read from SKILL.md and the folder at commit abe67bc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Author UI Primitives loads about 2.5k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 1,053 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from remix-run/remix at commit abe67bc, republished under its MIT licence (© remix-run). 1,053 words, ~2,514 tokens.

Download SKILL.mdSave it as .claude/skills/author-ui-primitives/SKILL.md (or your agent's skills folder).
name
author-ui-primitives
description
Build idiomatic headless primitives in `packages/ui` for Remix. Use when authoring or revising accessible UI behavior, required structural styles, public primitive events, or shared primitive utilities under `packages/ui/src`.

Author UI Primitives

Use this skill when building or revising packages/ui primitive APIs. The public @remix-run/ui/* entries are sourced from packages/ui/src/* and are not available through the remix package.

Source Layout

Each public primitive has a top-level packages/ui/src/<name>.ts or packages/ui/src/<name>.tsx entry.

Common files:

  • <name>.ts or <name>.tsx: the public primitive entry and implementation.
  • <name>/README.md: usage docs for the primitive.
  • <name>.test.ts or <name>.test.tsx: primitive tests.
  • demos/<name>.demo.tsx: demo cases for the shared UI demo app.
  • lib/*: shared implementation-only behavior used by multiple primitives.

Current examples:

  • low-level behavior modules: anchor, popover, listbox
  • composed behavior modules: combobox, menu, select
  • self-contained controls: accordion, tabs, toggle

When adding or moving public entries, update both exports and publishConfig.exports in packages/ui/package.json. Public entries use the flat ./<name> path.

Layering

Choose the smallest layer that fits the job.

  • A headless primitive owns behavior, ARIA, registration, keyboard handling, refs, and public events. It exports named providers and mixins.
  • A shared primitive utility belongs in src/lib only when multiple primitives already need it.

Good composition flows downward:

  • select composes popover and listbox.
  • combobox composes popover and listbox, then owns input text, filtering, and popup timing.
  • menu composes popover, outside interactions, typeahead, and hover aim.
  • accordion, tabs, and toggle keep their own primitive contexts.

Public API Shape

Primitive modules export named bindings, and callers namespace them at import time:

tsx
import * as select from '@remix-run/ui/select'

function StatusSelect() {
  return () => (
    <select.Context defaultLabel="Status">
      <button type="button" mix={select.trigger()} />
      <div mix={select.popover()}>
        <div mix={select.list()}>
          <div mix={select.option({ label: 'Open', value: 'open' })}>Open</div>
        </div>
      </div>
    </select.Context>
  )
}

Use Context, ItemContext, or GroupContext for providers, and short role names for mixins such as trigger, popover, list, option, hiddenInput, root, item, content, panel, parent, or control.

Do not add a public namespace object just to group exports. The established pattern is named exports plus import * as name.

README examples should import primitives from @remix-run/ui/... and component APIs from remix/component. Source files in this package import other primitive APIs from @remix-run/ui/... and component APIs from @remix-run/component.

Component Runtime

Primitive components use the current Remix component two-phase shape:

tsx
export function Component(handle: Handle<ComponentProps>): () => RemixNode {
  let hasInitialized = false
  let value: string | null = null

  return () => {
    if (!hasInitialized) {
      value = handle.props.defaultValue ?? null
      hasInitialized = true
    }

    return handle.props.children
  }
}

Rules:

  • Read props from the stable handle.props object in setup and render code.
  • Keep component lifetime state in setup scope and schedule renders with handle.update().
  • Initialize uncontrolled state lazily from handle.props during the first render when defaults depend on current props or registered children.
  • Await handle.update() before DOM work that depends on the next rendered tree; check the returned signal before continuing async flows.
  • Use handle.queueTask() for post-render ref callbacks, registration checks, popup show/hide work, CSS-transition follow-up, and public ref delivery.

Context Providers

Providers scope one behavior instance. Prefer plain context objects with getters and methods over controller classes.

Use context for:

  • current prop-backed state through getters
  • registered descendants, root nodes, trigger nodes, surfaces, and lists
  • methods such as open(), close(), navigate(), select(), highlight(), toggleItem(), or setInputText()
  • stable public refs backed by getters and methods

Provider patterns:

  • Call handle.context.set(...) once in setup scope when the object can stay stable.
  • Reset render-scoped registries in the render function when children re-register each render.
  • Use a "next registry" plus a queued comparison when child registration changes should trigger a follow-up render.
  • Use nested item providers when one item needs per-item context, like AccordionItemProvider.
  • Return handle.props.children unless the provider must compose lower-level providers, like SelectProvider returning listbox.Context.

Do not add event emitters to context just to wake descendants. Normal component updates, getters, and context methods are the default coordination layer.

Mixins

Mixins adapt one host element to one behavior role.

Use createMixin with explicit host, argument, and prop types:

tsx
const triggerMixin = createMixin<HTMLButtonElement, [], ElementProps>((handle) => {
  let context = handle.context.get(SelectProvider)

  return (props) => [
    attrs({
      'aria-haspopup': 'listbox',
      'aria-expanded': context.isExpanded ? 'true' : 'false',
      disabled: context.disabled ? true : props.disabled,
    }),
    ref((node: HTMLButtonElement, signal) => {
      context.registerTrigger(node)
      signal.addEventListener('abort', () => {
        context.unregisterTrigger(node)
      })
    }),
    on('click', () => {
      context.open()
    }),
  ]
})

Mixin rules:

  • Own one role and one host element.
  • Derive ARIA, data-*, hidden, disabled, tabIndex, and ids from context getters.
  • Normalize DOM input locally, then call context methods.
  • Keep role-specific keyboard parsing in the role mixin.
  • Register host nodes with ref(...), handle.queueTask(...), or an insert listener, and clean up registrations with the abort signal when needed.
  • For mixins that support both native inputs and custom elements, use hostType, createElement(...), or renderMixinElement(...) to rewrite props safely.

If a mixin accepts optional options and also receives host props, follow the existing options = {}, props = options as ElementProps pattern when needed to distinguish authored options from host props.

Show full SKILL.md (401 more words)Show less

DOM And Async Work

Keep imperative DOM work near the owner of the relevant ref.

  • popover.surface() owns showPopover(), hidePopover(), outside click, focus restoration, anchoring, and scroll locking.
  • select.popover() and combobox.popover() own popup min-width syncing because they know their trigger/input refs.
  • listbox owns option scrolling and selection flash.
  • menu owns branch closing, focus transfer, hover aim, and close animation sequencing.

When waiting for transitions or timers, use existing utilities such as waitForCssTransition(...), wait(...), and flashAttribute(...), then check the component signal before dispatching events or updating more state.

Public Events

Use bubbling DOM events for public primitive contracts, not for internal coordination.

Established public event pattern:

  • define a const EVENT_NAME = 'rmx:<primitive>-<action>' as const
  • declare the event on HTMLElementEventMap
  • export an event class with readonly payload fields
  • dispatch from the meaningful host/root node
  • export an on<Primitive><Action>(handler) mixin that wraps on(...)
  • also support callback props such as onValueChange when the primitive is stateful

Examples include SelectChangeEvent, ComboboxChangeEvent, MenuSelectEvent, AccordionChangeEvent, TabsChangeEvent, and ToggleChangeEvent.

Styling

Primitives may use css(...) only for structural styles required for correct positioning, visibility, scrolling, or interaction. Typography, colours, spacing, borders, shadows, radii, decorative icons, and themes belong to the consumer.

Testing And Docs

For behavior changes, test the primitive directly.

Add or update:

  • <name>.test.tsx for provider, mixin, keyboard, focus, registration, and event behavior
  • browser tests only when DOM behavior needs a real browser
  • demos under packages/ui/src/demos
  • <name>/README.md examples that import from @remix-run/ui/...
  • package change files when published behavior changes

Checklist

Before finishing a packages/ui primitive change, verify:

  • the public entry is packages/ui/src/<name>.ts or packages/ui/src/<name>.tsx and exports match packages/ui/package.json
  • implementation-only shared helpers live under packages/ui/src/lib
  • primitives use named exports and are consumed with namespace imports
  • context is a plain getter/method object, not a controller or emitter layer
  • host refs are registered and unregistered with the owning mixin/component
  • controlled and uncontrolled state paths are both covered when the existing contract supports them
  • public events use the established event class plus on... mixin pattern
  • structural styles are limited to what behavior requires
  • docs, demos, tests, and change files match the public surface touched

Anti-Patterns

Avoid:

  • adding public APIs under src/lib
  • exporting a namespace object when named exports already fit
  • re-implementing popover, listbox, typeahead, outside-click, or keyboard helpers inside a higher-level primitive
  • duplicating selected, active, open, or input state across layers without a clear owner
  • using DOM events or context emitters for internal re-render signaling
  • placing one-off helpers in src/lib before a second primitive needs them

© remix-run, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/author-ui-primitives of remix-run/remix.

Open the folder on GitHubat commit abe67bc

Compare with similar skills

Author UI Primitives next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Author UI Primitives compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Author UI Primitives this skillremix-run/remix33k—~2.5kAutomated safety check: PassMIT
Releaseseasonedcc/remix-forms514—~1.3kAutomated safety check: PassMIT
Skill Managerseasonedcc/remix-forms514—~6.1kAutomated safety check: PassMIT
Safe Element Comparisonseasonedcc/remix-forms514—~1.8kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k58 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT

Similar skills

  • Release

    seasonedcc/remix-forms

    Release a new version of the remix-forms npm package. An agent skill from seasonedcc/remix-forms.

    514 GitHub stars~1.3k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed
  • Skill Manager

    seasonedcc/remix-forms

    Create, manage, and debug Claude Code Agent Skills. An agent skill from seasonedcc/remix-forms.

    514 GitHub stars~6.1k tokensUpdated 5 mo ago
    Agent WorkflowsAuto-check passed
  • Safe Element Comparison

    seasonedcc/remix-forms

    Maintain element type comparison safety in remix-forms. An agent skill from seasonedcc/remix-forms.

    514 GitHub stars~1.8k tokensUpdated 5 mo ago
    Frontend & DesignAuto-check passed
  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 58 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed

More from remix-run/remix

All 19 skills in this repo
  • Supersede PR

    remix-run/remix

    Safely replace one GitHub pull request with another. An agent skill from remix-run/remix.

    33k GitHub stars~456 tokensUpdated today
    Auto-check passed
  • Add Package

    remix-run/remix

    Create or align a package in the Remix monorepo to match existing package conventions.

    33k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Fix Issue

    remix-run/remix

    Fix a reported issue in Remix from a GitHub issue. An agent skill from remix-run/remix.

    33k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Make Demo

    remix-run/remix

    Create or revise demos in the Remix repository. An agent skill from remix-run/remix.

    33k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Make PR

    remix-run/remix

    Create GitHub pull requests with clear, reviewer-friendly descriptions.

    33k GitHub stars~847 tokensUpdated today
    Auto-check passed
  • Make Tracking Issue

    remix-run/remix

    Create or revise a GitHub tracking issue for a Remix change, including the target outcome, implementor context, a concise checkbox plan, compatibility concerns, and required gates.

    33k GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Author UI Primitives

What does Author UI Primitives do?

Build idiomatic headless primitives in packages/ui for Remix. Author UI Primitives is an agent skill from remix-run/remix. Build idiomatic headless primitives in packages/ui for Remix.

When should I use Author UI Primitives?

Author UI Primitives fits situations like: revising accessible UI behavior; required structural styles; public primitive events; shared primitive utilities under packages/ui/src.

How do I install Author UI Primitives in Claude Code?

Run `npx skills add remix-run/remix --skill author-ui-primitives -a claude-code`. Or copy the skill folder (.agents/skills/author-ui-primitives in remix-run/remix) into .claude/skills/author-ui-primitives in your project. Claude Code loads it when a task matches its description.

How do I install Author UI Primitives in Codex?

Run `npx skills add remix-run/remix --skill author-ui-primitives -a codex`. Or copy the skill folder (.agents/skills/author-ui-primitives in remix-run/remix) into .agents/skills/author-ui-primitives in your project. Codex loads it when a task matches its description.

Can I use Author UI Primitives in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add remix-run/remix --skill author-ui-primitives -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/author-ui-primitives, .gemini/skills/author-ui-primitives, .github/skills/author-ui-primitives and .opencode/skills/author-ui-primitives in your project.

What does Author UI Primitives need to run?

SKILL.md names no scripts, command-line tools or credentials: Author UI Primitives is instructions for the agent only.

Does Author UI Primitives access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Author UI Primitives safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Author UI Primitives use?

Author UI Primitives is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Author UI Primitives use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Author UI Primitives?

Skills that share tags, products or a category with Author UI Primitives: Release (seasonedcc/remix-forms, 514 stars), Skill Manager (seasonedcc/remix-forms, 514 stars), Safe Element Comparison (seasonedcc/remix-forms, 514 stars) and Vercel Composition Patterns (supabase/supabase, 111k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Author UI Primitives?

remix-run (a GitHub organization) maintains it in remix-run/remix, which has 33,404 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 9, 2026.

Source: remix-run/remix on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.