/elyx:elyxfrom elyx
Provides CLI-based resolution of `.elyx` design files for reading, editing, and analyzing screens, components, layouts, and design systems. Must be activated before any work with Elyx files.
Ships in elyx. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This workflow uses the elyx command from the public @elyx-design/cli npm
package. Before you work with Elyx files, run elyx --version to confirm that
elyx is on your PATH. If it is not, ask the user to install it. For
example:
npm install --global @elyx-design/cli
If a CLI error suggests the CLI is older than the project, such as an unknown
field in elyx.json, tell the user in one line: update the Elyx app if
elyx came with it, or update @elyx-design/cli if they installed it
from npm.
For the authoritative list of flags, run elyx --help or elyx <subcommand> --help.
find and tree to see the resolved sceneUse find and tree to read the scene after imports, instances, overrides, layout, and geometry resolve:
find --ref: get the final data and bounds of one layer by its exact ref.
elyx find path/to/file.elyx --ref ctaButton
find --at: get the topmost rendered layer at a board-space point.
elyx find path/to/file.elyx --at 420,180
find --in: get the layers that intersect a board-space rectangle, or that the rectangle contains.
elyx find path/to/file.elyx --in 0,0,800,600
elyx find path/to/file.elyx --in 0,0,800,600 --contain --click-through
tree: get the semantic layer tree of a file, or of one internal source ref, with children, instance source references, layout, position, constraints, text, and style.
elyx tree path/to/file.elyx --ref OnboardingWelcome
elyx tree path/to/file.elyx --ref OnboardingWelcome --depth full
The results use these conventions:
localBounds is geometry in the layer's own space. absoluteBounds is geometry in board space.position is the resolved local placement. constraints are the stored values that drive layout.{"value": …, "token": "<file>#<group>.<member>"}. The token is the same in every context.instanceOf gives an instance's source file, symbol, and variant.code instead: the React component it renders, as file and export, and its props. The tree omits the layers it renders.slot: true. Other nodes omit it.shallow, full, or a non-negative integer. An integer limits how many instance boundaries the tree crosses.cssWhen you implement a design in code, start from elyx css instead of recreating styles from tree output. It writes one class per rendered layer, with token references, stack layout, positioning, and clipping resolved. Add --format json to get each rule's declarations and the layer target it styles.
elyx css path/to/file.elyx --ref OnboardingWelcome
When you describe or name Elyx objects, follow these rules:
= is the layer’s name. Keep its leaf name concise, semantic, valid Elyx syntax, and consistent with the project. Do not add a separate name: property.title: string for a human-readable label independent of the symbol. Keep the symbol stable when only the label changes.caption: string for a short explanation of a screen or example, such as its purpose or the state it demonstrates.Before you assume anything from source examples, use elyx man to learn Elyx syntax, concepts, properties, and component semantics. elyx man prints the overview manual. elyx man <topic-or-schema-path> prints one topic, such as elyx man components, elyx man instance, or elyx man frame.width. If you do not know the right path, run elyx man --list.
The project usually already has a design system and its own file vocabulary. Reuse and import its existing building blocks. Do not build a parallel system.
Prefer composition to recreation. Import and instantiate existing components instead of rebuilding them from raw layers.
If the project has React components, code layers can place them on the
canvas directly, so a design can start from what the codebase already has.
Code layers are a work in progress. Read the code-layers documentation
before you use them.
To learn how Elyx projects are organized, run elyx man project-structure.
To learn component composition and override semantics, run elyx man components, elyx man instance, elyx man variants, and elyx man slots.
To learn how to place React components as code layers, run elyx man code-layers.
When you add or change structure, follow these rules:
@variant on an instance of its base. It already behaves as a component; do not enable the inspector's Component option (add export) just to make it a variant. Export it only when it needs to be reusable outside its file, such as an external variant offered in another file's variant picker..auto sizing for normal interface layout. The frame.layout documentation describes them.title: and caption: where they help explain top-level screens or component examples, not on every layer. Keep existing annotations unless the task calls for changing them.title: and caption: so the canvas can draw them as annotations. Do not add separate text layers around a screen or example to represent its title or caption. Text that belongs inside the interface still uses text layers.assets documentation shows how, including tinting it with fill. Do not substitute arbitrary Unicode characters for icons. For SF Symbols with a text representation, use the verified character and explicitly select a compatible SF font. Verify that it contains the glyph.When you place separate screens, frames, or component examples on a board, leave at least 48px between the edges of adjacent items. Aim for a gap of at least 20% of the larger item’s size along the spacing direction. That is the width for items side by side, and the height for items stacked vertically. For example, two 1920px-wide screens side by side need about 384px or more between them, not 48px.
The 20% target is a guideline, not a rigid rule. Keep spacing consistent within groups, and leave room for frame titles. To measure gaps, use the resolved bounds of the items. To review the arrangement, render it. This guidance covers the space between distinct canvas items. It does not cover padding or gaps inside a screen or component, or intentional overlaps. Do not re-space unrelated content unless the user asks.
rg -n --glob '*.elyx' '@context\s*\(' . # find the context axes and values in the workspace
elyx render path/to/file.elyx -o <tmp>/out.png
elyx render path/to/file.elyx --context theme=dark -o <tmp>/out-dark.png
elyx render path/to/file.elyx --context theme=dark --extra-file path/to/theme-dark.elyx -o <tmp>/out-dark.png
elyx render path/to/file.elyx --ref <name> --context theme=dark --context lang=pt -o <tmp>/out.png
Use render whenever the visual result matters. Do not assume that a .elyx change is correct from its source text alone.
A render is for you to look at, not part of your work. Write it to a temporary directory outside the repository, shown as <tmp> above, then view the PNG. Do not save renders in the project or commit them unless the user asked for the image files.
To render one layer, use --ref <name>. To render with custom contexts without changing the source file, repeat --context axis=value. To load files that the rendered file does not import, repeat --extra-file <file>. A --context selection changes the output only after the file that declares the context is loaded. Without the matching --extra-file, the render silently falls back to the default values. Before you render, search the workspace's @context annotations to learn the available axes and values.
When the file has code layers, render prints their render warnings to stderr, such as CSS that code layers don't support. Warnings aren't diagnostics. elyx man code-layers explains how to read them.
The render scale defaults to 1. Add --scale 2 only for fine detail, because it produces four times the pixels.
When your edits are done, normalize each changed file in place. Then check the changed files for errors and warnings.
elyx normalize -w path/to/file.elyx
elyx diagnostics path/to/file.elyx # with no target, checks the whole project
Check the smallest scope that covers the changed files. Resolve every warning, or account for it explicitly.
If normalization reports that it fell back to syntax-only formatting, the file loaded with problems, so it was only formatted. Fix the problems it lists, then normalize the file again.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub elyx-design/agents --plugin elyx2 skills in this plugin
Other plugins' skills for the same job