Agent skill

Composite Components

by dxos in dxos/dxos

A skill your agent uses when authoring or refactoring composite React components in @dxos/react-ui and sibling UI packages — namespaced primitives like Foo.Root / Foo.Trigger / Foo.Content built…

Custom licenceAuto-check passedFrontend & Design

Install Composite Components

skills CLI
$ npx skills add dxos/dxos --skill composite-components -a claude-code

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

GitHub CLI
$ gh skill install dxos/dxos composite-components --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/dxos/dxos.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/composite-components .claude/skills/composite-components && 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
composite-components
GitHub stars
525
Token cost
~1.8k tokens
SKILL.md length
679 words
Files
1
Skills in repo
41
Repo updated
First seen
Licence
Custom licence

At a glance

A skill your agent uses when authoring or refactoring composite React components in @dxos/react-ui and sibling UI packages — namespaced primitives like Foo.Root / Foo.Trigger / Foo.Content built…

  • Works in 10 steps: Prefix internal names: FooRoot,… → displayName is dotted and matches the… → The module is the namespace. Foo.tsx… → …
  • Tasks that involve React components
  • SKILL.md covers Exemplars, Two construction styles, Rules and Counter-examples to avoid
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Composite Components is an agent skill from dxos/dxos. Use when authoring or refactoring composite React components in @dxos/react-ui and sibling UI packages — namespaced primitives like Foo.Root / Foo.Trigger / Foo.Content built around forwardRef, the ark. factory's asChild, and a tx() theme function.

Its SKILL.md is about 1.8k 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 Frontend & Design, covering React components and Refactoring. It works with React. The repository describes itself as: TypeScript implementation of the DXOS protocols, SDK, toolchain and Composer.

When your agent uses it

  • Tasks that involve React components
  • Tasks that involve Refactoring

Example prompts

  • “/composite-components”

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Prefix internal names: FooRoot, FooTrigger, FooRootProps. The unprefixed Root / Trigger / RootProps names appear only in the module's…
  2. displayName is dotted and matches the consumer API: 'Foo.Root', 'Foo.Overlay' — not 'FooRoot' or 'FooOverlay'. Set it on every part…
  3. The module is the namespace. Foo.tsx carries the // @import-as-namespace directive and exports each part under its short name; consumers…
  4. Export every part's Props type under its short name
  5. Section comments delimit each part
  6. Theme tokens: classNames flow through tx('foo.part', variants, classNames). For slottable/composable parts, use composableProps(props) to…
  7. Props convention: extend SlottableProps (or ComposableProps) from @dxos/ui-types for native parts; extend ThemedClassName for…
  8. Context: prefer createContext from @dxos/react-hooks over React's plain createContext (it returns a typed [Provider, useContext] tuple…
  9. No as any displayNames. If a part is a plain function component you can't otherwise tag, wrap it in composable() so displayName is a typed…
  10. One file per composite family (Foo.tsx). Don't split parts across files.

What it can do on your machine

Read from SKILL.md and the folder at commit 2e6b92a. 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

Composite Components loads about 1.8k tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 679 words of instructions outside code blocks.

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

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

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 679 words (~1,809 tokens).

“A "composite" is a namespaced React API like Dialog.Root / Dialog.Trigger / Dialog.Content, in the Radix/Ark anatomy style. Scaffolding — createContext, composeRefs/useComposedRefs, useControllableState, composeEventHandlers — comes from @dxos/react-hooks; polymorphic elements come from ark. (@ark-ui/react/factory), which takes asChild itself. Do not…”

— opening of SKILL.md by dxos, Custom licence
name
composite-components

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/composite-components of dxos/dxos.

Open the folder on GitHubat commit 2e6b92a

Compare with similar skills

Composite Components 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.

Composite Components compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Composite Components this skilldxos/dxos525—~1.8kAutomated safety check: PassCustom licence
Vercel React Best Practicessanity-io/sanity6.4k129 repos~1.6kAutomated safety check: PassMIT
Dify Component Writing Guidelanggenius/dify158k—~626Automated safety check: PassCustom licence
React Best Practicesmastra-ai/mastra29k—~1.9kAutomated safety check: PassCustom licence
No Use Effectfastrepl/anarlog9.5k—~825Automated safety check: PassMIT
Eisland Dev Refactor Module SplitJNTMTMTM/eIsland320—~2.2kAutomated safety check: PassGPL-3.0

