/elyx:elyx-codefrom elyx
Translates between Elyx designs and web code. Use to implement designs, update code from designs, create designs from code, import apps into Elyx, or keep linked design and code in sync.
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.
For Elyx inspection, language documentation, authoring, and validation, use the elyx skill. For the target project's framework, components, and checks, follow its AGENTS.md and existing code conventions.
meta.code links, code backlinks, component implementations, tokens, assets, and nearby examples. Treat a link as a lead to verify on both sides, not as proof that everything still matches.elyx tree <file> --ref <ref> --depth shallow and elyx render <file> --ref <ref> -o <tmp>/out.png with the relevant context. To see through instances, increase the tree depth. The tree shows inherited meta such as meta.code, token bindings, and instanceOf with its variant. Source text alone cannot show the final layout or overrides.target from find or tree output. Pass its filePath as the input file, its sourceRef as --ref, and its overridePath, when present, as --override-path. Do not infer an instance occurrence from its display path.Use these analogies as a starting point. Then follow the target framework and the resolved design.
| Elyx | Web code analogy | Check |
|---|---|---|
Stack layout: {direction: .row, item-gap: 8px} | display: flex; flex-direction: row; gap: 8px | Preserve order, alignment, wrapping, and responsive behavior. Nested stacks or a grid may fit the code better. |
Freeform children with left and top | A position: relative parent and position: absolute children for intentional overlap | Coordinates are relative to the parent. Canvas placement does not need to become app positioning. |
.auto, percentages, overflow | Intrinsic sizing, parent-relative percentages, CSS overflow | Elyx clips by default. CSS overflow defaults to visible. A freeform frame without a size can collapse. |
| Tokens | CSS custom properties, Tailwind theme tokens, or the project's token system | Preserve roles, aliases, and units. |
@context | Theme selectors, locale state, or responsive breakpoints | Inspect which tokens or structural variants change in that context. |
Component instance (frame : source) | A component call, such as <Card /> | Instance overrides become values that are passed or composed at that use site, not a copied implementation. |
@variant | A prop, state, or style variant in the component API | The Elyx variant inherits its base. Inspect the actual code API before you choose a prop. |
slot: .true on a frame | React <Card>{content}</Card> for one region. A named header prop or component composition for several regions. | Preserve the region's layout. Elyx source children are example content that instances start with. Decide whether the code supplies a default or leaves the content to callers. |
connections: {target: ...} | Navigation or a transition to another screen, component, or state | The target records the intended destination. Inspect the code for the event, guard, and transition behavior. |
connections declarations in the Elyx source, and follow their targets across files. Component inspection alone does not find them. Map each meaningful destination and branch to the project's routes or state transitions. Then verify in code the interaction that activates each one. A destination does not need to appear on the current board for its connection to be valid.props:. Code layers are a work in progress, and their rendered contents can't be edited. Redraw a component as Elyx layers when the design needs to change it. The code-layers documentation covers the root component, *.elyx.tsx entry files, and the limits. A codebase may need setup first: running its CSS build, such as Tailwind or StyleX, and importing the output from the root component; providers in the root; and entry files for compound components and for props that aren't text, numbers, booleans or enums. elyx man code-layers lists what to check."./checkout.elyx" as Checkout, a continue button can use connections: {target: Checkout.paymentScreen}. Keep destinations as references, including across files. To see the whole flow at once, use an overview with draw-connections: .true.For example, this code defines a shared default, and one caller supplies a different title:
function PlanCard({ title = "Plan" }: { title?: string }) {
return <article>{title}</article>
}
<PlanCard title="Starter" />
The linked Elyx component carries the default. The caller's value belongs on its instance:
export planCard = frame {
children: title,
title = text {contents: "Plan"}
}
starterCard = frame : planCard {
title {contents: "Starter"}
}
If only that call site changes, update starterCard. If the component default changes, update planCard. Check the resolved instance before you edit either one.
Watch for these differences:
left and top.overflow: .visible in Elyx.letter-spacing is a percentage of the font size. A positive line-height is a multiplier, and 0 means automatic.@context selects alternate tokens or contextual variants. By itself, it does not define a web breakpoint or a component prop.When you have verified the correspondence, put meta.code on the narrowest useful Elyx declaration. Use repo-relative paths and stable symbols, as in this pair.
In elyx/design/blocks/planCard.elyx, on the planCard declaration:
meta: {code: "src/components/blocks/plan-card.tsx#PlanCard"}
If the project uses backlinks, above PlanCard in the code:
// @elyx elyx/design/blocks/planCard.elyx#planCard
To go from design to code, open the linked implementation. To go from code to design, search for its backlink or a matching meta.code. When a path or symbol moves, update the link. Instances inherit source metadata, so do not copy the component link onto them.
Render the affected states and contexts. When your edits are done, normalize the changed Elyx files and run full diagnostics on them. Run the project's relevant code checks. If a code preview is available, compare the changed state's appearance and behavior with the design. Report material gaps or unverified states.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
elyx, design-to-code, code-to-design, design-sync, visual-development
npx claudepluginhub elyx-design/agents --plugin elyx2 skills in this plugin
Other plugins' skills for the same job