Agent skill

Design To React Algorithms

by pproenca in pproenca/dot-skills

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…

MITAuto-check passedFrontend & Design

Install Design To React Algorithms

skills CLI
$ npx skills add pproenca/dot-skills --skill design-to-react-algorithms -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pproenca/dot-skills design-to-react-algorithms --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pproenca/dot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.experimental/design-to-react-algorithms .claude/skills/design-to-react-algorithms && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
design-to-react-algorithms
GitHub stars
214
Token cost
~2.9k tokens
SKILL.md length
846 words
Files
51 (incl. references, assets)
Skills in repo
182
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 8 steps: Reverse-Engineering Iteration Strategy… → Tree Reconstruction & Symbol Resolution… → Layout Algorithms (CRITICAL) → …
  • Even if the user doesnt explicitly mention algorithms but is converting a design source into web code
  • SKILL.md covers When to Apply, Rule Categories by Priority, Quick Reference and How to Use, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Design To React Algorithms is an agent skill from pproenca/dot-skills. 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…

Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 53 other files, including reference files and assets (for example `AGENTS.md`, `assets/templates/_template.md` and `metadata.json`).

It sits in Frontend & Design, covering Design to code, Visual regression testing and Reverse engineering and malware. It works with React and Figma. The repository describes itself as: A collection of AI agent skills following the Agent Skills open format. The licence is MIT.

When your agent uses it

  • Even if the user doesnt explicitly mention algorithms but is converting a design source into web code
  • Building a design-to-code pipeline
  • Struggling to make incremental fidelity improvements without breaking previously-converted output

Example prompts

  • “improvement without regression”
  • “t explicitly mention”
  • “/design-to-react-algorithms”

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Reverse-Engineering Iteration Strategy (CRITICAL)
  2. Tree Reconstruction & Symbol Resolution (CRITICAL)
  3. Layout Algorithms (CRITICAL)
  4. Coordinate & Geometry Math (HIGH)
  5. Visual Regression & Diff Algorithms (HIGH)
  6. Style Translation (MEDIUM-HIGH)
  7. Typography Math (MEDIUM)
  8. Path & Shape Rendering (MEDIUM)

What it can do on your machine

Read from SKILL.md and the folder at commit cf93c57. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Design To React Algorithms loads about 2.9k tokens when it runs, and up to ~41k if it reads all its reference files. Until then it costs about 150 tokens; SKILL.md has 846 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~150
When it runs · the whole SKILL.md, loaded when a task matches
~2.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~41k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from pproenca/dot-skills at commit cf93c57, republished under its MIT licence (© pproenca). 846 words, ~2,912 tokens.

