Xpersona
F

figma-pixel

CLAWHUB · Unverified

Figma-to-frontend visual QA workflow for building pages from Figma designs and tightening existing implementations. Captures the target page, exports the sel...

62
Rank
84
Safety
977
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 977 downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s177sk2hdmekb15js1fm623f7s84mqf9:figma-pixel
  1. Install using `clawhub skill install s177sk2hdmekb15js1fm623f7s84mqf9:figma-pixel` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/valerii-baidak/figma-pixel before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-valerii-baidak-figma-pixel/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

152,124 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: figma-pixel
description: Figma-to-frontend visual QA workflow for building pages from Figma designs and tightening existing implementations. Captures the target page, exports the selected Figma frame, runs pixel and layout comparisons, and produces local reports that guide spacing, typography, color, and structure fixes. Use when a user provides a Figma URL and asks to build, recreate, compare, match, restyle, or improve a web UI.
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
metadata:
  openclaw:
    emoji: 📐
    requires:
      env:
        - FIGMA_TOKEN
---

# Figma Pixel

## Overview

Use this skill when a user shares a Figma link and wants to build a page from that design or bring an existing implementation closer to it.
Treat Figma as the source of truth.

This skill has two layers:
- **Scripts** — automated: parse Figma URLs, fetch API data, export reference images, render pages with Playwright, run pixelmatch/OpenCV comparison, and generate reports.
- **Agent** — guided: the LLM reads Figma API data and diff reports, then writes or edits HTML/CSS to fix mismatches. Layout fixes are made by the agent, not by the scripts.

The scripts do not auto-patch code. They produce the data and artifacts the agent needs to make accurate, Figma-grounded fixes.

This skill should behave in a production-ready way:
- require a valid `FIGMA_TOKEN`
- prefer stable scripted flows over ad-hoc commands
- **never create working folders, scratch files, or runtime artifacts inside the implementation project directory** — all run outputs go under the skill's own `figma-pixel-runs/` directory (i.e. alongside this SKILL.md file)
- reuse shared Figma artifacts when possible
- stop clearly on real blockers instead of silently degrading

## Setup

Prerequisites:
- `FIGMA_TOKEN` must be set
- the target page must be reachable through a stable local or remote URL
- the implementation project must allow normal page rendering, fonts, and asset loading
- the runtime environment must already provide the required Node.js packages and browser executable

Install these packages in the host environment before using the skill:

```bash
npm install playwright pixelmatch pngjs @techstark/opencv-js --save-prod
npx playwright install chromium
```

On Linux, Chromium may also require system libraries:

```bash
apt-get update && apt-get install -y libnspr4 libnss3 libatk1.0-0 libatk-bridge2.0-0 libx11-xcb1 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2 libpangocairo-1.0-0 libgtk-3-0
```

This skill does not install dependencies at runtime.
Without these packages, system libraries, and a working browser executable, the skill will not work fully and some flows will fail immediately.
If required packages are missing, stop and report the missing dependency clearly.

Read `references/setup.md` for environment expectations.

## Workflow

1. Read the Figma source.
2. Parse the Figma URL and fetch or reuse Figma data.
3. Check fonts used in the design and a

README.md

# figma-pixel

`figma-pixel` is a skill for turning Figma layouts into real front-end pages and bringing existing implementations closer to the original design. It works with both **OpenClaw** and **Claude Code**.

Use it when you need to:
- build a page from a Figma mockup
- compare an existing page with a Figma frame
- find and fix visual differences between design and implementation
- improve layout, spacing, typography, and overall structure

## Required environment

- `FIGMA_TOKEN`
- host-installed Node.js packages: `playwright`, `pixelmatch`, `pngjs`
- a Chromium-compatible browser executable

You need a Figma personal access token for this skill to work.
The runtime reads `FIGMA_TOKEN` only to call the official Figma API for file metadata and image export. The token is not written to artifacts or logs.

Install the required packages before using the skill:

```bash
npm install playwright pixelmatch pngjs @techstark/opencv-js --save-prod
npx playwright install chromium
```

On Linux, Chromium may also require system libraries:

```bash
apt-get update && apt-get install -y libnspr4 libnss3 libatk1.0-0 libatk-bridge2.0-0 libx11-xcb1 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2 libpangocairo-1.0-0 libgtk-3-0
```

