figma-implement
Skill2 starsChanged 3 months 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 committed 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 repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- benchSkill
- memory-profileSkill
- review-l10nSkill
- review-prSkill
- run-e2eSkill
- run-pr-e2eSkill
- start-taskSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
If any are missing, emit NEEDS_INPUT: with the exact unanswered questions and stop.
- Distinctive: line 43
Prefer whichever is already live.
- Very specific: line 59
If get_design_context returns truncated content, drill in: call it on smaller sub-trees instead of the whole frame.
- Distinctive: line 79
When you save a Figma SVG asset into the repo, normalise it before committing:
- Distinctive: line 92
Verify each asset visually before committing: open in Preview, confirm it renders crisp at the target size.
- Very specific: line 99
Node-for-node coverage: Every child the get_metadata walk returned has a code counterpart.
- Very specific: line 101
Reuse the DS: Use existing components in src/components/ui/ before building new ones.
- Distinctive: line 125
Every Figma property the visual depends on must appear.
- Very specific: line 127
If you find yourself writing a literal value (borderColor: '#some-hex') in code, the corresponding token binding belongs in this table.
- Distinctive: line 133
Before the PR is ready for review, every in-scope screen must have a committed side-by-side under:
- Very specific: line 142
Figma render: call get_screenshot(fileKey, nodeId, maxDimension=2622) for each screen.
- Very specific: line 146
If a screen has light + dark + RTL variants, capture each separately (<screen>-light-figma.png, <screen>-light-sim.png, …
- Very specific: line 150
After commits land and gates pass (yarn lint && yarn typecheck && yarn test), invoke the pocketpal-design-parity-reviewer subagent before …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
You are implementing a Figma design into PocketPal RN. Figma is the source of truth for layout, copy, colour, typography, and assets. The job is translation discipline, not improvisation.
When to use this skill
- 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.
When NOT to use this skill (switch to)
- Editing inside Figma → the
figma-useskill. - Generating a new Figma design from code/intent →
figma-generate-design. - Mapping a code component to a Figma component (Code Connect) →
figma-code-connect. - A non-design implementation task → the normal pipeline (
start-task/pocketpal-intake).
Pre-flight
The intent brief must contain:
- Canonical Figma file key (e.g.
RZxDJea4t6jnBZrV4YBacF). - One or more in-scope node IDs (per-screen, per-component).
- Light frame (and dark frame, 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 — they aren't in your tool list until you load their schemas, and a bare call fails with "tool not found." Load them first: run ToolSearch with the query figma to discover and load the Figma tools (you need get-metadata, get-design-context, get-screenshot, and whoami; read the exact names from the search result).
Two servers can serve these tools:
plugin:figma:figma— hosted (mcp.figma.com). Reads any file byfileKey, so it needs no desktop app, but it is OAuth-gated. If aToolSearchforfigmareturns onlyauthenticate/complete_authentication, nobody has authorized it in this session: callauthenticate, hand the URL to the user, and wait. Do not improvise layout while you wait.figma-local— the Figma desktop app's Dev Mode server onhttp://127.0.0.1:3845/mcp, registered in this repo's.mcp.json. No auth — it inherits the desktop session. It serves whichever file is open in the app, sonodeIdalone is enough (nofileKey). Requires the desktop app running with the canonical file open.
Prefer whichever is already live. The hosted one is better for pulling a specific node out of a file nobody has open; the local one is better when the user is actively in the file and there is no authorization to wait on.
Call the Figma whoami tool once to confirm you're authenticated, then work directly against the canonical file — pull metadata, design context, and screenshots yourself. If whoami genuinely errors (auth/transport), stop and report it as a real outage; do not improvise layout from a screenshot alone.
Step 1 — Metadata first, then design context
Order matters. For each in-scope node:
mcp__plugin_figma_figma__get_metadata(fileKey, nodeId)
mcp__plugin_figma_figma__get_design_context(fileKey, nodeId)get_metadataenumerates every child (id, name, x/y/w/h). This is the canonical "what's in the design" list — every child must end up in code OR indesigner-asks.md. Silently skipping a child is a defect.get_design_contextreturns the decoded Auto Layout as JSX + tokenised values. This is the implementation reference. Treat the output as representational — translate to RN + project tokens, do not ship the Tailwind verbatim.
If get_design_context returns truncated content, drill in: call it on smaller sub-trees instead of the whole frame.
Step 2 — Asset pipeline (vector-first)
For each visual node, decide the source:
| 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 this over hand-coded SVG components. |
DS icon NOT yet exported (Figma library 746:26281) | Export it 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 name in design context (e.g. fa6-solid:feather, material-community:*, fluent:*, typcn:code) | react-native-vector-icons (already in deps) | Pick the matching family and glyph. Most iconify sets we need are covered. |
| Vector illustration (non-icon — hero art, mascot, etc.) | SVG via react-native-svg + react-native-svg-transformer | Export the node as SVG. Save under src/assets/<flow>/. Import as a React component. |
| Photographic / raster source | PNG @3x at minimum | Export at 3× the on-screen size (e.g. 112×112 target → 336×336 PNG). Bitmap-only as a last resort. |
Never hand-code an SVG component when the Figma library has the icon exported. Hand-drawn approximations drift in stroke weight, shape, and dimensions — exactly the class of bug the export library prevents.
Three size variants per DS icon (sm/md/lg) are NOT for scaling — SVG scales natively. They are different visual weights (sm = thinner geometry, lg = chunkier). Pick the variant Figma uses in the specific component; don't substitute.
Figma SVG export gotchas (RN-specific)
When you save a Figma SVG asset into the repo, normalise it before committing:
- Strip CSS variables, then immediately decide the colour (steps 1 and 2 are one operation — do not stop after 1).
react-native-svg-transformerdoesn't parsefill="var(--fill-0, #181715)"— the icon renders transparent — so the mechanical fix is to drop in the hex fallback. That fix is also how the dark-mode bug gets born. Verify withgrep -l 'var(' src/assets/icons/*.svgreturning nothing, then go straight to 2. - Colour:
currentColorunless the icon is genuinely one colour forever. A baked hex does not react to theme switches, and — this is the part that bites — passingfill=orstroke=at the call site will NOT override it..svgrrc'sreplaceAttrValuesrewrites only a fixed list of hexes (today#333333,#858585,#FF653F) into{props.fill}. Any other hex stays literal in the generated component, the path defines its own paint, and it therefore does not inherit from the rootSvgeither. The call site looks correct and does nothing.- Themed icon → set the path to
fill="currentColor"(orstroke="currentColor") and passcolor={theme.colors.<token>}at the call site. - Icon whose hex happens to be in
replaceAttrValues→ it already binds to{props.fill}; note that a stroke-only icon binds its stroke to thefillprop, so passingfill="none"paints nothing and omittingfillis what yields the outline. - Deliberately multicolour brand mark (e.g.
GoogleIcon) → leave the hexes and pass no colour. Say so in the spec table so a reviewer doesn't "fix" it.
- Themed icon → set the path to
preserveAspectRatio="none"warning: Figma exports set this so the icon stretches to its container. If you pass non-proportionalwidth/height, the path distorts. Either pass dims proportional to the viewBox, OR remove the attribute to keep aspect locked.
Why this needs care: nothing catches it. The raw-hex ESLint ban covers src/components/ui/**/styles.ts only — it does not scan src/assets/icons/*.svg, and the token-invariant test polices which files read tokens, not which files bypass them. A baked hex passes typecheck, lint, the full Jest suite and both invariant suites. It is also invisible in light mode, because the exported hex is usually a near-black that looks right on a light surface — it only shows as a near-invisible glyph on the dark-mode container. Assume your gates will not tell you; check dark mode yourself.
Verify each asset visually before committing: open in Preview, confirm it renders crisp at the target size; then run a screen capture in both light and dark to confirm it actually shows up in the app.
Step 3 — Translation discipline
For each screen / component:
- Decode coordinates, don't ship them. Figma's
x=137, y=30, width=120on a 393-wide frame is responsive encoding:137 + 60 = center→ "horizontally centered, 30 from top". Translate to flex/padding/margin. Only ship fixed numbers for fixed-size things (icon sizes, hit targets, illustration boxes). - Node-for-node coverage. Every child the
get_metadatawalk returned has a code counterpart. If a node is deferred, add a one-line code comment AND an entry indesigner-asks.md. No silent drops. - Tokens-only in screens. Map Figma variables →
theme.*tokens. Zero raw hex insrc/screens/. If a token doesn't exist, add it via the paired-edit handshake intheming.md(same I_UI8 pattern used forspacing.xxl,accent.peach). - Reuse the DS. Use existing components in
src/components/ui/before building new ones. New internals live undersrc/screens/<screen>/components/. - Auto Layout direction maps to flex direction.
gapmaps to RNgap.padding/px-* / py-*map topaddingHorizontal/Vertical.min-w-*tominWidth. Etc. — preserve every numeric value.
Step 3.5 — Per-component spec table (MANDATORY)
For every component (NEW or modified) emit a table in the story doc BEFORE writing the component code, then re-verify after coding. The table forces an explicit Figma → code mapping for the properties most likely to drift: dimensions, colour fills, border widths/colours, radii, padding, sub-icon sizes.
Format:
### Component: <name> (Figma node `<id>`)
| Property | Figma value | Code value | Status |
|------------------|--------------------------------------|-----------------------------|--------|
| container size | 48×48 | width: 48, height: 48 | ✓ |
| bg | `Color/Secondary/Default` `#f3f2f2` | theme.colors.secondaryDefault | ✓ |
| border | 0.5px `Color/Border/Light-grey` `#e5e3e1` | theme.stroke.sm + theme.colors.mutedLight | ✓ |
| corner radius | `Radius/ml` 16 | theme.radius.ml | ✓ |
| chevron asset | `chevron-left lg` (746:26300) | ChevronLeftLgIcon | ✓ |
| chevron display | 6.5×11.5 (viewBox native) | width: 6.5, height: 11.5 | ✓ |Rules:
- Every Figma property the visual depends on must appear. If a property is missing from the table, you don't know what Figma says — pull it before guessing.
- "Status" is one of
✓(matches),≈(close enough by design — note why),✗(deviation — must justify under deferred items indesigner-asks.md). - If you find yourself writing a literal value (
borderColor: '#some-hex') in code, the corresponding token binding belongs in this table; if the token doesn't exist yet, that's a design-token follow-up.
This table is the single mechanical check that catches the class of bug where the implementer mapped Figma Color/Secondary/Default to RN secondaryContainer because "the names sound similar" — without verifying the hex values match. The check costs ~2 minutes per component and finds these mismatches every time.
Step 4 — Visual-diff captures (MANDATORY gate)
Before the PR is ready for review, every in-scope screen must have a committed side-by-side under:
workflows/stories/<TASK-ID>/visual-diff/<screen>-figma.png
workflows/stories/<TASK-ID>/visual-diff/<screen>-sim.pngHow:
- Figma render: call
get_screenshot(fileKey, nodeId, maxDimension=2622)for each screen. Download the PNG. The 2622 cap matches 3× of a 393×852 design frame on an iPhone-17-Pro-class device. - Sim screenshot: build and run the app on a sim whose logical width matches the design (iPhone 17 Pro = 393pt = 1206px @3x for the bottom half — confirm against device under test). Walk to each screen. Capture via
driver.saveScreenshot()(E2E spec undere2e/specs/visual-capture/<TASK-ID>.spec.ts) ORxcrun simctl io <udid> screenshotif driving by hand. - No automated pixel-diff gate. Human eye is the gate. Commit both PNGs in the same commit so reviewers can flip between them in GitHub or any image viewer.
If a screen has light + dark + RTL variants, capture each separately (<screen>-light-figma.png, <screen>-light-sim.png, <screen>-dark-*.png, <screen>-rtl-*.png).
Step 5 — Hand off to the parity reviewer
After commits land and gates pass (yarn lint && yarn typecheck && yarn test), invoke the pocketpal-design-parity-reviewer subagent before the pipeline reviewer:
WORKTREE: <path>
TASK_ID: <TASK-ID>
FIGMA_FILE: <fileKey>
NODE_IDS: <comma-separated list of in-scope screen node ids>The parity reviewer reads the committed visual-diff/ captures + the Figma node tree, calls out node-for-node coverage gaps, raw-hex leaks, token misuse, typography drift, asset substitutions. Treat its findings the same way as a critic verdict: BLOCKER fixes, then re-route.
Once parity is approved, hand off to pocketpal-pipeline-reviewer as usual.
Required implementer output format
Mirror this in the final report:
- Inputs — Figma fileKey + node IDs covered + light/dark scope.
- Plan — per-screen translation outline before coding (assets, components, token additions, deviations).
- Changes — per-commit summary of what landed.
- Parity — per-screen "matches Figma" / "differs because X" notes, citing the committed
visual-diff/files. - Tests — lint/typecheck/jest results + the visual-capture spec commit SHA.
Defects this skill prevents
- "Wireframe ships instead of design" (no Step 4 captures → caught by reviewer).
- "Silently dropped Figma children" (Step 1 metadata walk → Step 5 reviewer coverage check).
- "Raw hex in screen styles" (Step 3 tokens-only → reviewer grep).
- "Blurry raster icons" (Step 2 vector-first → reviewer eyeball).
- "x=137 shipped as
left: 137" (Step 3 decode → reviewer responsive check). - "Wrong token because the names sounded similar" (Step 3.5 per-component table — Figma hex side-by-side with the resolved theme token).
- "Hand-coded chevron at the wrong dimensions" (Step 2 prefers exported DS icons over hand-drawn SVGs; Step 3.5 captures the asset choice + dimensions).
- "Icon ships transparent because Figma SVG used a CSS var" (Step 2 normalisation requires stripping
var(...)fills on import).
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.

