Composer Plugins
Exemplar: packages/plugins/plugin-chess. Read its source files to understand every pattern below.
Companion skills. For building plugin UI with the design system — container layout, theme tokens,
forms, toolbars, lists/stacks, reactivity, storybook — use the composer-ui skill. For authoring
new @dxos/react-ui composite primitives (Foo.Root/Foo.Content), use composite-components. This
skill owns plugin _structure_ (capabilities, surfaces, schema, operations) and points at those two for UI.
Read MEMORY.md first (sibling of this file) for session-logged design/implementation learnings and prior corrections.
REQUIRED — keep MEMORY.md current: Whenever the user directs a correction (tells you to do something differently, rejects an approach, or specifies a pattern), record it in MEMORY.md as part of carrying out that correction — do not defer to session end. Also capture other non-obvious design/implementation details as you learn them.
Update it _appropriately_:
- Append to the current session's dated section, newest first:
## YYYY-MM-DD — <plugin(s)>. Create it if absent; do not start a second section for the same session. - Keep it compact and agent-directed: terse imperative bullets, one rule per bullet, name the file/symbol/idiom. No prose, no hedging, no narration of what you did.
- Update or merge an existing bullet instead of adding a near-duplicate; delete bullets proven wrong.
- Record reusable rules, not task specifics. When a rule generalizes beyond one session, promote it into the body of this
SKILL.mdand drop it fromMEMORY.md.
Discovery
Use the dxos-introspect MCP server (@dxos/introspect-mcp, served by the dx-introspect-mcp binary) as the source of truth for plugin metadata and reference examples — not directory listings.
A "plugin" is a package whose dx.config.ts default-exports a Plugin.config(...), so ls packages/plugins/ overcounts (e.g. plugin-generator is tooling, not a plugin).
mcp__dxos-introspect__list_plugins— enumerate plugins (filter byidsubstring; passcompact: truefor identifying fields only).mcp__dxos-introspect__get_package— package details for a given plugin.mcp__dxos-introspect__list_surfaces/list_capabilities/list_operations/list_schemas— drill into a plugin's contributions.mcp__dxos-introspect__find_symbol/get_symbol/list_symbols— locate code by symbol rather than grepping paths.mcp__dxos-introspect__list_idioms— enumerate@idiom-tagged reference examples (filter byslugsubstring orhostKind: 'symbol' | 'story' | 'test').
Reach for these first when answering questions like "how many plugins", "which plugin contributes X surface", or "where is symbol Y defined".
Reading an operation's key and input shape
list_operations does not enumerate operations — it returns one row per
Capabilities.OperationHandler contribution, i.e. where each plugin's handler file lives. The
definitions live under a <Plugin>Operation symbol — a namespace in plugin-space, a module of
top-level exports in plugin-markdown — so go through the symbol tools:
list_plugins({ id: 'space' })→ the exact plugin id, when you only have a loose name.find_symbol({ query: 'SpaceOperation' })→@dxos/plugin-space#SpaceOperation.get_symbol({ ref: '@dxos/plugin-space#SpaceOperation', include: ['source'] })→ every
definition with its meta.key, input, output and services.
Read services while you are there: a definition listing Database.Service needs a spaceId at
invoke time, which is invisible from the key alone.
Search idioms before implementing
Required. Before writing or refactoring any container, capability, operation, skill, or schema, call mcp__dxos-introspect__list_idioms and scan for a slug that matches what you're about to build. An idiom is a JSDoc-tagged pinning of the canonical way to do one thing — when one exists, it is the answer, and you should get_symbol on the host artifact and follow the pattern rather than reinventing it.
Typical triggers:
- Building a toolbar → look for
org.dxos.react-ui-menu.*idioms. - Wiring
useObject/ mutating ECHO subjects → look for ECHO idioms. - Writing a surface filter, operation handler, skill, or container scaffold → search by the feature word first.
If no idiom matches, proceed using the exemplar (plugin-chess); if you find yourself writing something that other plugins will copy, consider adding a new @idiom tag (see