mcpbeat Sign in

Mosaic Agent Skill

>- `useRecipe` / slots / variants), or building a flow — authoring a state machine (`setup`, states/guards/`invoke`, wiring to React with `useMachine`/`useActor`/ `useSelector`), writing the controller (Clerk adapter) or view (rendering) layer, testing any of those layers, or migrating a legacy / pre-Mosaic component into the machine / controller / view split. Use when building, styling, debugging, testing, or migrating anything Mosaic. `references/mosaic-architecture.md` (repo root) holds the design-system contract; this skill is the how-to layer.

25k tokens
context cost
the whole folder, loaded on every use
11
files
instructions only
0
copies elsewhere
how many repositories repackaged it
1728
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/clerk/javascript --skill mosaic

What comes with it

94 600 bytes besides the instruction
references/controllers.md
references/headless.md
references/machines.md
references/migration.md
references/motion.md
references/parity-audit.md
references/stylex.md
references/styling.md
references/testing.md
references/views.md

The instruction itself

2 sections, as written by the author

Mosaic UI

Two things live under Mosaic, and this skill covers the how-to for both:

  • Styled components are authored with slot recipes — one recipe owns a

part's slot identity (data-cl-slot), variants, state, and appearance

cascade; useRecipe resolves it and hands back per-slot props to spread.

  • Flows follow a machine → controller → view split that keeps Clerk

resource logic out of visual components and makes behavior testable without a

running Clerk app:

machine     Pure flow rules: states, events, guards, async invokes, errors.
            No React hooks. No Clerk hooks. No Clerk resource objects.

controller  Clerk/data adapter: reads Clerk hooks/resources, injects async
            effects into machine context, gates permissions, derives view props.
            The only layer that may import Clerk hooks or call resource methods.

view        Rendering only: receives a snapshot plus explicit props, renders UI,
            sends events. No Clerk imports. No data-fetching. No mutations.

references/mosaic-architecture.md (repo root, read by all agents) is the

canonical contract for the whole design system — tokens, theme delivery, the

data-cl-* styling API, slot recipes, appearance/cascade/scope, and the "Flow

and data architecture" section that defines the split. Read it for the _what_;

this skill is the _how-to_.

Which reference to read

| You are… | Read |

| -------------------------------------------------------------------- | ------------------------------------------------------ |

| Building on / authoring a headless primitive (@clerk/headless) | references/headless.md |

| Styling a component with StyleX (tokens, stylex.create, CSS build) | references/stylex.md |

| Building an enter/exit transition, or any motion that reads as wrong | references/motion.md |

| Styling a component the legacy way (slot recipes, useRecipe) | references/styling.md |

| Authoring or debugging a state machine, or wiring one to React | references/machines.md → in-tree machine/README.md |

| Writing the controller (Clerk adapter, permissions, revalidate) | references/controllers.md |

| Writing the view (rendering a snapshot, sending events) | references/views.md |

| Testing a machine, controller, or view | references/testing.md |

| Migrating a legacy component into Mosaic (the end-to-end workflow) | references/migration.md |

| Running the parity audit that guards a migration | references/parity-audit.md |

The migration workflow (migration.md) ties the flow references together: it

treats the legacy component as the spec and drives you through the machine,

controller, and view layers, then verifies parity with parity-audit.md.

Other skills for the same job

different authors, same section of the catalogue
Theme Factory
by anthropics
vendor ×16

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

36k tokens
Brand Guidelines
by anthropics
vendor ×13

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

3k tokens
Artifacts Builder
by JayZeeDesign
×8

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

11k tokens scripts
Web Artifacts Builder
by anthropics
vendor ×7

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

11k tokens scripts
Frontend Design
by Karanjot786
×6

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

1k tokens
Frontend Design
by anthropics
vendor ×4

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

5k tokens
Expo Tailwind Setup
by openai
vendor ×4

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

3k tokens
Use Dom
by openai
vendor ×3

Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.

3k tokens

How to use it

Copy the folder

Take clerk/mosaic from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.