Download SKILL.mdSave it as .claude/skills/design-to-react-algorithms/SKILL.md (or your agent's skills folder). This skill also uses 50 other files; get the full folder from GitHub.
name
design-to-react-algorithms
description
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.

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.

PriorityCategoryImpactPrefix
1Reverse-Engineering Iteration StrategyCRITICALiter-
2Tree Reconstruction & Symbol ResolutionCRITICALtree-
3Layout Algorithms (Flex/Freeform Inference)CRITICALlayout-
4Coordinate & Geometry MathHIGHgeom-
5Visual Regression & Diff AlgorithmsHIGHdiff-
6Style Translation (Color, Gradient, Shadow, Border)MEDIUM-HIGHstyle-
7Typography MathMEDIUMtype-
8Path & Shape RenderingMEDIUMpath-

Quick Reference

1. Reverse-Engineering Iteration Strategy (CRITICAL)
2. Tree Reconstruction & Symbol Resolution (CRITICAL)
3. Layout Algorithms (CRITICAL)
4. Coordinate & Geometry Math (HIGH)
Show full SKILL.md (366 more words)Show less
5. Visual Regression & Diff Algorithms (HIGH)
6. Style Translation (MEDIUM-HIGH)
7. Typography Math (MEDIUM)
8. Path & Shape Rendering (MEDIUM)

How to Use

  1. Read references/_sections.md for category definitions and the cascade rationale
  2. Start with the iteration strategy (iter-*) — without the regression gate, every other rule is just techniques
  3. Then tree (tree-*) and layout (layout-*) — these are the load-bearing structural decisions
  4. Then geometry (geom-*) and diff (diff-*) — these are the precision and validation layers
  5. Style, type, and path are the polish layer — high fidelity but mostly local impact

For a brand-new converter, follow the rules in priority order. For an existing converter, identify which stage owns the regression you're seeing (use [[diff-subtree-bisection-to-localize-regression]] + [[diff-perceptual-hash-for-wrong-component-detection]] to triage) and fix at the highest stage that owns it.

Reference Files

FileDescription
references/_sections.mdCategory definitions, impact levels, cascade rationale
assets/templates/_template.mdTemplate for adding new rules to this skill
metadata.jsonVersion, discipline, references
AGENTS.mdAuto-built TOC (regenerate via scripts/build-agents-md.js)

© pproenca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 50 other files (references, assets) in skills/.experimental/design-to-react-algorithms of pproenca/dot-skills.

  • SKILL.md
  • AGENTS.md
  • assets/templates/_template.md
  • metadata.json
  • references/_sections.md
  • references/diff-antialias-aware-pixelmatch-threshold.md
  • references/diff-baseline-per-component-not-per-page.md
  • references/diff-perceptual-hash-for-wrong-component-detection.md
  • references/diff-region-budgeted-tolerances.md
  • references/diff-subtree-bisection-to-localize-regression.md
  • references/diff-use-ssim-for-aa-content.md
  • references/geom-clipping-bounds-intersect-not-union.md
  • references/geom-compose-parent-transforms-before-emit.md
  • references/geom-rotation-is-css-transform.md
  • references/geom-round-only-at-leaves.md
  • references/geom-shape-group-bounds-via-union.md
  • references/iter-baseline-snapshot-gate.md
  • references/iter-bisect-from-root.md
  • … and 33 more

Open the folder on GitHubat commit cf93c57

Compare with similar skills

Design To React Algorithms next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Design To React Algorithms compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Design To React Algorithms this skillpproenca/dot-skills214—~2.9kAutomated safety check: PassMIT
Figma To StaticLeoYeAI/openclaw-master-skills2.2k—~7.1kAutomated safety check: PassMIT
Design To CodeMigoXLab/coderio1142 repos~1.2kAutomated safety check: PassApache-2.0
Wonder BlocksKhan/wonder-blocks163—~3.2kAutomated safety check: PassMIT
Figma Codegenawdr74100/figwright977—~4.2kAutomated safety check: PassMIT
Frontend UI StandardsMaxHan7/frontend-ui-standards-skill106—~2.4kAutomated safety check: PassMIT

Similar skills

  • Figma To Static

    LeoYeAI/openclaw-master-skills

    Convert Figma design files to pixel-level mobile-first static HTML/CSS pages.

    2.2k GitHub stars~7.1k tokensUpdated 2 mo ago
    Frontend & DesignAuto-check passed
  • Design To Code

    MigoXLab/coderio

    Pixel-perfect Figma to React conversion using coderio. An agent skill from MigoXLab/coderio.

    114 GitHub starsUsed in 2 repos~1.2k tokens
    Frontend & DesignAuto-check passed
  • Wonder Blocks

    Khan/wonder-blocks

    Implements user interfaces using the Wonder Blocks (WB) design system — Khan Academy's React component library.

    163 GitHub stars~3.2k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Figma Codegen

    awdr74100/figwright

    Generate framework-aware code from a Figma design. An agent skill from awdr74100/figwright.

    977 GitHub stars~4.2k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Frontend UI Standards

    MaxHan7/frontend-ui-standards-skill

    A skill your agent uses when implementing, refactoring, or reviewing frontend UI across SwiftUI, React, React Native, Flutter, web, or mobile apps.

    106 GitHub stars~2.4k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Cds Design To Code

    coinbase/cds

    Turn Figma designs into CDS React (cds-web) or React Native (cds-mobile) code.

    506 GitHub stars~4.9k tokensUpdated yesterday
    Frontend & DesignAuto-check passed

More from pproenca/dot-skills

All 182 skills in this repo
  • Audio Voice Recovery

    pproenca/dot-skills

    Audio forensics and voice recovery guidelines for CSI-level audio analysis.

    214 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Codemod React Pipeline

    pproenca/dot-skills

    Guided, scripted pipeline for running JSX/TSX/React codemods safely across large legacy codebases.

    214 GitHub stars~1.6k tokensUpdated 1 mo ago
    Auto-check passed
  • Dev Rfc

    pproenca/dot-skills

    Create well-structured RFCs and technical proposals for software projects.

    214 GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Dx Harness

    pproenca/dot-skills

    Developer-experience friction auditing and fixing — slow onboarding, repeated manual setup steps, missing bootstrap/reset/seed scripts, undiscoverable conventions.

    214 GitHub stars~1.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Language Spec Author

    pproenca/dot-skills

    Turn a rough idea for a language into a complete, implementable specification — a DSL, query, config/data, template, or protocol language — by interviewing the author dimension by dimension until…

    214 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Python Pep Author

    pproenca/dot-skills

    Drafting Python Enhancement Proposals (PEPs) — proposing a Python language feature, a standard library change, an interoperability standard, or an informational/process document for the Python…

    214 GitHub stars~2.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Design To React Algorithms

What does Design To React Algorithms do?

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…. Design To React Algorithms is an agent skill from pproenca/dot-skills. 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.

When should I use Design To React Algorithms?

Design To React Algorithms fits situations like: even if the user doesnt explicitly mention algorithms but is converting a design source into web code; building a design-to-code pipeline; struggling to make incremental fidelity improvements without breaking previously-converted output.

How do I install Design To React Algorithms in Claude Code?

Run `npx skills add pproenca/dot-skills --skill design-to-react-algorithms -a claude-code`. Or copy the skill folder (skills/.experimental/design-to-react-algorithms in pproenca/dot-skills) into .claude/skills/design-to-react-algorithms in your project. Claude Code loads it when a task matches its description.

How do I install Design To React Algorithms in Codex?

Run `npx skills add pproenca/dot-skills --skill design-to-react-algorithms -a codex`. Or copy the skill folder (skills/.experimental/design-to-react-algorithms in pproenca/dot-skills) into .agents/skills/design-to-react-algorithms in your project. Codex loads it when a task matches its description.

Can I use Design To React Algorithms in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pproenca/dot-skills --skill design-to-react-algorithms -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/design-to-react-algorithms, .gemini/skills/design-to-react-algorithms, .github/skills/design-to-react-algorithms and .opencode/skills/design-to-react-algorithms in your project.

What does Design To React Algorithms need to run?

SKILL.md names no scripts, command-line tools or credentials: Design To React Algorithms is instructions for the agent only.

Does Design To React Algorithms access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Design To React Algorithms safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Design To React Algorithms use?

Design To React Algorithms is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Design To React Algorithms use?

About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 38k tokens, read only when the agent opens those files.

What are the alternatives to Design To React Algorithms?

Skills that share tags, products or a category with Design To React Algorithms: Figma To Static (LeoYeAI/openclaw-master-skills, 2.2k stars), Design To Code (MigoXLab/coderio, 114 stars), Wonder Blocks (Khan/wonder-blocks, 163 stars) and Figma Codegen (awdr74100/figwright, 977 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Design To React Algorithms?

pproenca (a GitHub user) maintains it in pproenca/dot-skills, which has 214 GitHub stars. The repository holds 182 skills in this directory. The repository was last updated on August 15, 2026.

Source: pproenca/dot-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.