本文へ移動
cccskills
無料GitHub で公開

base-ui

Build accessible, composable UI with @base-ui/react primitives and project styling tokens. Use when creating or refining unstyled primitive components and behavior-heavy UI such as overlays, menus, popovers, dialogs, and form controls, or defining custom component APIs. Prefer the moai-library-shadcn skill when copied-in shadcn components are the primary implementation path.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md4.6 KB
  • reference-links.md5.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Base UI Primitives - Skill

Name: base-ui Purpose: Build accessible, composable UI with @base-ui/react primitives and project styling tokens. Use this when creating or refining unstyled primitive components and behavior-heavy UI.

Applies when: Building overlays, menus, form controls, or custom component APIs with Base UI. Do not use when: You are using copied-in shadcn components as the primary implementation path (use moai-library-shadcn first).

Rules

  • Docs first: Start from reference-links.md, then read the exact component page before writing code.
  • Behavior before styling: Preserve Base UI interaction and accessibility behavior before adding project styles.
  • Styling agnostic: Keep logic and visuals decoupled; prefer wrappers and class composition over forking behavior code.
  • Tailwind compatibility: Base UI examples target Tailwind v4. If a target package uses v3, convert unsupported utilities to v3-safe equivalents.
  • Composable APIs: Favor controlled/uncontrolled patterns, small props, and clear slots over monolithic components.
  • A11y is non-negotiable: Keep labels, descriptions, focus handling, keyboard support, and ARIA relationships intact.
  • Styled wrapper contracts: Preserve state-based className/style, render, refs, and cancelable events. Use packages/ui/lib/base-ui.ts to merge a Base UI class callback after receiving state; ordinary cn/CVA calls do not evaluate it.
  • Forms: Keep TanStack Form as the validation/submission owner. Base UI Field can supply accessible relationships without adding a second Form state system. Group labels name a group; they are not labels for Select/Combobox controls.

Workflow

  1. Confirm @base-ui/react is present in the target workspace package.json.
  2. Open the exact docs page from reference-links.md for the primitive you need.
  3. Implement behavior with Base UI primitives first, then layer project styles (cn, tokens, Tailwind).
  4. Convert any Tailwind v4-only example classes if the target workspace is still on Tailwind v3.
  5. Validate keyboard navigation, focus states, and screen-reader output.
  6. Run local quality gates (typecheck/lint/tests relevant to changed scope).

Checklists

Implementation checklist

  • Primitive choice matches the interaction model (dialog/menu/select/etc.)
  • Controlled/uncontrolled behavior is explicit and testable
  • Styling is layered without breaking interaction semantics
  • Tailwind classes are compatible with the target package version
  • Labels, descriptions, and focus behavior are preserved

Review checklist

  • No unnecessary re-implementation of behavior primitives
  • No prop explosion; component API stays composable
  • Keyboard-only interaction works end-to-end
  • Error/help text is correctly announced for form fields

Minimal examples

Wrapper-first composition

import { Field } from "@base-ui/react/field";

type FieldShellProps = {
  label: string;
  error?: string;
  children: React.ReactNode;
};

export function FieldShell({ label, error, children }: FieldShellProps) {
  return (
    <Field.Root invalid={Boolean(error)} className="grid gap-1.5">
      <Field.Label className="text-sm font-medium">{label}</Field.Label>
      {children}
      {error ? (
        <Field.Error match className="text-sm text-destructive">
          {error}
        </Field.Error>
      ) : null}
    </Field.Root>
  );
}

Use a Base UI-aware control such as the shared Input inside this shell. Core's existing TanStack adapter already handles the product form case; reuse it instead of adding another field wrapper. The static shadcn Field layout parts also support display-only content and should not be globally replaced with behavioral Field.

Tailwind v4 to v3 guardrail

When docs examples rely on Tailwind v4-only utilities,
replace them with equivalent v3-safe utilities before commit.

Common mistakes / pitfalls

  • Styling first, then patching broken interactions later
  • Copying examples without checking Tailwind version compatibility
  • Mixing multiple primitive systems in one component without intent
  • Building large wrapper components with too many boolean props

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Audit and fix accessibility in Core UI. Use when changing or reviewing buttons, links, forms, validation, dialogs, menus, tabs, tables, keyboard interactions, focus management, accessible names, announcements, contrast, touch targets, reduced motion, or WCAG/a11y behavior.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

Use when building any system where email content triggers actions — AI agent inboxes, automated support handlers, email-to-task pipelines, or any workflow processing untrusted inbound email. Always use this skill when the user wants to receive emails and act on them programmatically, even if they don't mention "agent" — the skill contains critical security patterns (sender allowlists, content filtering, sandboxed processing) that prevent untrusted email from controlling your system.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

anim

無料

Tasteful, subtle web UI animation following Emil Kowalski / animations.dev principles. Use when adding or reviewing interface motion — hover and press feedback, entrances and exits, modals, toasts, menus, loading and skeleton states, staggered reveals, page or view transitions — so motion stays refined and purposeful, not decorative. Covers CSS, Web Animations, and React timing/easing. Pair with the motion skill for motion/react API specifics.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

animate

無料

Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations. Only runs when explicitly invoked; it does not trigger on its own.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

Build animations for Expo and React Native only, using Reanimated, Gesture Handler, Expo Router, and expo-haptics. Use when the target runtime is an Expo or React Native app. Do not use it for Core Next.js web motion; use `animate` for web. Only runs when explicitly invoked; it does not trigger on its own.

日本語の概要は準備中です。原文の説明を表示しています。

Asymmetric-al/core3812026年10月12日 更新

Asymmetric-al のスキルをすべて見る

このスキルの問題を報告する