Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

design-to-react-algorithms

БесплатноБез исполняемых скриптовНе проверен

Reverse-engineering a Sketch file (or Figma export with similar shape) into pixel-perfect React + CSS — the iteration mental model, tree reconstruction…

pproencaот pproenca★ 231 звезда на GitHub

Об этом скилле

dot-skills Design-to-React Conversion Best Practices

The reverse-engineering pipeline that converts Sketch files into pixel-perfect React + CSS, with regression-safe iteration as the load-bearing constraint. The skill is organized around the cascade effect of design-to-code conversion: a wrong call in stage N corrupts every output from stage N+1 onward, so categories are ordered by how much downstream they own.

The user's primary requirement — "each improvement doesn't cause regressions" — is enforceable only if the iteration loop, the layer tree, and the layout solver are correct before you start polishing styles. Read the rules in priority order.

When to Apply

  • Building a converter that ingests a .sketch file (or equivalent design source) and emits React + CSS
  • Iterating on an existing converter where each improvement risks breaking other components
  • Diagnosing why a converted component "almost matches" the design but visual-regression fails
  • Designing the snapshot-gate / baseline strategy for a design-to-code pipeline
  • Choosing between flexbox vs grid vs absolute positioning when the source is freeform geometry
  • Translating Sketch-specific primitives (MSImmutableFlexGroupLayout, attributedString, curvePoint, MSImmutableStyleCorners) into idiomatic CSS

Rule Categories by Priority

The ordering is the cascade — fix earlier stages first; later-stage fixes are wasted if the upstream tree is wrong.

Priority Category Impact Prefix
1 Reverse-Engineering Iteration Strategy CRITICAL iter-
2 Tree Reconstruction & Symbol Resolution CRITICAL tree-
3 Layout Algorithms (Flex/Freeform Inference) CRITICAL layout-
4 Coordinate & Geometry Math HIGH geom-
5 Visual Regression & Diff Algorithms HIGH diff-
6 Style Translation (Color, Gradient, Shadow, Border) MEDIUM-HIGH style-
7 Typography Math MEDIUM type-
8 Path & Shape Rendering MEDIUM path-

Quick Reference

1. Reverse-Engineering Iteration Strategy (CRITICAL)

2. Tree Reconstruction & Symbol Resolution (CRITICAL)

3. Layout Algorithms (CRITICAL)

Полный SKILL.md на GitHub

Установить design-to-react-algorithms в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

AGENTS.mdassets/templates/_template.mdmetadata.jsonreferences/_sections.mdreferences/diff-antialias-aware-pixelmatch-threshold.mdreferences/diff-baseline-per-component-not-per-page.mdreferences/diff-perceptual-hash-for-wrong-component-detection.mdreferences/diff-region-budgeted-tolerances.mdreferences/diff-subtree-bisection-to-localize-regression.mdreferences/diff-use-ssim-for-aa-content.mdreferences/geom-clipping-bounds-intersect-not-union.mdreferences/geom-compose-parent-transforms-before-emit.mdreferences/geom-rotation-is-css-transform.mdreferences/geom-round-only-at-leaves.mdreferences/geom-shape-group-bounds-via-union.mdreferences/iter-baseline-snapshot-gate.mdreferences/iter-bisect-from-root.mdreferences/iter-convert-symbols-before-instances.mdreferences/iter-freeze-design-tokens-first.mdreferences/iter-keep-known-good-branch.mdreferences/iter-one-family-per-pr.mdreferences/layout-detect-grid-via-2d-coordinate-clustering.mdreferences/layout-flex-group-enum-mapping.mdreferences/layout-ignore-layout-is-absolute-escape.mdreferences/layout-infer-flex-from-axis-projection-overlap.mdreferences/layout-preserve-wrapping-enabled.mdreferences/layout-promote-freeform-when-equal-gaps.mdreferences/layout-reverse-engineer-padding-not-margin.mdreferences/path-apple-smooth-corners-via-superellipse.mdreferences/path-curve-point-to-svg-cubic-bezier.mdreferences/path-flatten-boolean-ops-at-parse-time.mdreferences/path-honor-winding-rule.mdreferences/path-rectangle-with-fixed-radius-is-css.mdreferences/style-gradient-angle-via-atan2.mdreferences/style-per-corner-radii-shorthand.mdreferences/style-preserve-display-p3.mdreferences/style-reconcile-border-position.mdreferences/style-srgb-float-to-hex-via-gamma-correct-path.mdreferences/style-stack-multi-shadow-in-paint-order.mdreferences/tree-clipping-mask-is-stacking-context.md

FAQ

Что делает скилл design-to-react-algorithms?

Reverse-engineering a Sketch file (or Figma export with similar shape) into pixel-perfect React + CSS — the iteration mental model, tree reconstruction, layout inference algorithms, geometry math, visual-regression diffing, and the style/typography/path conversions that make "improvement without regression" enforceable. Trigger even if the user doesn't explicitly mention "algorithms" but is converting a design source into web code, building a design-to-code pipeline, or struggling to make incremental fidelity improvements without breaking previously-converted output.

Как установить скилл design-to-react-algorithms?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл design-to-react-algorithms запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить design-to-react-algorithms с