Similar skills

  • Official

    React and Next.js performance optimization guidelines from Vercel Engineering.

    6.4k GitHub starsUsed in 129 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • Use when implementing or refactoring React/TypeScript components and the task requires decisions about component ownership, feature boundaries, state, data…

    158k GitHub stars~626 tokensUpdated today
    Frontend & DesignAuto-check passed
  • React Best Practices

    mastra-ai/mastra

    React performance optimization guidelines from Mastra Engineering.

    29k GitHub stars~1.9k tokensUpdated today
    Frontend & DesignAuto-check passed
  • No Use Effect

    fastrepl/anarlog

    Avoid direct React useEffect usage when writing or reviewing React components and hooks.

    9.5k GitHub stars~825 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Refactor a monolithic React component file into a standardized module structure with components/, hooks/, utils/, and config/ subdirectories.

    320 GitHub stars~2.2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Refactor a monolithic React component file into a standardized module structure with components/, hooks/, utils/, types/, and config/ subdirectories.

    320 GitHub stars~3.2k tokensUpdated today
    Frontend & DesignAuto-check passed

More from dxos/dxos

All 41 skills in this repo
  • Run the rule-driven agentic code review — discover rule blocks in the repo's .mdl files, prepare per-rule review groups (full project by default; diff-only with --pr-only), spawn one focused Sonnet…

    525 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Forensically inspect and repair Composer browser profiles — offline (Chrome OPFS / SQLite extract) or live via /recovery.html debug port.

    525 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Migrate Oxfmt

    dxos/dxos

    Guide for migrating a project from Prettier or Biome to Oxfmt.

    525 GitHub starsUsed in 3 repos~2.2k tokens
    Auto-check passed
  • Moon

    dxos/dxos

    This skill should be used when the user asks to "configure moon", "set up moonrepo", "create moon tasks", "run moon commands", "configure moon workspace", "add moon project", "moon ci setup", "moon…

    525 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Reference for SubductionPolicy (the four hooks authorizeConnect, authorizeFetch, authorizePut, filterAuthorizedFetch passed via Subduction.hydrate(..., policy) or new Repo({ subductionPolicy })).

    525 GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Autocue

    dxos/dxos

    Record a demo of the running app that the agent drives itself — a .mdl QA test or an ad-hoc walkthrough — as a captioned .webm (or a screenshot), trimmed of dead air and ready to attach.

    525 GitHub stars~12k tokensUpdated today
    Auto-check passed

Works with

Questions about Composite Components

What does Composite Components do?

A skill your agent uses when authoring or refactoring composite React components in @dxos/react-ui and sibling UI packages — namespaced primitives like Foo.Root / Foo.Trigger / Foo.Content built…. Composite Components is an agent skill from dxos/dxos.Content built around forwardRef, the ark.

When should I use Composite Components?

Composite Components fits situations like: tasks that involve React components; tasks that involve Refactoring.

How do I install Composite Components in Claude Code?

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

How do I install Composite Components in Codex?

Run `npx skills add dxos/dxos --skill composite-components -a codex`. Or copy the skill folder (.agents/skills/composite-components in dxos/dxos) into .agents/skills/composite-components in your project. Codex loads it when a task matches its description.

Can I use Composite Components 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 dxos/dxos --skill composite-components -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/composite-components, .gemini/skills/composite-components, .github/skills/composite-components and .opencode/skills/composite-components in your project.

What does Composite Components need to run?

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

Does Composite Components 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 Composite Components 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 Composite Components use?

Composite Components has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Composite Components use?

About 1.8k tokens (SKILL.md is roughly 7.2k 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 Composite Components?

Skills that share tags, products or a category with Composite Components: Vercel React Best Practices (sanity-io/sanity, 6.4k stars), Dify Component Writing Guide (langgenius/dify, 158k stars), React Best Practices (mastra-ai/mastra, 29k stars) and No Use Effect (fastrepl/anarlog, 9.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Composite Components?

dxos (a GitHub organization) maintains it in dxos/dxos, which has 525 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on October 9, 2026.

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