pp-d2c-rn

Generates React Native page code and sliced image assets from Figma design URLs.

4|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/double-coding-lab/PixelPrint --skill pp-d2c-rn-double-coding-lab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pp-d2c-rn
Source: https://github.com/double-coding-lab/PixelPrint/tree/main/templates/skills/pp-d2c-rn
Command: npx skills add https://github.com/double-coding-lab/PixelPrint --skill pp-d2c-rn-double-coding-lab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Converting Figma design mockups into runnable React Native pages by hand is slow and error-prone: developers must inspect every layer, export images, translate layout coordinates, and visually verify the result. This Skill automates that entire design-to-code pipeline for RN projects. ## Core Features & Use Cases - Figma-to-RN code generation: Reads a Figma design URL via the Figma REST API, parses the layer tree using a prefix protocol (sub-, img-, bg-, btn-, fixed-, etc.), and produces JSX plus StyleSheet files with rpx responsive sizing. - Automated slicing and visual QA: Pre-slices image assets through a shared slice-manifest contract, then runs a hard rule-checking script (check-rules.mjs with 22 exit-1 rules and four gates) to reconcile generated code against cached Figma node data. - Cross-framework adaptation: Supports adapter presets (e.g., xtaro, taro) that remap RN tags, props, and screen-width APIs to RN-like cross-platform frameworks. - Use Case: Paste a Figma mobile page URL into your AI coding agent; it verifies the token, scans layers, slices images, generates the ScrollView-based page skeleton and per-block components, and validates fidelity before delivery. ## Quick Start Provide a Figma design URL and ask the agent to convert this design into a React Native page in the configured output directory.

Frequently Asked Questions about pp-d2c-rn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a Figma design to React Native code?▼

Provide the Figma design URL to the agent after installing the skill and configuring pp-d2c.config.json with your Figma token. The skill fetches the node tree via the Figma REST API, slices images, and generates JSX plus StyleSheet files with rpx responsive sizing.

How to make Figma layers work with design-to-code generation?▼

Designers must rename layers using the prefix protocol: sub- for blocks, img- for images, bg- for backgrounds, btn- for tappable areas, fixed- for screen-pinned elements, and x- to ignore layers. The skill parses these prefixes to decide slicing and code structure.

Does Figma to React Native conversion support Taro or xtaro?▼

Yes, through adapter presets configured in pp-d2c.config.json. The adapter maps RN tags like View and Image to target framework components, renames props, and swaps screen-width APIs such as Dimensions for xGetSystemInfoSync or getSystemInfoSync.

Why does generated RN code fail the check-rules validation?▼

check-rules.mjs enforces 22 exit-1 rules covering node-id coverage, size fidelity, padding accuracy, and slice-manifest reconciliation. Common failures include missing data-node-id attributes, hallucinated colors not present in Figma fills, or images referenced outside the slice manifest.

Can I use this without a Figma personal access token?▼

No. The skill requires a Figma Personal Access Token with File content read permission, stored in the project root .env as FIGMA_TOKEN. It verifies the token via the /v1/me endpoint before any processing and stops if verification fails.