/pixso:pixso-read-dslfrom pixso
Inspects Pixso design node DSL via MCP, resolves variables, styles, components, and assets. Serves as code-generation fallback when get_design_context is unavailable.
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.
Use this skill to retrieve or explain node DSL, inspect variables/styles/components/assets used by a node, trace instances to their definitions, retrieve a clearly scoped full dataset, export assets from DSL references, or serve as the code-generation fallback when get_design_context is unavailable or unusable.
This skill supports local and Remote MCP. Call only tools offered by the current connection and follow their schemas; never hardcode an address or port. Local MCP operates on the open file. For Remote MCP, pass file_key from the design URL path or user input on every call as required by the schema. Obtain guid from item-id or an explicit node ID; do not substitute page-id or assume a current selection. Optional parameters in the examples below apply only when declared by the schema. Add the same file_key to remote examples; do not mechanically convert every parameter to snake_case.
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." This skill is read-only, so continue reads after reporting.schemaVersion and it is not 3, tell the user that the skill or the client must be updated. Continue read-only work; never write from this skill.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.get_mcp_server_info (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.get_node_dsl output.The external Pixso MCP surface has fourteen discoverable tools on Desktop, VS Code, and Remote. This skill uses the following tools plus the one-time handshake:
get_mcp_server_info — one-time session handshake.get_node_dsl — compact / complete / detached DSL for a node.query_nodes — resolve concrete components and variants from known ids.eval_script — Plugin API reads that replace the retired read tools.get_export_image — export nodes referenced by the DSL.get_screenshot — visual context for the code-generation fallback when get_design_context is unavailable or unusable.fetch_context — current file, page, and selection context when no GUID exists.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. Never call them and never claim you called them; use the recipes instead. (read_component_config_data remains available but is owned by pixso-component-config; this skill does not need it.)
Use this skill when the user:
get_node_dsl, node DSL, or compact DSL;get_design_context is absent, is reported as unregistered or not implemented, returns Method not found, or returns an unusable result.Normal design-to-code work is owned by pixso-design-to-code, which uses get_design_context as its only entry point. Code generation enters this skill only when get_design_context is genuinely unavailable or returns an unusable result. Explicit DSL, reference, or instance detachment/expansion requests may still enter directly. A code-generation fallback must combine node DSL with get_screenshot visual context for generation and verification. Node conversion failures, permission errors, and asset download failures do not trigger this fallback; report them instead. Compact DSL is not raw Kiwi, decoded JSON, or a full-file snapshot.
get_node_dsl: use simplify: true, isDetachInstance: false by default for compact DSL; use simplify: false, isDetachInstance: false only when the user explicitly wants the complete tree-shaped DSL for the requested node in one response. Use isDetachInstance: true only when the user asks to detach instances, expand their children, or inspect their contents as ordinary nodes.query_nodes: resolve concrete components from known component ids; resolve component-set variants with nodeIds: [{ nodeId, variantName }] and use the returned real component guid for design editing.eval_script: read-only Plugin API access. Use it for pages, variables, local styles, subscribed-library style/variable values, component-set variant children, and fallback subtree reads. Read the recipes first; eval_script is registered as a read-level tool, so reads work in read-only files and previews.get_export_image: export vectors or images by node GUID.get_screenshot: single-node screenshot for the code-generation fallback; it takes one guid, not an array.item-id, a user-provided GUID, or current selection (fetch_context). If the user only says "full", clarify the scope using the full-data reference.get_node_dsl({ guid, simplify: true, isDetachInstance: false }), inspect roots and refsIndex, and continue through the reference closure. When the user explicitly requests all tree-shaped data for the node in one response, call get_node_dsl({ guid, simplify: false, isDetachInstance: false }). Only for explicit detachment/expansion requests, call get_node_dsl({ guid, isDetachInstance: true }). Detachment takes precedence over simplify: read expanded instance children from pixTreeNodes, expect empty pixComponentTreeDslNodes, and retain instance componentName when available. Detachment does not return every node property. Never describe any mode as raw Kiwi or decoded JSON.roots, including children and override. In detached mode, traverse pixTreeNodes and all childNode entries. Never inspect only top-level node fields.refsIndex, preserving the property location that gives each reference its meaning. refsIndex is a fast skeleton index, not a complete resource inventory: compact DSL does not expand instance internals or folded vectors. When the user needs a definitive style/variable id set, run the bounded node resource sweep (recipe V4) instead of assuming refsIndex is complete; otherwise report the coverage limitation. Do not assume detached output has refsIndex.get_node_dsl for every unvisited componentRef, collect newly discovered references, and repeat with a visited set until no new component references appear. Detached output already expands instance children, so do not apply this closure by default.eval_script recipes (V1/V2 and V3 for library variables, S1 and S3 for styles). If the relevant resources may sit inside instances, run the bounded node resource sweep (V4) first and resolve the ids it returns with the same recipes. Add variable aliases to the pending set until no new aliases appear; a variable read can fail once right after a file switch, so retry once. In detached mode, handle only references actually present and resolvable in the returned tree.pendingComponents = componentRef values actually used by roots
visitedComponents = empty set
while pendingComponents contains an unvisited ID:
call get_node_dsl({ guid: componentRef })
mark the ID visited
recursively scan returned roots and override values
add new componentRef, variable, style, vector, and asset references
componentRef identifies the component or concrete variant used by the instance and is the primary structural lookup key.componentSetRef identifies the containing component set; it does not replace componentRef.componentNodeRef aligns an instance child with its component-definition node for inherited values and overrides.refsIndex.componentSets[].variants is a lightweight summary. When a complete variant list or variant axes are needed, enumerate the component-set variant children with the eval_script recipe (C2), then resolve a concrete variant with query_nodes({ nodeIds: [{ nodeId, variantName }], searchDepth: 1 }) and use the returned real component guid. searchDepth is required; use 1-3 for targeted lookups. Use get_node_dsl(componentSetId) for component-set structure.eval_script component inventory recipes (C1 local, C3 libraries) only for an explicitly requested inventory, variant axes, or candidate filtering, never as the default next call.pixso.getNodeById(id).key; for an INSTANCE read await node.getMainComponentAsync() first (recipe C5). The library/local component lists are inventories only and are not reliable key lookups (measured 1/152 and 8/152 coverage).refsIndex.variables[].id and refsIndex.styles[].id; do not re-parse IDs from display strings when indexed IDs exist.variable:<id>$<modeId>, resolve the raw <id> with pixso.variables.getVariableByIdAsync (recipe V1). When a mode ID exists, select the value by mode name from the returned variable's valuesByMode. Without a mode ID, use the first mode declared in the variable collection's modes order and state that convention.style:<id>, resolve the raw <id> with pixso.getStyleByIdAsync (recipe S1); fall back to a local style inventory (S2) for local ids, and read a subscribed library's style values with pixso.getStylesInLibraryAsync(libraryFileKey) (recipe S3) when the id belongs to a library. Library style values are a pure read that works in design and preview.pixso.teamLibrary.getAvailableLibraryVariableCollectionsAsync() / getVariablesInLibraryCollectionAsync(collectionKey)), which returns valuesByMode keyed by mode id and works in preview; no import is required. A library variable's DSL id is <prefix>/<localId>: pass it directly to getVariableByIdAsync, and do not match it against teamLibrary keys — teamLibrary only supplies collection/mode names and values.eval_script style/variable reads do not report isLocal / source / libraryId uniformly, so do not infer origin from an ID format; when a resource comes from a subscribed library, it is identified through the library metadata/value recipes (S3/V3/C3), not through the id shape.vectorRef is an exportable node GUID. Export only when the connection offers get_export_image, using formats allowed by its schema; Remote MCP also requires file_key. SVG example:get_export_image({
guid: vectorRef,
exportSettings: {
constraint: { type: 1, value: 1 },
imageType: 3
}
})
refsIndex.assets contains image hashes, not node GUIDs. Never pass an asset hash directly to get_export_image.roots whose fills[] contains type === "asset" with the matching asset ID, then export that node's id.http(s) download URL from that block, preserve its complete signature, query parameters, and encoding, and download immediately with curl or an equivalent raw HTTP client. Do not use tools that summarize webpages.imageType (1=.png, 2=.jpeg, 3=.svg; other formats follow the current schema), then the response Content-Type. Generate a filename that distinguishes the node and export settings and specify the output path explicitly instead of relying on curl -O. Use bounded concurrency for batches and reuse identical URLs. Verify HTTP success and a non-empty file, check available Content-Type headers, and reject explicit type conflicts or error pages as assets.curl -O download may still have no extension because curl uses the last segment of the URL path as the filename. Use curl --fail -o 'export.<ext>' '<full download URL>' to name the file explicitly, replacing <ext> with the actual export format's extension instead of hardcoding .png.get_export_image again with the same file, node, and export settings to obtain a new URL, at most once. An ordinary 403 does not establish expiry; report permission and other errors accurately. This renewal does not authorize rerunning get_design_context or re-exporting an entire asset batch. Its assetDownloads must be saved using delivered fileName values. Do not retain temporary URLs in delivered code.When the user asks for DSL analysis, report query context, node overview, layout and sizing, content and visual properties, component relationships, resolved references, and conclusions or exceptions in that order. Query context must state the GUID, simplify mode, isDetachInstance mode, data source (get_node_dsl and which eval_script recipes resolved references), and whether the IDE/MCP Host reported truncation. Conclusions must list default omissions or inheritance, unresolved IDs, failures, and tools still needed.
When the user asks only for raw DSL, return or save it without forcing an analysis report. When the user asks about one property, return only the relevant parts.
simplify: false for compact DSL, reference analysis, or code-generation fallback. Use complete tree-shaped DSL only when the user explicitly requests all node data in one response.isDetachInstance to obtain more properties. It requires explicit detachment/expansion intent, and its result must not be interpreted through compact roots/refsIndex fields.children, override, or references discovered in component DSL.refsIndex as a complete resource inventory. Instance internals and folded vectors are deliberately not expanded; use the bounded sweep (V4) or continue the DSL on componentRef when the resource set matters, and report any coverage gap.getNodeById(id).key (and getMainComponentAsync() for instances) per recipe C5.variable: / style: prefixes or $modeId suffixes to the lookup APIs; pass only the raw id. For library variables pass the DSL <prefix>/<localId> id directly; do not match it against teamLibrary keys.eval_script recipe and never claim the retired tool ran.pixso-design-to-code for ordinary code generation: get_design_context is the only entry point. Use this skill as a code-generation fallback only when get_design_context is absent, is reported as unregistered or not implemented, returns Method not found, or returns an unusable result; explicit DSL/reference inspection or instance detachment/expansion requests remain supported.pixso.variables.getLocalVariablesAsync / getLocalVariablesAsync throws right after a file switch (error shaped like in getLocalVariablesAsync: <number>), retry the same read once before reporting the failure.eval_script is unavailable or rejects the read, report the limitation; do not replace the read with a guessed definition.simplify: true or calling simplify: false through curl/an equivalent raw HTTP client and saving the complete response for file-based analysis. Never choose for the user.roots, all children, and all override values; detached mode traversed pixTreeNodes and all childNode entries.componentRef in compact reference analysis was queried until the set stabilized; detached mode did not incorrectly apply that closure.getNodeById(id).key / getMainComponentAsync() rather than inferred from a component list.get_design_context unavailability or unusable result was recorded, DSL and screenshot context were used, and the fallback output continued through normal cleanup and verification.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
pixso, design-tokens, dsl-inspection, code-generation-fallback
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-editingUse when an agent needs to create, modify, inspect, or refine UI designs inside Pixso with Pixso MCP tools, including Pixso canvas editing, eval_script property edits, Pixso DSL or apply_design work, UI mockups, design review fixes, screenshot-based visual checks, node or frame updates, Pixso design drafts, interface design, visual mockups, canvas changes, or UI redesign requests.npx claudepluginhub pixsoltd/pixso-ai-integration --plugin pixsoOther plugins' skills for the same job