/pixso:pixso-design-editingfrom pixso
Creates, modifies, inspects, and refines UI designs inside Pixso using Pixso MCP tools for canvas editing, DSL operations, visual mockups, and design review.
Ships in pixso. 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.
Read when SKILL.md points to them.
The external Pixso MCP surface has fourteen discoverable tools on Desktop, VS Code, and Remote (Remote runs in a sandboxed headless browser): get_mcp_server_info, get_design_context, get_metadata, fetch_context, query_nodes, apply_design, eval_script, get_node_dsl, get_export_image, get_screenshot, read_component_config_data, code_to_design, get_prototype_context, and apply_prototype_interactions. Use only these, and use them through the routing below; do not delegate to another high-level design workflow:
get_mcp_server_info — mandatory one-time session handshake; exposed on Desktop, VS Code, and Remote (some hosts enforce the gate; others do not, but the call is still required).fetch_context — current file/selection context; also refreshes the client token stores used by apply_design style and variable tokens.query_nodes — node and component queries in the current file.apply_design — the primary canvas write path (structured DSL operations).eval_script — Plugin API reads and the writes apply_design cannot express.get_node_dsl — node/component DSL for inspection.get_export_image — export a node as an image/SVG file.get_screenshot — single-node visual verification.get_design_context — default design-to-code entry point; owned by pixso-design-to-code.get_metadata — explicit sparse structure inspection; owned by pixso-read-dsl and pixso-design-to-code.get_prototype_context, apply_prototype_interactions — prototype interaction reads/writes; owned by pixso-prototype-interactions.read_component_config_data — current-file component-family data for component parser config; owned by pixso-component-config, not a general design read tool.code_to_design — owned by pixso-code-to-design.The MCP tools read_components, read_styles, write_styles, read_variables, write_variables, read_comments, check_layout, get_top_level_frames, load_guidelines, list_style_tags, query_all_unique_props, replace_props, get_style_guide, take_screenshot, get_variants, get_variable_sets, get_variables, get_local_styles, get_remote_styles, get_all_components, create_instance, set_bound_variables, set_fill_style, set_stroke_style, set_text_style, and set_grid_style are retired. They do not exist in the current surface: never call them and never claim you called them. Their workflows are replaced by eval_script; static guidance content is preserved under references/.
Before writing any eval_script read or write script, read references/eval-script-recipes.md and follow the recipe that matches the task.
Use pixso-prototype-interactions to read, intelligently add, update, or delete prototype interactions. Route interaction-only requests directly to that skill, before the design-planning or ordinary-property workflows below. For combined requests, finish the design first, then follow that skill to read interaction context and apply changes. Do not modify interactions through ordinary property editing or design DSL.
Before the first Pixso MCP tool call in a task, you MUST call get_mcp_server_info once. Check once per session; do not repeat it before every tool call.
requires: { "pixso": ">=3.0.10", "mcpSchema": 3 }. Read editorVersion (Pixso version) and schemaVersion (tool-contract version, may be absent) from the response.editorVersion is v0.0.0, empty, or unparsable (a development placeholder), skip the version gate, state that the current Pixso version cannot be confirmed, and continue the task.editorVersion is known and lower than 3.0.10, tell the user clearly: "Current Pixso editorVersion is X; this skill requires Pixso >= 3.0.10. Upgrade Pixso or use a matching skill version." Do not perform write operations before the user confirms.schemaVersion and it is not 3, tell the user that the skill or the client must be updated, and stop write operations.schemaVersion, report "the current client does not declare a tool-contract version", record a warning, and continue. Never block read-only flows for this reason.deploymentType, seat, filePermission, and skills.recommendedTag. Use filePermission when explaining why writes are rejected, and ignore missing optional fields.get_mcp_server_info (it runs in a sandboxed headless browser); call it once at session start. Some MCP hosts do not technically enforce the handshake gate, but the mandatory call still applies: if the call is unavailable, state that the handshake information is unavailable, never fabricate a version, and continue.get_mcp_server_info first and then retry (there is no dedicated error code). Call get_mcp_server_info in the same session, then retry the original call. Do not open a new session to bypass it.Reads are scoped and run through fetch_context, query_nodes, get_node_dsl, eval_script, get_export_image, and get_screenshot:
fetch_context({ include_schema: false }). include_schema is required; set it to true only when the user explicitly asks for the file schema. Use include_map: false for pure creation tasks.query_nodes for targeted reads and get_node_dsl for structure. Do not switch to eval_script when these two can answer.eval_script recipes. Subscribed-library style values (pixso.getStylesInLibraryAsync) and variable values (pixso.teamLibrary collections) are pure reads that work in design and preview; an import is only needed to bring the entity into the current file. The client can throw a transient error for variable reads immediately after a file switch; the recipes document the required retry.apply_design: after fetch_context in the same session, apply_design accepts variable tokens ($<variable name>) and style tokens ($style/<style name>) because fetch_context refreshes the client token stores. Enumerate the exact names with recipe R8, and treat token resolution as unconfirmed when apply_design feedback reports it unresolved.get_export_image with a node GUID. The DSL vectorRef and asset-bearing nodes identify export targets.get_screenshot({ guid, maxDimension? }).Never repeat a broad read when a scoped read answers the question, and never call an unfiltered inventory without the user's scope confirmation.
query_nodes may fold a container into icon_font, including wrappers generated by code_to_design. This does not mean the canvas node is a font icon. When the real type or child layers matter, read the DSL or verify read-only with eval_script.
Assess requirement clarity and complexity before choosing any write tool. This gate takes precedence over every design-generation and write route:
Explicit property edits to existing nodes, purely read-only inspection, and simple compositional edits whose target, placement, and content are all clear may skip this gate. A request that requires the agent to decide page scope, major modules, core flow, or navigation structure must not skip it.
After completing the unified requirements-planning gate, use the following write priority and routing.
Choose write tools in this order; do not fall through to a later layer when an earlier one can express the change:
apply_design structured operations: creating nodes/pages/modules, component instances, style and variable token binding, component instance props / descendants overrides, AutoLayout direction/sizing/spacing semantics, reparenting, and ordinary property edits expressed as U() / M() operations.eval_script: use it only when apply_design cannot express the change, for example Plugin API-only writes (shared-style create/update/delete and style binding, variable create/update and binding, grid-style gridStyleId binding, instance override-group reset), batch edits the DSL cannot address, or writes the user explicitly requests through the Plugin API. Never write the same property through both tools in one run.Routing:
apply_design U() for known node ids. When the change is a wide batch that the DSL cannot address, use the eval_script batch-edit recipe, keep per-target status, and read back in the same script.apply_design. This includes creating nodes, pages, or modules; binding variables or shared styles through tokens; overriding component instance props / descendants or swapping instances; changing AutoLayout direction, sizing, or spacing semantics; and reparenting.apply_design tokens after fetch_context. When a token cannot be resolved, or the user asks to create/update/delete a shared style or variable, use the eval_script style/variable recipes. Those write paths are marked unverified in the recipes: run them only on an editable file and read back before reporting success.apply_design style slots; bind or unbind them with the eval_script grid-style recipe.apply_design for creation and structural work. Follow with eval_script only for non-overlapping changes. Never write the same property through multiple tools in the same run.eval_script is unavailable or rejects writes, reroute only to routes that can express the change; never claim to have executed an unavailable tool.Only before calling apply_design, or writing or reviewing its operations DSL, read the following two files in full. Until that is done, do not call apply_design. This preflight does not apply to eval_script or read-only tools:
apply_design route, read both files in full with the Read tool. Do not read only SKILL.md, only the first few sections of dsl-rules.md, or skip dsl-schema.ts.apply_design response does not mean the output has passed schema validation.apply_design still cannot skip this preflight.For non-trivial screen generation, region completeness is a blocking requirement.
If the user explicitly asks to convert a web page, URL, HTML, ZIP, static web artifact, or code_to_design input into Pixso, this skill must not automatically take over as reference-based reconstruction.
pixso-code-to-design first for exact capture and conversion.code_to_design failures are conversion blockers only; do not interpret them as user consent to redesign.Use this skill when the user's intent is to reference a web page, borrow a web style, design in the visual style of a site, or generate a new interface from a reference URL, rather than exactly converting the page into editable Pixso nodes.
apply_design, extract the reference page's design specification: layout/grid/spacing, colors, typography hierarchy, component shapes, radius, shadows, icon/image style, interaction states, and mobile adaptation.The retired tools list_style_tags, get_style_guide, and load_guidelines no longer exist, but their content is preserved as static references:
load_guidelines topics.code, table, tailwind, landing-page, design-system, mobile-app, web-app, slides.Read the files you need before generating; these are creative references, not tool output. Never claim a retired tool was called.
If the user asks for specs/design system/showcase board/component library, finish the requested draft first, then load and follow references/design-specification.md.
For generation tasks that actually create a page, interface, module, or top-level design node, retain the top-level GUID of each generated result during execution. After generation succeeds, return a clickable Pixso design URL that opens the generated result whenever the required location data can be obtained reliably.
eval_script that returns pixso.origin, pixso.fileKey, and pixso.currentPage?.id as the origin, file key, and page ID.{origin}/app/design/{fileKey}?icon_type=1&page-id={encodedPageId}&item-id={encodedRootGuid}. URL-encode page-id and item-id, and preserve the actual environment origin instead of hardcoding pixso.cn.page-id and item-id to target the result generated in this run. Do not return the URL of an old target node.Confirm the target. If the current request already supplies confirmed target node IDs, use them directly; do not call fetch_context merely to reacquire the selection. Call fetch_context({ include_schema: false }) when the user refers to current or selected layers but the IDE provides no usable IDs, or when you need names, types, file state, fonts, variable/component counts, or confirmation that nodes still exist.
Complete the unified requirements-planning gate. For creation requests covered at the top of this file, confirm that planning-clarification.md was read in full and either produced a no-question decision or completed one question batch whose answers have been merged. If the gate is incomplete or the user asked to remain read-only, stop immediately: do not enter steps 3-11 or call any canvas write tool.
Decision point — Does the task need creative direction?
reference_mode=restore):
→ Do not read the creative-direction references before reconstruction.
→ Reconstruct from the source directly; no generic draft first. Use resources only when close; source fidelity wins.apply_design U() per "Write Priority"; only when it cannot express the change, follow the eval_script batch-edit recipe, then go directly to step 11.
→ If any part needs creation, structural change, or resource binding, return only that part to the normal workflow. Never write the same property with multiple tools.landing-page, mobile-app, web-app).Read design tokens and reusable resources. Use the eval_script recipes:
fetch_context in the same session, apply_design accepts $variableName and $style/... tokens for resources whose names you confirmed. Do not use tokens that were not refreshed.query_nodes — Batch reusable component ids. Concrete components and variants are returned as type: "frame", reusable: true; component sets are returned as type: "frame", isStateGroup: true. For component sets, enumerate the variant axes with recipe R12 (client-side set children, names like axis=value), then query the concrete variant with variantName and use the returned component guid as apply_design.ref. A plain component-set query is for editing local variants and returns only first-level childNode.
Layout audit — Run the eval_script layout recipe (R9) on the parent frame instead of the retired check_layout.
apply_design() — Generate each screen as a complete unit.
apply_design operation result for use as the final design URL's item-id. Do not substitute an internal child node or an old selection for the generated result root.apply_design is executed by blocks, finish and self-check the current region before starting the next region. Do not leave half-built regions for later.Repeat step 7 per screen. Use the layout-audit recipe (R9) between screens only if confidence is low.
After ALL requested screens/pages are complete, check whether the user explicitly requested design specifications / design system / visual specs / component specs / spec panel / showcase board.
If NOT requested:
→ get_screenshot({ guid }) → Final visual verification. get_screenshot takes a single guid (there is no nodeIds array) and an optional maxDimension from 256 to 2048, default 1024. When multiple nodes/screens must be compared, call it once per representative node. The whole task allows at most 2 get_screenshot calls (one node each); prefer the default view or final board and never call it once per node.
If requested:
→ Load and follow references/design-specification.md.
→ Run the layout-audit recipe (R9) on draft and board, then one final get_screenshot({ guid }) when useful.
If fixes are needed: use apply_design() with U() or M(), then the layout-audit recipe (R9) to confirm. Do not repeat get_screenshot merely to recover an earlier screenshot, and do not reset the two-call get_screenshot budget (each call covers one node) after fixes or structure checks. Stop screenshot → fix → screenshot → fix loops; use query_nodes or the layout-audit recipe for further diagnosis.
Final response: briefly state completed work. For generation tasks, follow "Generated Result Links" and include any reliable design URL; never guess when reliable link data is unavailable. For specs, list generated sections and source-bound write-back keys; summarize Components separately.
eval_script Route (reads, then writes only when no more specific tool applies)Read references/eval-script-recipes.md before writing a script. Batch every target into one script and complete all three phases in the same call:
pixso.getNodeById(id) / getNodeByIdAsync(id) for known node IDs, or the appropriate Plugin API read for a batch scope. Read only the properties to be changed and their current values.apply_design cannot express). Return updated, unchanged, not_found, or failed for each target instead of one generic success flag.error field, a top-level verified: false, or malformed result as failure even when the MCP call itself reports success.Call constraints:
pixso object. Use top-level await when needed.console.log output is not returned as the tool result.query_nodes, the layout-audit recipe, or get_screenshot for duplicate verification.eval_script is read-level: reads are allowed in read-only/preview files, but write APIs are rejected by the host there with This API cannot be used in Preview mode. Stop writing and report the limitation; do not retry the same write in another tool.in getLocalVariablesAsync: <number>), retry the same call once before reporting the error.pixso.comment.read({ scope: "file" | "page" | "selected_frame", ... }) reads comments in the current file. Scope is injected by the host; a script cannot pass file/page/node ids. Report COMMENT_CONTEXT_REQUIRED as a missing-context problem, not as "no comments".Leave the eval_script route and use apply_design for:
apply_design tokens can express;props / descendants or swapping instances;apply_design DSL.no_edit_permission or another explicit no-edit-permission result, stop writing and report the permission limitation as returned. Do not reinterpret it as an argument error or retry it.This API cannot be used in Preview mode.), stop writing and report that the file is read-only or in preview. Read-only flows may continue.$style/... or $variableName token in apply_design feedback, switch that part to literal values or an eval_script binding and report what was done.COMMENT_CONTEXT_REQUIRED, COMMENT_SCOPE_UNAVAILABLE, COMMENT_INVALID_ARGUMENTS, COMMENT_REQUEST_FAILED) as reported by the client. Do not retry with a different scope guessing at the user's intent.fetch_context() result.apply_design call, use variable references from I()/C() for newly created nodes."165:39") may ONLY be used for nodes confirmed in a PREVIOUS apply_design response or a current read.guid. If it returns an unrelated node (for example the current page), do not use it; re-read the original ID read-only with eval_script in the same file. Valid component-variant and instance-path ID resolution is not a mismatch.descendants property in C() for overrides. Do NOT use separate U() on descendants of copied nodes — copying assigns new IDs.Example text values in this guide are schema examples only. When generating an actual design, localize all visible UI copy according to the Generated design content language policy and preserve numbers, units, brands, acronyms, technical identifiers, and exact user-provided copy when that is more natural.
## Document State:
- No nodes are selected.
### Variables: 12 variables defined
### Styles: 8 styles defined
### Components: 5 components, 2 component sets available.
### Available fonts: Inter, Roboto
The counts are context only. Enumerate names with the eval_script recipes (R2, R3, R4, R8) when you need tokens, component ids, or style ids.
Tables use flexbox. Strict hierarchy: Table (frame) → Row (frame) → Cell (frame) → Content
Each cell MUST be a frame containing its content:
tableRow = I("3:1", { type: "frame", autoLayout: { direction: "horizontal" } });
cell1 = I(tableRow, { type: "frame", width: "fill_container" });
I(cell1, { type: "text", nodeText: "John Doe", fillPaints: "#000", fontFamily: "$body_font", fontWeight: 400 });
cell2 = I(tableRow, { type: "frame", width: "fill_container" });
I(cell2, { type: "text", nodeText: "[email protected]", fillPaints: "#000", fontFamily: "$body_font", fontWeight: 400 });
Create: Component creation uses reusable: true. Component-set creation uses an isStateGroup: true parent without reusable, and variant children are identified by name: "axis=value".
buttonSet = I("document", { type: "frame", name: "Button", isStateGroup: true });
primary = I(buttonSet, { type: "frame", name: "type=primary", reusable: true });
secondary = I(buttonSet, { type: "frame", name: "type=secondary", reusable: true });
To convert selected/existing layer(s) into a component or component set, use the latest selected layer ids as childNode[].guid and choose the wrapper by intent:
reusable: true; all selected layers become children of the same new component.// Turn selected layers "12:1" and "12:2" into one component.
// Do not pass top, left, width, height, or autoLayout for this wrapper.
card = I("document", {
type: "frame",
name: "Card",
reusable: true,
childNode: [{ guid: "12:1" }, { guid: "12:2" }],
});
isStateGroup: true; each selected layer becomes a separate variant descriptor named axis=value.// Turn selected layers "12:1" and "12:2" into one component set.
buttonSet = I("document", {
type: "frame",
name: "Button",
isStateGroup: true,
childNode: [
{ guid: "12:1", type: "frame", reusable: true, name: "type=primary" },
{ guid: "12:2", type: "frame", reusable: true, name: "type=secondary" },
],
});
Flow: discover component and component-set ids with the eval_script inventory recipes (R2 local, R5 libraries). For a component set, enumerate its variant children (recipe R12) to learn axes and values, then call query_nodes({ nodeIds: [{ nodeId: "<real set id>", variantName: "type=primary,size=medium" }], searchDepth: 1 }) and use the returned real component guid as the instance ref. editable:false resources may be used but not modified.
{
"componentSet": {
"id": "42:1",
"name": "Button",
"variants": [
{ "id": "42:3", "name": "type=primary,size=medium" },
{ "id": "42:4", "name": "type=secondary,size=medium" }
]
}
}
The variants array above is the shape returned by recipe C2, not a tool response from a retired tool.
Apply: ref is always a real component guid from query_nodes(), never a remote #n id or a component key. Override nested layers via instance.descendants using response keys; drive exposed props via instance.props (propDefMap keys). Sub-instance rows use { ref: "real-guid" }; text layers use nodeText. propRefs = layer is also controllable via matching props—either path is valid.
{
"id": "42:3",
"guid": "42:3",
"type": "frame",
"reusable": true,
"propDefMap": {
"instance#2:1": { "type": "instance_swap" },
"text#2:3": { "type": "text" },
"visible#2:2": { "type": "boolean" }
},
"descendants": {
"2:8255": { "type": "text", "nodeText": "…", "propRefs": ["text#2:3"] },
"2:8256": { "type": "instance", "ref": "45:1" },
"2:8259": { "type": "instance", "ref": "45:1", "propRefs": ["instance#2:1", "visible#2:2"] },
"2:8280": { "type": "instance", "ref": "45:2" },
"2:8280/2:8278": { "type": "instance", "ref": "45:3" },
"2:8280/2:8278/2:8277": { "type": "text", "nodeText": "Button" }
}
}
ex = I("document", { type: "instance", ref: "42:3" });
U(ex, { props: { "text#2:3": "Label" } });
U(ex, { descendants: { "2:8255": { nodeText: "Label" } } });
U(ex, { props: { "instance#2:1": false } });
U(ex, { descendants: { "2:8256": { visible: false } } });
U(ex, { props: { "instance#2:1": "45:1" } });
U(ex, { descendants: { "2:8259": { ref: "45:1" } } });
U(ex, { descendants: { "2:8280/2:8278/2:8277": { nodeText: "OK" } } });
Choose the clearest representation for the user's component-spec request. You may move reusable masters with M(), place instance previews with real component refs, or create concise component cards/summaries when that better communicates the component system.
// Move an existing reusable master into a component slot.
M(cardComponent, slot, 0);
// Or show an instance preview when previewing usage is clearer.
I(slot, { type: "instance", ref: cardComponent });
Shared styles and variables are applied through $style/... / $variableName tokens once the names are known (recipe R8, after fetch_context). Creating or editing a style/variable needs the eval_script writes in references/eval-script-recipes.md (W1-W4), which are unverified: read back and report actual values.
// Tokens whose names were confirmed in this session.
title = I(card, { type: "text", name: "Title", nodeText: "Overview", textStyle: "$style/Text/Title", fillPaints: "$style/Color/TextPrimary" });
U(card, { fillPaints: "$style/Color/CardSurface" });
When a token is unresolved, use the literal value from the confirmed style/variable read and state that token binding was unavailable.
There is NO "image" node type. Insert a frame, then G():
hero = I(container, { type: "frame", name: "HeroSection", width: 600, height: 400 });
G(hero, "stock", "team, collaboration, office, modern");
"stock"): Unsplash photos. Prompt: short English keywords, comma-separated."ai"): Only when user explicitly asks for generated images.Every apply_design() DSL call must first complete the "DSL Preflight (blocking)" section at the top of this file. eval_script and read-only tools do not trigger that gate.
apply_design.eval_script; says which recipes are device-verified.pixso://guides/* MCP resource guides.references/design-specification.md (opens in a new tab)references/dsl-rules.md (opens in a new tab)references/dsl-schema.ts (opens in a new tab)references/eval-script-recipes.md (opens in a new tab)references/guidelines.md (opens in a new tab)references/guidelines/code.md (opens in a new tab)references/guidelines/design-system.md (opens in a new tab)references/guidelines/landing-page.md (opens in a new tab)references/guidelines/mobile-app.md (opens in a new tab)references/guidelines/slides.md (opens in a new tab)references/guidelines/table.md (opens in a new tab)references/guidelines/tailwind.md (opens in a new tab)references/guidelines/web-app.md (opens in a new tab)references/mcp-guides.md (opens in a new tab)references/planning-clarification.md (opens in a new tab)references/style-guides.md (opens in a new tab)references/style-guides/mobile-01-brutalistluxury_light.md (opens in a new tab)references/style-guides/mobile-02-brutalistluxury_light.md (opens in a new tab)references/style-guides/mobile-03-bauhausdigital_light.md (opens in a new tab)references/style-guides/web-01-brutalist_light.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/pixso-code-to-designUse this skill before calling Pixso MCP `code_to_design` when the user asks to import or convert a web page URL, HTML, ZIP, static web artifact, or browser-rendered page into Pixso. Triggers include webpage to Pixso, URL/HTML/ZIP to Pixso, code_to_design, and import webpage into Pixso. URL input must be rendered/captured locally and packaged as a real `htmlBuffer`; never pass URLs directly or switch to approximate reconstruction without user confirmation./pixso-component-configGenerate or update Pixso Design-to-Code component parser JSON (`componentParsers` / component config) from the current Pixso desktop file, its local and subscribed-library component inventory, or an open source component library. Also used as the generate-config step inside the code-generation flow. Use when the user asks to create, extract, draft, validate, or update component parser config JSON. Always confirm the target code resource first, fetch current-file component facts through the Pixso MCP surface (`read_component_config_data`, `eval_script`, `query_nodes`, `get_node_dsl`), inspect representative node DSL before complex mappings, and never generate mappings from cached data, stale output, or guesses./pixso-design-to-codeDefault to Pixso get_design_context to turn design nodes, pages, components, or URLs into runnable code in the requested language or project stack, fully converting components, instances, variables, local styles, and assets, and performing visual verification. Fall back to pixso-read-dsl plus get_screenshot only when get_design_context is genuinely unavailable or returns an unusable result./pixso-prototype-interactionsRead, intelligently add, update, or delete prototype interactions through Pixso MCP. Use for navigation, back actions, overlays, component-state changes, scrolling, links, and interaction triggers, transitions, or timing. Excludes purely visual design and frontend application code. For requests combining design and interactions, finish the design first./pixso-read-dslUse Pixso desktop MCP get_node_dsl to inspect compact DSL, detach and expand instances when explicitly requested, recursively resolve variable, style, component, and asset references through eval_script recipes, retrieve complete node semantics or explicitly scoped full data, and serve as the code-generation fallback (DSL plus screenshots) only when get_design_context is genuinely unavailable or returns an unusable result.npx claudepluginhub pixsoltd/pixso-ai-integration --plugin pixsoOther plugins' skills for the same job