figma-implement
Skill6 starsChanged 25 days agoMITView on GitHub
Implement a Figma frame in PocketPal RN with 1:1 visual parity. Drives the implementer through metadata-first inspection, design-context-driven translation, vector-first assets, and visual-diff captures. Used for any redesign-rollout slice (FOU-112 phases) or any task that pins a canonical Figma file + node id.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- za4em/skillstheir own version, first seen Jun 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- za4em/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- benchSkill
- ios-routerSkill
- memory-profileSkill
- pmSkill
- review-l10nSkill
- review-prSkill
- run-e2eSkill
- run-pr-e2eSkill
- start-taskSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Call whoami once, then pull metadata, design context, and screenshots yourself.
- Distinctive: line 57
Verify each asset visually (crisp at target size in Preview), then capture the screen in light and dark to confirm it shows in the app.
- Very specific: line 62
Node-for-node coverage: Every get_metadata child has a code counterpart.
- Distinctive: line 71
Every property the visual depends on appears (dimensions, fills, border widths/colours, radii, padding, sub-icon sizes, asset choice).
- Distinctive: line 78
Before review, every in-scope screen has a side-by-side in the story dir (local story space, not the app branch):
- Very specific: line 93
After commits land and yarn lint && yarn typecheck && yarn test pass, reply COMPLETE.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Figma Implementation Workflow
Figma is the source of truth for layout, copy, colour, typography, and assets. The job is translation discipline, not improvisation.
When to use
- The task lists a Figma file key + node IDs (e.g. FOU-112 phase slices, any "implement frame X" request).
- The user shares a
figma.com/design/<fileKey>/<file>?node-id=...URL.
Switch instead: editing inside Figma → figma-use; new Figma design from code/intent → figma-generate-design; Code Connect mapping → figma-code-connect; non-design work → the normal pipeline (start-task / pocketpal-intake).
Pre-flight
The intent brief must contain the canonical Figma file key (e.g. RZxDJea4t6jnBZrV4YBacF), one or more in-scope node IDs (per-screen, per-component), and the light frame (plus dark, if light/dark parity is required). If any are missing, emit NEEDS_INPUT: with the exact unanswered questions and stop. Do not guess node IDs from the URL alone.
Step 0 — Load the Figma MCP tools
The Figma MCP tools are deferred; a bare call fails with "tool not found." Run ToolSearch with query figma and load get-metadata, get-design-context, get-screenshot, and whoami (exact names from the result). Two servers; prefer whichever is already live:
plugin:figma:figma— hosted (mcp.figma.com), reads any file byfileKey, no desktop app, OAuth-gated. If the search returns onlyauthenticate/complete_authentication, callauthenticate, hand the URL to the user, and wait. Do not improvise layout while you wait. Better for pulling a node from a file nobody has open.figma-local— the desktop app's Dev Mode server onhttp://127.0.0.1:3845/mcp(registered in this repo's.mcp.json). No auth; serves the file open in the app, sonodeIdalone is enough. Needs the desktop app running with the canonical file open. Better when the user is in the file.
Call whoami once, then pull metadata, design context, and screenshots yourself. If whoami genuinely errors (auth/transport), stop and report a real outage; never improvise layout from a screenshot alone.
Step 1 — Metadata first, then design context
For each in-scope node, in this order:
mcp__plugin_figma_figma__get_metadata(fileKey, nodeId)
mcp__plugin_figma_figma__get_design_context(fileKey, nodeId)get_metadatalists every child (id, name, x/y/w/h): every child must end up in code OR indesigner-asks.md. Silently skipping a child is a defect.get_design_contextreturns Auto Layout as JSX + tokenised values. It is representational: translate to RN + project tokens, never ship the Tailwind verbatim. If truncated, call it on smaller sub-trees.
Step 2 — Asset pipeline (vector-first)
| Source in Figma | Use | How |
DS icon already exported (src/assets/icons/<name>-{sm,md,lg}.svg) | Direct import | import {ChevronLeftLgIcon} from '../../../assets/icons'. Always prefer over hand-coded SVG components. |
DS icon NOT yet exported (Figma library 746:26281) | Export before coding the consumer | get_design_context on each size variant, curl the asset URL, save as src/assets/icons/<name>-{sm,md,lg}.svg, register in src/assets/icons/index.ts as <Name><Size>Icon. |
Iconify glyph in design context (e.g. fa6-solid:feather, material-community:*, fluent:*, typcn:code) | react-native-vector-icons (in deps) | Pick the matching family and glyph. |
| Vector illustration (hero art, mascot) | SVG via react-native-svg + react-native-svg-transformer | Export the node as SVG, save under src/assets/<flow>/, import as a component. |
| Photographic / raster | PNG @3x minimum | Export at 3× on-screen size (112×112 → 336×336). Bitmap only as a last resort. |
- Never hand-code an SVG when the Figma library has the icon exported; hand-drawn approximations drift in stroke, shape, and size.
- The sm/md/lg variants are different visual weights, not scales. Use the variant Figma uses; don't substitute.
- Normalise every saved Figma SVG before committing; read
references/svg-export.md. In short: stripvar(...)fills (grep -l 'var(' src/assets/icons/*.svgreturns nothing) and in the same step choose the colour:currentColor+color={theme.colors.<token>}for themed icons (a baked hex outside.svgrrcreplaceAttrValuesignores call-sitefill=/stroke=); multicolour brand marks keep their hexes, noted in the spec table; mindpreserveAspectRatio="none". No gate catches a baked hex: check dark mode yourself. - Verify each asset visually (crisp at target size in Preview), then capture the screen in light and dark to confirm it shows in the app.
Step 3 — Translation discipline
- Decode coordinates, don't ship them.
x=137, y=30, width=120on a 393-wide frame (137 + 60 = center) means "centered, 30 from top" → flex/padding/margin. Fixed numbers only for fixed-size things (icon sizes, hit targets, illustration boxes). - Node-for-node coverage. Every
get_metadatachild has a code counterpart; a deferred node gets a one-line code comment AND adesigner-asks.mdentry. - Tokens-only in screens. Figma variables →
theme.*tokens; zero raw hex insrc/screens/. A missing token is added via the paired-edit handshake intheming.md(I_UI8 pattern, as forspacing.xxl,accent.peach). - Reuse the DS. Existing
src/components/ui/components first; new internals undersrc/screens/<screen>/components/. - Auto Layout direction → flex direction;
gap→ RNgap;px-*/py-*→paddingHorizontal/Vertical;min-w-*→minWidth. Preserve every numeric value.
Step 3.5 — Per-component spec table (MANDATORY)
For every NEW or modified component, write a Figma → code table in the story doc BEFORE coding it and re-verify after; read references/spec-table.md for the format and the defect map. Rules:
- Every property the visual depends on appears (dimensions, fills, border widths/colours, radii, padding, sub-icon sizes, asset choice). A missing property means you don't know what Figma says: pull it before guessing.
- Status is
✓(matches),≈(close by design, note why), or✗(deviation, justified under deferred items indesigner-asks.md). - A literal value in code (
borderColor: '#some-hex') means its token binding belongs in the table; a missing token is a design-token follow-up. - Compare Figma hex with the resolved theme token; never map by similar-sounding names.
Step 4 — Visual-diff captures (MANDATORY gate)
Before review, every in-scope screen has a side-by-side in the story dir (local story space, not the app branch):
<STORY_DIR>/visual-diff/<screen>-figma.png
<STORY_DIR>/visual-diff/<screen>-sim.png- Figma render:
get_screenshot(fileKey, nodeId, maxDimension=2622)per screen (3× of a 393×852 frame on an iPhone-17-Pro-class device); download the PNG. - Sim screenshot: run the app on a sim whose logical width matches the design (iPhone 17 Pro = 393pt = 1206px @3x; confirm against the device under test). Capture via
driver.saveScreenshot()ine2e/specs/visual-capture/<TASK-ID>.spec.ts(PR-fix rounds:TASK-PR-<n>.spec.ts, so it stays gitignored) orxcrun simctl io <udid> screenshotby hand. This host has no iOS toolchain: sim runs go throughios-router. - No automated pixel-diff gate; the human eye is. The pipeline reviewer posts each pair with
tools/post-pr-visual-evidence.sh; that comment is the durable copy.
Light, dark, and RTL variants are captured separately (<screen>-light-figma.png, <screen>-light-sim.png, <screen>-dark-*.png, <screen>-rtl-*.png). Story-dir rationale, the parity gate, and restyle pre/post: docs/workflows/visual-capture.md, Flavour C.
Step 5 — Hand off to the parity reviewer
After commits land and yarn lint && yarn typecheck && yarn test pass, reply COMPLETE. The orchestrator routes to pocketpal-design-parity-reviewer (after the tester, before the pipeline reviewer). Handoff:
WORKTREE: <path>
TASK_ID: <TASK-ID>
STORY_DIR: <path>
FIGMA_FILE: <fileKey>
NODE_IDS: <comma-separated list of in-scope screen node ids>The reviewer checks the visual-diff/ captures and the node tree for coverage gaps, raw hex, token misuse, typography drift, and asset substitutions. Its NEEDS_FIXES routes back to you: fix BLOCKERs, then COMPLETE again.
Required implementer output
- Inputs — fileKey, node IDs covered, light/dark scope.
- Plan — per-screen outline before coding (assets, components, token additions, deviations).
- Changes — per-commit summary.
- Parity — per-screen "matches Figma" / "differs because X", citing
visual-diff/files. - Tests — lint/typecheck/jest results + the visual-capture spec path (gitignored, not committed).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

