Pixso design to code
Skill PixsoLtd/pixso-ai-integration/skills/pixso-design-to-code
Use Pixso MCP `design_to_code` to convert Pixso design nodes, screens, components, or Pixso URLs into target-framework code, save generated files, localize assets, and run safe cleanup without changing visual output.From its SKILL.md
npx -y skills add PixsoLtd/pixso-ai-integration --skill pixso-design-to-codeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
9.2 KB, as published. Nobody here has run it
Pixso Design to Code
Use this skill when converting Pixso designs, pages, components, selected nodes, or Pixso URLs into frontend / client code.
Required tools
- Use
design_to_codefor React, Vue, HTML, Flutter, and ArkUI. - If the target framework is not supported above, generate HTML with
design_to_code, then convert it to the target framework by followingreferences/html-framework-bridge.md; the converted target-framework output must still continue through cleanup. - After generation, follow
references/resource-handling.mdto save files, download image / font assets, and replace temporary URLs. Prefer its recommended cross-platform Node script,references/resource-fetch.mjs, for fetching code, downloading assets, and replacing URLs; fall back to its manual strategy only if the script fails. - Use
get_screenshotafter generation to understand visual context for safe cleanup. - Follow
references/cleanup.mdfor class semanticization, DOM / CSS paired replacement, unusedidcleanup, and cleanup audit. - Use
refine_generated_codeonly when the user explicitly asks for responsive layout, CSS variables, Tailwind, DRY extraction, or project design-system alignment. - Keep
design_to_codeas the default entry point. Enterpixso-read-dsldirectly for explicit DSL/reference/full-data requests. Ifdesign_to_codegenuinely fails or returns output that cannot be used, fall back topixso-read-dsland combine node DSL withget_screenshotvisual context for code generation and verification. - Compact DSL is not raw Kiwi, decoded JSON, or a complete design-file snapshot. Do not treat it as a full raw input to the code-generation pipeline.
Input rules
- Extract Pixso URL
item-idvalues as node GUIDs; never pass full Pixso URLs todesign_to_code. - If multiple Pixso URLs are provided, extract every
item-id, preserve input order, and include all GUIDs. Do not process only the first URL unless explicitly requested. design_to_code.guidsmust always be an array:['node:id']for one node, or multiple GUIDs for multiple nodes.- Use
[]only when the user explicitly asks for the current Pixso selection, or no concrete node is provided and the current selection is the intended target. - For related pages / flows, pass multiple GUIDs together in one
design_to_codecall by default to preserve prototype links, navigation, and interaction context. - Split GUIDs into separate
design_to_codecalls only when the user explicitly asks for independent pages / screens, standalone outputs, or no cross-page relationships. - If the target framework is unclear, infer it from the project; if uncertain, ask or default to HTML and explain.
- Do not pass unsupported framework names to
clientFrameworks; use the HTML bridge instead.
Required workflow
- Confirm target and framework. Determine GUIDs from URLs / selection and decide whether the target is
react,vue,html,flutter, orarkui. - Call
design_to_code. For supported frameworks, set the matchingclientFrameworks; for unsupported frameworks, sethtmlfirst and convert by following the HTML bridge rules. Useget_variantsfirst only when the user asks for states, interactions, or variants. If the call genuinely fails or its result cannot be used, record the reason, usepixso-read-dslto retrieve node structure and referenced data, callget_screenshot(guid)for visual context, and generate code from both sources. Continue fallback output through the same resource, cleanup, and verification workflow. - Build a page manifest. For every generated page / code entry, track
guid, output file, and status. - Process every output file. Each file must complete: save -> resource handling ->
get_screenshot(guid)-> Phase A cleanup -> Phase B cleanup -> verification. - Fix necessary integration issues. Fix asset paths, invalid code, or project-entry issues without rewriting or redesigning.
- Refine only on request. Do not apply optional refinement when the user did not ask for it.
- Report per file. Include output location, framework, resource status, cleanup audit, retained-item reasons, and known differences.
Multi-page / multi-node gate
When there are multiple GUIDs or multiple generated code entries:
- Each output file is an independent delivery unit.
- One file reaching
delivereddoes not complete the whole task. - Every file must complete resource handling, screenshot capture or reported failure, Phase A, Phase B, and verification.
- Final response must include a per-file cleanup audit table, not only a global summary.
Hard gates - forbidden shortcuts
- Forbidden: using
get_node_dslfor ordinary code generation before actually callingdesign_to_codeor confirming that its result is unusable. Explicit DSL/reference requests are exempt; a post-failure code-generation fallback must enterpixso-read-dsl. - Forbidden: passing unsupported framework names to
clientFrameworks. - Forbidden: skipping
references/html-framework-bridge.mdduring HTML bridge work, or using the bridge as an excuse to redesign, refactor, or abstract components. - Forbidden: delivering target-framework code immediately after HTML bridge conversion without continuing through resource handling, screenshot context, Phase A cleanup, and Phase B cleanup.
- Forbidden: passing full Pixso URLs or a string
guidsvalue todesign_to_code. - Forbidden: processing only the first GUID when multiple URLs /
item-idvalues were provided. - Forbidden: splitting related pages by default when it may lose prototype links, navigation, or interaction context.
- Forbidden: stopping after
design_to_codeor after resource handling without screenshot context and cleanup. - Forbidden: treating multi-page work as complete when only one output file passed cleanup and verification.
- Forbidden: leaving unexplained temporary localhost / Pixso export URLs in final code.
- Forbidden: deleting
idvalues still referenced by CSS, JavaScript, tests, anchors, ARIA, orlabel for. - Forbidden: changing visual appearance, layout hierarchy, interaction semantics, CSS declarations, selector priority, state styles, or responsive behavior during cleanup.
- Forbidden: changing class token counts during cleanup. Each existing class token may only be renamed to one replacement token; do not turn one class into base + modifier tokens.
- Forbidden: adding inferred state / modifier classes such as
active,selected,current,disabled,open, oris-*unless already present in the generated code or explicitly requested by the user. - Forbidden: introducing unrequested dependencies, CSS frameworks, component libraries, design systems, naming systems, broad refactors, or refinement tags.
- Forbidden: reporting only one global cleanup audit when multiple output files were generated.
Fallbacks
- If a Pixso URL lacks
item-id, request a node-specific URL or confirm current selection. - If
design_to_codefails because a GUID is invalid, re-check the URLitem-idor current selection. - If parameters and GUIDs are correct but
design_to_codestill fails or returns unusable output, usepixso-read-dslto retrieve node DSL and required references, then callget_screenshot(guid). Use DSL for structural/layout constraints and the screenshot for visual verification, and explicitly report that fallback was used. - If
get_screenshotfails, continue static cleanup where safe and report that visual context was unavailable. - If asset downloads fail, keep reproducible details and list missing assets explicitly.
- If the generated structure does not fit the project, make the smallest necessary adaptation and report it.
Completion
Before final response, confirm:
- target GUIDs / current selection and target framework were identified;
design_to_codewas called with arrayguids; if it failed or returned unusable output, the reason was recorded andpixso-read-dslnode DSL, referenced data, and screenshot context were used for fallback generation and verification;- if the target framework is unsupported by
design_to_code, HTML bridge conversion was completed 1:1 by followingreferences/html-framework-bridge.md, and the converted target-framework output continued through cleanup; - all generated files were saved or returned as requested;
- assets were localized, or missing assets were reported;
- each output file got screenshot context or a stated screenshot failure;
- each output file completed Phase A and Phase B cleanup following
references/cleanup.md; - cleanup audit reports found / removed or replaced / retained counts for temporary URLs, Pixso node-style
idvalues, and Pixso node-style classes; - no inferred state / modifier classes were introduced;
- no unintended redesign, broad refactor, or new dependency was introduced.