Skills

Give your AI assistant deep knowledge of Cubix components, patterns, and best practices - so generated UI matches your project on the first try.

Skills turn Cubix from copy-paste source into project-aware context for assistants.

Once installed, the agent knows how to find, install, compose, and customize components using the correct APIs, tokens, and primitive base for your app. For example, you can ask:

  • “Add a login form with email and password fields using Cubix Field and Input.”
  • “Create a settings page with a profile form and a destructive delete dialog.”
  • “Build a dashboard shell with Sidebar, stats cards, and a Data Table.”
  • “Add an agent chat layout with Conversation, Thinking, Tool Call, and Prompt Input.”
  • “Install button and dialog with --base radix and match our existing tokens.”

The skill reads your project cubix.json and supplies framework details, aliases, installed components, icon library, and base (base, radix, or aria) so imports and composition stay correct.

Install

Install the Cubix skill into your project with the Skills CLI. The source lives in skills/cubix/SKILL.md.

pnpm dlx skills add aminebdali1992/cubix-design-system

After install, assistants that support Agent Skills load Cubix guidance automatically when you work on UI, registry items, or CLI flows. Pair this with Installation so cubix.json already exists in the repo, and with MCP when you want live registry tools over HTTP.

What's included

The skill equips the assistant with the following knowledge:

  • Project context

    On relevant tasks, the skill resolves configuration from cubix.json and cubix-ui info: framework, Tailwind CSS entry, aliases, base library, icon library, and where components land under components/cubix.

  • CLI commands

    Full reference for init, add, view, search, build, and info - including --base, overwrite, and dry-run workflows. See the CLI docs for the human-readable reference.

  • Theming and customization

    How semantic tokens, oklch palettes, dark mode, radius scale, and variants work. Assistants are steered to Cubix tokens instead of hardcoded colors. Details live under Theming.

  • Bases and composition

    Cubix keeps one visual API across Base UI, React Aria, and Radix UI. The skill teaches named exports, data-slot, cn(), and how asChild maps to each primitive compose API.

  • Registry authoring

    How to shape registry.json items, dependencies, and public/r/*.json output from cubix-ui build. More in Registry.

  • Agent surfaces

    Guidance for Cubix AI building blocks - Conversation, Prompt Input, Thinking, Tool Call, Streaming Text, and related patterns - so chat and agent UIs follow the same ownership model as the rest of the catalog.

cubix.json
{
  "style": "cubix",
  "base": "base",
  "rsc": true,
  "tsx": true,
  "tailwind": {
    "css": "app/globals.css",
    "cssVariables": true
  },
  "iconLibrary": "lucide",
  "aliases": {
    "ui": "@/components/cubix",
    "utils": "@/lib/utils"
  }
}

How it works

  1. Project detection - the assistant loads the skill when the workspace has a cubix.json, imports from components/cubix, or the task mentions Cubix.
  2. Context injection - it reads project config (and prefers cubix-ui info --json when available) so aliases, base, and paths stay accurate.
  3. Pattern enforcement - the assistant follows Cubix composition rules: semantic tokens, data-slot, accessible states, and base-specific APIs without inventing a parallel design system.
  4. Component discovery - before generating UI, it uses cubix-ui search, cubix-ui view, or the docs catalog under Components to pick real registry items.

Tips for better results

  • Name the base when it matters: --base aria or --base radix.
  • Point at existing screens or tokens so the assistant extends Cubix instead of introducing one-off styles.
  • Ask it to run cubix-ui add for missing components rather than pasting incomplete stubs.
  • For long-form or chat copy, pair Skills with Typeset presets so prose rhythm stays consistent.

Next steps