/pixso:pixso-component-configfrom pixso
Generates or updates Pixso Design-to-Code component parser config JSON from Pixso desktop files, library inventories, or open source libraries. Validates config via MCP tools before generating mappings.
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; scripts run unread.
Use this skill to generate Pixso Design-to-Code component parser config JSON. The goal is to map stable Pixso component families to target code components, imports, props, text, icons, child traversal, object data, and table data rules.
The external Pixso MCP surface has fourteen discoverable tools: 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. Remote MCP exposes the same discoverable set.
This skill generates component parser config from read_component_config_data, the current-file component-family interface, and reads supporting node structure with get_node_dsl and query_nodes. The tool read_components is retired together with the other retired read/write helpers of the pre-consolidation surface: it does not exist, so never call it and never claim you called it. read_component_config_data is retained because its families come from the host DSL/D2C pipeline (componentNormName/aliasName/propDefMap/attr/subLayers); eval_script can only approximate that data, so the eval-script component inventory is the fallback path described in references/eval-script-recipes.md.
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.Before generating JSON, resolve which code resource the current Pixso file should map to:
Which code resource should this Pixso file map to for component config generation? 1. A local component library, in which case provide the resource path; 2. An open source component library, in which case provide the library name, documentation link, or local docs path.1 without a path, ask for the local resource path before continuing.2 without enough information, ask for the library/package name and official documentation link or local docs path before continuing.Before generating any component config, verify Pixso MCP connectivity and fetch current-file component facts with the injected Pixso MCP tools:
get_mcp_server_info({}) # session handshake, once per task
read_component_config_data({}) # MAIN PATH: current-file component families (no arguments)
fetch_context({ "include_schema": false }) # current file context; also refreshes client token stores
query_nodes({ "nodeIds": ["<node id>"], "searchDepth": 1 }) # id resolution and targeted reads
get_node_dsl({ "guid": "<node_id>" }) # representative node sampling
read_component_config_data({}) is the main path: read its families first (see "Current-File Component Facts"). The eval-script recipes are only the fallback for when that interface is unavailable; read references/eval-script-recipes.md before writing any fallback inventory script. Keep every script scoped and return counts plus bounded samples; never dump the whole file or a whole library.
If injected tools are unavailable, use the fallback script bundled with this skill. Resolve the script path from this SKILL.md directory, not from an old external toolbox path. From the repository root, the command is:
node --experimental-strip-types .\skills\pixso-component-config\scripts\fetch-pixso-components.ts --summary-only --max-families 80
The fallback script calls eval_script over the local MCP HTTP endpoint after the get_mcp_server_info handshake; it is a fallback inventory path, not a substitute for read_component_config_data. Fetch representative node DSL through the same script:
node --experimental-strip-types .\skills\pixso-component-config\scripts\fetch-pixso-components.ts --node-dsl "59194:149"
Default MCP endpoint: http://127.0.0.1:3667/mcp. If Pixso uses another port, pass --mcp-url.
If Pixso MCP cannot connect, or a required MCP call for the current workflow (read_component_config_data, or get_node_dsl / query_nodes sampling; eval_script inventory in the fallback path) fails in both the injected-tool and the fallback-script paths, stop. Do not continue from cached data, stale output, inferred component names, or manual guesses. Ask the user to open the current Pixso desktop file, enable MCP, confirm endpoint/port, and retry.
Call read_component_config_data({}) to fetch design-side component data required for config generation from the current file. This interface is the dedicated entry point for component config and the main path of this skill. It takes no arguments and returns one item per local component family:
{ id, name, key, propDefMap?, attr?, children?, subLayers? }
children (variant children); standalone components use subLayers (child-layer candidates) and may carry attr.key comes from the host DSL/D2C pipeline (componentNormName || aliasName || name); prefer it as the component config key.id is the local node id; use it only for follow-up query_nodes / get_node_dsl, never as the config key.Usage rules:
componentSet live under the item's children, so do not use variant names as component-family keys.key as the component parser config key; use name only as the original design-side name and manual review aid.propDefMap to identify design-side variant / props axes, then combine those facts with target component-library props documentation to generate props.mappings.attr as visual-attribute candidates; generate attr config only when the visual attribute clearly maps to target component prop semantics.subLayers as a child-layer candidate summary. First-level subLayers define the valid scope for traverse.filter; deeper children can help identify text.nodeName, icon candidates, object, and tableData structure.subLayers.type is the raw DSL node.type; do not infer slots or icons from type alone. Slot / icon rules must be confirmed from layer names, the target code component API, and representative node DSL when needed.get_node_dsl for every variant. Only sample representative node DSL when the interface data is insufficient to confirm complex fields.Use the fallback only when read_component_config_data is unavailable in the current environment (for example the client rejects the call or does not expose it) or its response is missing required fields. The fallback cannot fully rebuild the host-pipeline key / attr / subLayers data, so report in the final response that the request used the fallback path.
eval_script. Run recipe CC1 (pixso.getLocalComponents(), verified on a real client) to get local components and component sets with nodeId, names, types, and variant children. Use recipe CC4 when the file also places instances of subscribed-library components.componentPropertyDefinitions from a component node (code-confirmed; unverified on device) and identify variant / boolean / text / instance-swap axes. When the property API is unavailable, derive axes from the variant child names returned by CC2, for example Type=Primary,Size=Large, and state that the axes came from child names.get_node_dsl. Use the sampled compact DSL child tree for the direct child-layer, text, icon, object, and table structure that the interface returns as subLayers.Fallback rules:
id only for follow-up query_nodes / get_node_dsl, never as the config key.query_nodes fields, and emit attr only when a visual attribute clearly maps to target component prop semantics.traverse.filter; deeper children help identify text.nodeName, icon candidates, object, and tableData structure.node.type. Do not infer slots or icons from type alone; confirm slot / icon rules from layer names, the target code component API, and representative node DSL when needed.get_node_dsl for every variant. For variant-sensitive components, sample the default variant and one non-default variant.Read the bundled references as needed:
props.mappings, icon.childComponent, attr, traverse, object, tableData, @icons, or @text.package.json, exports, component directories, props definitions, and style entry. Do not guess imports when a repo is available.read_component_config_data({}) to get component families, design-side props, attr, and child-layer candidates. Only when that interface is unavailable or its response is missing required fields, use the eval_script fallback recipes (CC1, CC2, CC3 for prop axes, optionally CC4) or the fallback script to get raw components, variant axes, and library facts. Do not use retired tools.text, icon, attr, traverse, object, or tableData fields that the inventory still cannot confirm, inspect representative nodeIds with get_node_dsl; do not make DSL sampling the default full workflow.codeOptions unless the user explicitly asks.JSON.parse and state whether codeOptions is absent.When entered from the code-generation flow, still generate JSON with this skill; skip the first-action gate if the user already named a target library. If the user gave a path, write there; if the code-generation flow needs a file on disk, write .pixso/component-parsers.json (create the directory if needed). If .pixso/config.json already sets componentParsers, write to that path. If code still needs to be generated, hand the JSON to pixso-design-to-code, follow its get_design_context workflow, and pass the JSON as the componentParsers object to the code-generation call.
read_component_config_data (main path), use the returned item's key as the component config key candidate.--summary-only, use families[].name as the processed component config key; families[].kind distinguishes component-set from component, and families[].variantPropMap lists variant axes with their values derived from the component-set children (or the component property definitions when the client exposes them).eval_script inventory (CC1), use the returned component or component-set name as the config key candidate; type === "COMPONENT_SET" marks a component set. Use id only for follow-up reads.query_nodes as a fallback enumeration, use name of each returned component or component set as the config key candidate; use id only for follow-up reads.name for recognition and their key only as a library asset reference. Never treat a library key as a local node id or a config key.rawNames / keySources / page information; do not use raw variant names or variant samples as keys.name values such as Size=small, State=disabled as variant samples, not component family names.When the user provides a local path, treat it as a candidate code resource. First locate the real component-library boundary, then map components. Do not assume the path itself is the package root, and do not assume the library is Vue, React, or any fixed directory layout.
Use this general discovery order:
package.json, pnpm-workspace.yaml, lockfiles, rush.json, turbo.json, nx.json, lerna.json, tsconfig.json, vite.config.*, rollup.config.*, and unbuild.config.*. In a monorepo, identify the package that actually exposes components instead of using the repo root directly.main / module / types / exports, files, peer dependencies, dependencies, and style side effects. Do not infer package name from the directory name.src/index.*, components/index.*, barrel exports, plugin installers, auto-import resolvers, or documentation examples to identify public component names and import paths.props.*, types.*, interface.*, constants.*, component entries, component implementations, and generated .d.ts.__mainImports__ / __package__ only when the config should be installable and runnable.If the path points to an application rather than a component library, first find the actual component package that the app depends on or references locally. If that cannot be determined, ask the user which local package to map.
If source, types, examples, or docs conflict, prefer public exports and official examples. Put unresolved conflicts into the manual completion list.
When the user provides an open source library name, docs link, or local docs path, read official docs or local docs before generating imports, tag names, prop mappings, style entries, or package entries. Element Plus and Ant Design Vue are examples, not defaults.
If local source or documentation does not establish package, import, tag, or prop conventions, ask for those facts instead of guessing.
codeOptions by default.__imports__ for every emitted name tag.__mainImports__ and __package__ only when the target project needs them or the user asks for a complete installable config.@icons only if icon-prefixed layers or icon components are present.name, props, text, icon, attr, traverse, object, or tableData fields.props.mappings for key/value mapping. Mapping facts must come from propDefMap (main path) or the fallback prop axes (CC3) / variant children (CC2), the sampled DSL, and target library prop docs; never guess.nodeName, visual attr.mappings, props.mappings, or imports.Use when design variant prop names or enum values differ from the target UI library API. The engine reads aliasName || name and aliasValue || value. Outer mapping keys must match the source prop name exactly (case-sensitive), unlike component-family key normalization.
| Form | Meaning |
|---|---|
"modelValue": "value" | Rename prop key only |
"type": { "Primary": "primary" } | Map values only (like attr.mappings) |
"Type": { "name": "type", "values": { "Primary": "primary" } } | Rename key and map values |
"DocTag": "" or { "name": "" } | Suppress entire variant axis (no output for any value) |
"values": { "secondary": "" } | Suppress only that mapped value |
Example (design prop Type, value Primary to output type="primary"; secondary suppressed):
{
"button": {
"name": "el-button",
"props": {
"mappings": {
"Type": {
"name": "type",
"values": {
"Primary": "primary",
"Success": "success",
"secondary": ""
}
}
}
}
}
}
When generating:
aliasName: "type", use outer key "type", not "Type".aliasValue || value as read from DSL; if alias already yields primary, do not use "Primary".props.filter only for cross-prop generic values (md, default, false). Do not put prop-specific defaults (for example, secondary, medium, normal) in filter."" in values. To suppress an entire variant axis, use "PropName": "" or { "name": "" }.props.filter runs before mappings; empty-string suppress runs after mappings.read_component_config_data, first use the returned subLayers to judge direct child-layer names, text layers, and nested structure; call get_node_dsl only when required details are missing or complex structures need review. When the fallback inventory is used instead, derive the same judgment from the sampled DSL child tree.read_component_config_data id values, the fallback inventory id values, or the fallback script families[].id (component-set or component id); for a remote library key, resolve it to a local node first with query_nodes if the component is imported, otherwise report the remote definition as unavailable. Start with one representative node per component family; for variant-sensitive components, inspect at least the default variant and one non-default variant.guid even though it comes from a node id:get_node_dsl({ "guid": "59194:149" })
result.content[0].text for read_component_config_data and get_node_dsl when using injected MCP tools. The fallback script already parses this text and prints JSON.roots as the requested node tree and recursively inspect children; refsIndex contains lightweight variable, style, component-set, vector, and image references rather than complete definitions.componentRef to the component or concrete variant, use componentSetRef for the containing set, align instance children with definition nodes through componentNodeRef, and read instance differences from override. Query required componentRef values recursively instead of inferring structure from legacy DSL fields.roots / children, together with componentNodeRef and override when needed, to decide stable text.nodeName, icon.nodeName, slot/traverse rules, object mappings, and tableData structure.eval_script recipes using IDs from refsIndex. Do not treat compact DSL as a complete raw file or call default/inherited field omission data loss.attr only when they map cleanly to documented target component prop semantics.get_node_dsl for every raw component unless needed; sample enough variants to confirm layer names and state-dependent structure.nodeIds entry from the same family. If all fail, put that family in the manual completion list instead of fabricating rules.Return, in order:
JSON.parse passed and whether codeOptions is absent.Do not write a config file unless the user explicitly provides a file path, or the code-generation flow needs it on disk (write .pixso/component-parsers.json, or the path already set in config.json).
Before the final response, verify:
read_component_config_data, or the eval_script inventory recipes plus get_node_dsl sampling / the fallback script when the interface was unavailable);codeOptions was not added by default;agents/openai.yaml (opens in a new tab)references/component-config-tutorial.md (opens in a new tab)references/component-parser-json.md (opens in a new tab)references/component-parsers.md (opens in a new tab)references/eval-script-recipes.md (opens in a new tab)scripts/fetch-pixso-components.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub pixsoltd/pixso-ai-integration --plugin pixso6 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-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./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.Other plugins' skills for the same job