Without these packages, system libraries, and a working browser executable, the skill will not work fully.
Rendering, image diffing, or diff-region analysis may fail immediately depending on what is missing.

How to create a Figma token:
- https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens

Main packages used by the skill:
- `playwright`
- `pixelmatch`
- `pngjs`
- `@techstark/opencv-js`

## Installation

### Claude Code

Copy this skill into your global skills directory:

```bash
mkdir -p ~/.claude/skills/figma-pixel
cp -r . ~/.claude/skills/figma-pixel/
```

Or for a specific project:

```bash
mkdir -p .claude/skills/figma-pixel
cp -r . .claude/skills/figma-pixel/
```

Claude Code will auto-discover the skill and make it available as `/figma-pixel`.

### OpenClaw

Install via the OpenClaw hub or copy this directory into your OpenClaw skills folder.

## Security

`figma-pixel` requires `FIGMA_TOKEN` only to call the official Figma API.

- The token is used only in the `X-Figma-Token` header for requests to `https://api.figma.com`.
- Figma API requests are allowlisted to the `api.figma.com` hostname in code.
- The skill does not send the token to third-party services.
- The skill does not upload project files or screenshots anywhere.
- All comparison artifacts are written locally.
- Runtime scripts fail with explicit prerequisite errors when dependencies are missing.
- Exported image URLs returned by Figma are not persisted to stdout artifacts.

Repository:
- https://github.com/valerii-baidak/figma-pixel

_meta.json

{
  "ownerId": "kn7c179xnenzznfyhwxtwp4ww584n547",
  "slug": "figma-pixel",
  "version": "1.0.14",
  "publishedAt": 1777573498828
}

references/artifacts.md

# Expected artifacts

## Run directory contract

Store all run outputs under:

```text
figma-pixel-runs/<project-slug>/<run-id>/
```

Recommended subfolders:

```text
figma/
capture/
backstop/
pixelmatch/
final/
```

Create this structure with `scripts/init-run-dir.cjs`.

Try to produce and retain these files for each run:

- `figma/reference-image.png`
- `capture/captured-page.png`
- `pixelmatch/diff.png`
- `final/report.json`
- `final/summary.md`
- `backstop/backstop-run-summary.json` when Backstop is used
- `backstop/html_report/index.html` when Backstop succeeds far enough to write it

## Compact-first reading order

To reduce token use during iteration, inspect artifacts in this order:

1. `run-result.json`
2. `pipeline-summary.json`
3. `final/report.json`
4. `figma/viewport.json`
5. `figma/export-image-result.json`
6. `pixelmatch/report.json`
7. `backstop/backstop-run-summary.json`

Only read larger files like full markdown summaries, raw Figma JSON, or Backstop HTML when the compact artifacts are missing or do not explain the issue.
Only send images through vision/image analysis when compact artifacts and ordinary file reads still do not explain the mismatch. Keeping images as runtime assets does not meaningfully affect token use until they are passed into the model.

## Minimum useful output

Even when tooling is unstable, try to return at least:
- reference image path
- current screenshot path
- mismatch percentage or failure reason
- diff image path if available
- short human-readable layout summary

## Notes

- Backstop can fail because of missing CLI, bad reference naming, or unreachable local URL.
- pixelmatch should remain the reliable fallback.
- Preserve raw stdout/stderr summaries when tools fail.
- Use `scripts/generate-layout-report.cjs` at the end of the pipeline to emit both machine-readable and human-readable output.

references/figma.md

# Figma input layer

## Required input

The skill should trigger when:
- the user shares a Figma URL
- and asks to build, compare, match, or adjust implementation

## Scripts

### `scripts/parse-figma-url.cjs`
Parse a Figma URL and extract:
- file key
- node id
- raw pathname

### `scripts/fetch-figma-api.cjs`
Fetch Figma API data using:
- `FIGMA_TOKEN`

It stores:
- `figma-file.json`
- `figma-node.json` when a node id is present

### `scripts/export-figma-image.cjs`
Export the target Figma node as PNG using:
- `FIGMA_TOKEN`

It stores:
- `reference-image.png` when the Figma image export endpoint succeeds for the target node

## Notes

- Use the exact frame/node the user points to.
- Do not guess the intended frame when the link already contains `node-id`.
- Figma screenshots and Figma API metadata should be treated as the design source of truth.

Sponsored

Ads related to figma-pixel and adjacent AI workflows.