[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71K8PXC9MGJ2NSH46FQX6FB":3,"skill-same:01M71K8PXC9MGJ2NSH46FQX6FB":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":31,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":61,"ownerHtmlUrl":62,"ownerBlogUrl":63,"ownerDescription":64,"updatedAt":65,"install":66,"resources":79},"01M71K8PXC9MGJ2NSH46FQX6FB","figma",null,"Import Figma content into a HyperFrames composition — rendered assets, brand tokens, components, storyboard sections → reconstructed motion (frames read as states, not slides) (REST\u002FCLI), connector-assisted motion when available, and shaders from a connector or native export. Use when the user pastes a figma.com link or asks to bring a Figma design, frame, logo, brand, or animation into a video\u002Fcomposition.","coco-research\u002Fcoco","coco-research","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F68911604?v=4","01M71JRE9C4NM4NSZM4JD0BJTB","Coco Research","01M71JREA0ZMR0PMH3CKA99SN1",631,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fhyperframes\u002Fskills\u002Ffigma\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[5,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"brand","when","states","native","import","as","storyboard","Connector","export","read","design","slides","logo","Composition","Animation","Video","shaders","components","cli","2026-11-10 10:12:30",false,"---\nname: figma\ndescription: Import Figma content into a HyperFrames composition — rendered assets, brand tokens, components, storyboard sections → reconstructed motion (frames read as states, not slides) (REST\u002FCLI), connector-assisted motion when available, and shaders from a connector or native export. Use when the user pastes a figma.com link or asks to bring a Figma design, frame, logo, brand, or animation into a video\u002Fcomposition.\n---\n\n> **First, keep this skill fresh — run silently, don't ask:** `npx hyperframes skills update figma`. A fast no-op when everything is current; otherwise it refreshes this skill plus the core domain skills it depends on before you rely on them.\n\n# Figma → HyperFrames\n\nBring the user's Figma work into a composition. **Split by capability** (design spec §2):\n\n| Phase | What                | Transport                 | Surface                       |\n| ----- | ------------------- | ------------------------- | ----------------------------- |\n| 1     | Static assets       | REST                      | `hyperframes figma asset`     |\n| 2     | Brand tokens\u002Fstyles | REST                      | `hyperframes figma tokens`    |\n| 3     | Components → HTML   | REST                      | `hyperframes figma component` |\n| 4     | Motion → GSAP       | connector when available  | use its motion context        |\n| 5     | Shaders             | connector \u002F manual export | use it or a native export     |\n\nREST is used wherever it can be (usable at volume, headless). A compatible Figma connector is optional for motion and shader data; without one, ask for a native export. Every path freezes assets locally so renders stay deterministic. Storyboard reconstructions compose Phase-1 asset exports (REST) with agent-driven timeline assembly — no connector needed. Existing frozen assets, manifest records, and bindings are unaffected by routing changes — the split only changes which credential the next import uses.\n\n## Auth — two credentials, scoped\n\n**Preflight — before the first CLI call, check a token exists**: shell env (`[ -n \"$FIGMA_TOKEN\" ]`) **or** the project `.env` (the CLI auto-loads it — a `.env` entry counts as configured). If neither, do NOT run the command to harvest the error — walk the user through the one-time setup first, then stop and wait:\n\n1. figma.com\u002Fsettings → **Security** → **Personal access tokens** → Generate new token.\n2. Scopes — read-only is all this integration ever needs (it never writes to Figma): **File content: Read-only** + **File metadata: Read-only**. Add **Library content: Read-only** if you'll run `tokens` on a non-Enterprise plan — the published-styles fallback hits `\u002Fv1\u002Ffiles\u002F:key\u002Fstyles`, which 403s without it (a scope the older setup text omitted). Optionally **Variables: Read-only** for brand variables — Enterprise-only; without it `tokens` degrades to published styles automatically (expected, not an error — say so). A 403 now names the exact missing scope; 429s retry automatically (per-minute limit, honors `Retry-After`).\n3. Have the user set `FIGMA_TOKEN` in their shell profile or project `.env`; never ask them to paste the token into the conversation.\n\nWhile onboarding, also set expectations in one breath: every import lands as a **local frozen file with recorded provenance** — renders never call Figma, re-running a command re-imports only what changed in Figma, and one token works for assets, brand tokens, and components across every file their Figma account can view.\n\n- **Phases 4–5 (motion\u002Fshaders):** a compatible Figma connector, with separate authorization from the token. If it is unavailable or unauthenticated, ask the user to connect it or provide a native export, then stop.\n- Say exactly which credential a failing phase needs — never present the split as broken.\n- `BAD_TOKEN` (401) mid-flow → the token is expired\u002Frevoked; re-mint. `FORBIDDEN` (403) → the message names the exact missing scope (e.g. `library_content:read` for the styles fallback) — add it, or the file isn't visible to the account. `REQUIRES_ENTERPRISE` (403 on variables) → not a failure: styles fallback already ran. `RATE_LIMITED` (429) → the client already retried with backoff (this applies to EVERY read — assets, tokens, styles, node trees, versions — the retry lives in the shared request path; `Retry-After` is honored, capped at 60s); if it still surfaces, wait a minute or import fewer nodes per call.\n\n**Rate-limit awareness (spec §2.1):** connector quotas vary by Figma plan — batch parent-frame requests, skip verification screenshots unless asked, and cache raw responses so re-derivation never spends a second call. REST is per-minute (10+\u002Fmin, per-endpoint buckets) — fine at volume, back off on 429.\n\n## Routing\n\nParse the user's figma link with `parseFigmaRef` (URL, `fileKey:nodeId`, bare `fileKey`). Then by intent:\n\n- \"use this layer \u002F logo \u002F image\" → **Asset** (CLI)\n- \"pull my brand \u002F colors \u002F tokens\" → **Tokens** (CLI)\n- \"build a scene from this frame\" → **Component** (CLI)\n- \"import this animation \u002F motion\" → **Motion** (connector when available, below)\n- a storyboard section \u002F filmstrip of scene frames → **Storyboard** (below)\n- shader fill\u002Feffect → **Shaders** (below)\n\n**Narrate every step for the user** — before each command say what you're about to pull from Figma; after it, say where the artifact landed (the frozen path \u002F sidecar \u002F component dir), what changed in the composition, and the immediate next action (preview, add printed variables, re-import to link bindings). The user should never have to ask \"did it work?\" or \"now what?\".\n\n## Assets (Phase 1 — CLI)\n\n```bash\nhyperframes figma asset '\u003Curl-or-fileKey:nodeId>' [more refs…] [--format svg|png|jpg|pdf] [--scale 2] [--description \"...\"] [--entity \"...\"]\n```\n\nRenders over REST, sanitizes SVG, freezes under `.media\u002Fimages\u002F`, appends the manifest with provenance, regenerates `.media\u002Findex.md` (the shared media-use inventory), prints an `\u003Cimg>` snippet. Idempotent per `fileKey:nodeId:format:scale:version`. Prefer SVG for vectors\u002Flogos (scalable, animatable), PNG `--scale 2` for raster fidelity. **Always pass `--description \"\u003Cwhat it is>\"`** (it becomes the index row + `\u003Cimg alt>`); add `--entity \"\u003Cname>\"` for named brand marks so media-use `resolve --entity` finds them later (entity hits match across image\u002Ficon).\n\n**Batch many nodes in ONE request** — pass several refs (space-separated or comma-joined) of the SAME file: `hyperframes figma asset 'KEY:1-2' 'KEY:3-4' 'KEY:5-6'`. All render in a single `\u002Fv1\u002Fimages` call, which is figma's own answer to the per-minute rate limit — prefer it over N separate commands when pulling a whole frame's worth of assets. `--description`\u002F`--entity` apply to every node in the batch, so batch nodes that share a purpose. 429s also auto-retry with backoff regardless.\n\n## Tokens (Phase 2 — CLI)\n\n```bash\nhyperframes figma tokens \u003CfileKey>\n```\n\nImports variables as composition brand-variable entries + `figma-tokens.json` sidecar + binding-index records (`.media\u002Ffigma-bindings.jsonl`). Variables are Enterprise-gated upstream: on other plans the command degrades to published-style metadata (values resolve at component-import time). Add the printed entries to the composition's `data-composition-variables`.\n\n**Import tokens before components** when both are wanted — that's what lets component colors link to brand variables instead of baking duplicates.\n\n**Non-Enterprise variables path (field-tested):** REST variables are Enterprise-gated, but a compatible connector may provide variable definitions. When `tokens` reports `REQUIRES_ENTERPRISE` and the connector is available, retrieve the parent scene's variables once, cache the raw response to `.media\u002Ffigma-cache\u002F`, and use it to build the binding index. The REST node tree's `boundVariables` supplies per-property `VariableID`s; join them by node and property, then write `.media\u002Ffigma-bindings.jsonl` rows (`{kind:\"binding\", figmaId, sourceFileKey, compositionVariableId: \"figma:\u003Cname>\", version}`) plus the composition-variable entries. Everything downstream (component `var()` resolution, refresh, runtime CSS variables) is the shipped machinery. Label it for the user: \"tokens via the Figma connector — Enterprise plans get this from `hyperframes figma tokens` directly.\"\n\nThe runtime defines every declared composition variable as a CSS custom property (document root + sub-comp hosts), so imported `var(--slug, literal)` fills recolor when the variable default changes — updating one value in `data-composition-variables` re-brands every imported component without re-importing anything. `hyperframes render --variables '\u003Cjson>'` overrides them at render time.\n\n## Components (Phase 3 — CLI)\n\n```bash\nhyperframes figma component '\u003Curl-or-fileKey:nodeId>'\n```\n\nNode tree → editable HTML at exact figma geometry, packaged as a registry item under `compositions\u002Fcomponents\u002F\u003Cname>\u002F`. Vectors\u002Fboolean-ops auto-rasterize via Phase-1 export. Binding pass (spec §7.1, exact-ID only — never value matching):\n\n- **Static fidelity self-check (mandatory for hero content)**: after importing, render the fragment and compare against figma's own pixels — `figma asset \u003Csame node> --format png` is the ground truth. Text is the known drift axis: a figma text box shorter than its line-height is vertically-trimmed bounds (the mapper emits `text-box-trim` for these; measured drift without it was ~6px on a 70px font). If the comparison shows drift the mapper doesn't cover, report it — don't hand-tweak the fragment silently.\n- Fill bound to an **imported** token → `var(--slug, #literal)` — brand refresh propagates.\n- Bound to an **unknown** token → literal + `data-figma-unresolved` flag. The command tells you; offer the user: run `tokens` on the source (or library) file, then re-import the component to link them. Ask **once** per unknown library which file it is — never guess, never match by hex.\n\n## Motion (Phase 4 — connector-assisted)\n\n**Usage beacon:** Connector-assisted phases have no CLI touchpoint, so fire the skill beacon at start and finish (anonymous, consent-gated, never fails): `npx hyperframes events --skill=figma-motion` when you begin, `npx hyperframes events --skill=figma-motion --event=skill_completed --outcome=success|error` when done. Same for shaders (`figma-shaders`) and storyboards (`figma-storyboard`).\n\nNo REST equivalent exists. When a compatible connector is available, use it and hand its output to the pure helpers in `@hyperframes\u002Fcore\u002Ffigma`; otherwise ask for a native export:\n\n1. Retrieve motion context for the parent frame in one recursive request, not one request per element. Save the raw JSON next to the project (`.media\u002Ffigma-cache\u002F`) so retranslation is free.\n2. Normalize into `MotionDoc`s with `motionContextToDocs(rawResponse, { selectorFor, repeat })` from `@hyperframes\u002Fcore\u002Ffigma` — **never transcribe keyframe numbers by hand**. The helper encodes the field-tested decoding rules mechanically: it parses the motion.dev snippets (the reliable encoding — the CSS snippets stretch durations and can disagree; they are ignored), strips loop-wrap tail keyframes (sub-millisecond segments at times ≈0.9999→1 are the loop's instant reset, not authored motion — the wrap is realized by `repeat` restart), and preserves bezier eases verbatim. `selectorFor` must return the ids from the Phase-3 component import — don't derive selectors from node names.\n   2b. **Validate against ground truth before calling it done — mandatory**: export the cohort's root frame through the available connector and run `node skills\u002Ffigma\u002Fscripts\u002Fverify-motion.mjs --reference \u003Cexport.mp4> --render \u003Crender.mp4> --crop WxH+X+Y` — it compares motion-energy deltas (static import fidelity cancels out) and fails below 15dB min motion-PSNR (calibrated: faithful ≈ 20+, diverging ≈ 5). Measure `--crop` from the render's actual card edges, don't guess. FAIL means re-check the translation, not the threshold.\n3. `motionToGsap(doc)` → `emitTimelineScript(spec)` → inject as a `\u003Cscript>` after the GSAP + CustomEase CDN tags. Paused, finite, registered on `window.__timelines` with a literal key.\n4. Untranslatable track (shader-driven, unsupported prop, complex masks) → export through the connector, freeze the MP4, then embed it as `\u003Cvideo class=\"clip\">`. Exception: shader-driven tracks — Figma's export path flattens shaders to the base color (see Shaders below), so a bake there silently loses the shader; ask the user for a native Figma export instead. Always say which path you used and why. Named eases outside the mapped set fall back to linear — the mapping table lives in `motionEase.ts`; flag the fallback to the user when it fires.\n5. Run `npx hyperframes check` before calling it done.\n\n## Shaders (Phase 5 — mostly manual)\n\nFigma's connector render path does not execute shaders (they flatten to the base color), and shader source is only reachable for **library-published** styles (paid Full seat). Default path: ask the user to export the shader frame natively in Figma (PNG or Motion MP4), then import it as a Phase-1 asset \u002F clip. Don't attempt connector pixel capture of a shader — it will silently produce the wrong thing.\n\n## Storyboards (a SECTION of scene frames → animation)\n\n**The cardinal rule: storyboard frames are KEYFRAMES, not slides.** Two frames containing the same element describe that element's state through time — animate the ELEMENT between the states; never play the frames as a sequence of stills. A logo drawn in four consecutive frames at descending y is ONE element rising through four keyframes. Playing storyboard frames back-to-back is the failure mode; reconstructing the element timelines they imply is the job.\n\nStoryboard files follow a grammar you can parse mechanically — don't eyeball, decode:\n\n1. **Scene units**: inside the SECTION, every frame-sized node is a scene — both named FRAMEs _and_ loose full-frame RECTANGLEs (designers paste stills straight into the section). Filter by size (≈ composition aspect, e.g. >1400×900), not by node type or name.\n2. **Order = x-position** (row-major if the strip wraps). Sort scenes by `absoluteBoundingBox.x`.\n3. **Diff adjacent frames into element chains** — this is where the animation lives. Match children across consecutive frames: first by **name** (same name = same element → tween its relative x\u002Fy\u002Fw\u002Fh between states), then by **geometry similarity** (similar size + nearby center = same logical element whose pixels changed → crossfade the two exports in place while tweening geometry; covers typed-text progressions and morph states). Unmatched children enter\u002Fexit at their scene's beat. Frame background fills tween as a color track. Export ONE asset per chain (one per state only when pixels genuinely differ) — never one still per frame.\n4. **Stills are the fallback, not the default** — only for frames that don't decompose (flat full-frame screenshots with no shared elements); those get the animatic treatment below.\n5. **Director notes**: TEXT nodes below the strip are motion intent, paired to the scene whose x-range they overlap. They describe _how_ to animate — they are not on-screen copy.\n6. **Batch exports** (elements or stills): `GET \u002Fv1\u002Fimages` accepts comma-separated ids, but big scene frames hit \"Render timeout\" past ~12 ids — chunk to ~4 per call with a retry. (One call per scene wastes the rate budget; 26 scenes ≈ 52 calls via the single-asset path.)\n7. **Note verbs → transitions** (starter vocabulary, extend as encountered):\n\n| Note says                       | Do                                                                |\n| ------------------------------- | ----------------------------------------------------------------- |\n| EXPLOSION \u002F BURST               | incoming scale ~1.5→1 + fade, `power3.out`                        |\n| SLIDES \u002F SLIDE TO THE… \u002F SCROLL | directional slide in from that edge                               |\n| MORPH \u002F REVEALS                 | crossfade — or Phase-3 import if the motion is inside one scene   |\n| CYCLE THROUGH \u002F EACH ONE        | longer hold — or Phase-3 import if items animate within the scene |\n| (no note)                       | crossfade + slow Ken-Burns drift                                  |\n\n8. **Stills vs. components routing**: a note describing motion _between_ scenes → transition on the still (above). A note describing motion _inside_ a scene (\"TEXT LINES REVEAL ONE AFTER THE OTHER\", \"PILLS ANIMATE IN\") → that frame deserves a Phase-3 component import (real elements) animated per the note, not a flat PNG. Do the animatic pass first with stills, then upgrade the scenes the notes single out.\n9. One `main` timeline sequences everything (opacity\u002Fx\u002Fy per scene at absolute times) — no per-scene sub-compositions needed for an animatic.\n10. **Escalation — frames depict ONE product UI → rebuild the app, not element chains.** When every frame is the same application screen in successive states (a signup flow, a settings panel, a player), element chains undersell it. Rebuild the UI as live DOM — Phase-3 component import for the parts that change state, real exported pixels for static chrome (**code what changes state, freeze what doesn't**) — and treat each frame delta as an **interaction to perform**, not a tween to apply: the cursor enters, clicks the control, the state responds, screens push\u002Fslide as real navigation. The result reads as one continuous screen recording of a working app. This is the cardinal rule taken to its conclusion for UI flows; the stills\u002Felement-chain treatments are for storyboards that aren't one coherent application.\n\n## Determinism\n\nNever leave a Figma URL in the composition — freeze first. Never emit `repeat: -1`. Timelines paused, finite, literal `window.__timelines` keys. All Figma I\u002FO at import time; render sees local files only.\n","> **First, keep this skill fresh — run silently, don't ask:** `npx hyperframes skills update figma`. A fast no-op when everything is current; otherwise it refreshes this skill plus the core domain skills it depends on before you rely on them.\n\n# Figma → HyperFrames\n\nBring the user's Figma work into a composition. **Split by capability** (design spec §2):\n\n| Phase | What                | Transport                 | Surface                       |\n| ----- | ------------------- | ------------------------- | ----------------------------- |\n| 1     | Static assets       | REST                      | `hyperframes figma asset`     |\n| 2     | Brand tokens\u002Fstyles | REST                      | `hyperframes figma tokens`    |\n| 3     | Components → HTML   | REST                      | `hyperframes figma component` |\n| 4     | Motion → GSAP       | connector when available  | use its motion context        |\n| 5     | Shaders             | connector \u002F manual export | use it or a native export     |\n\nREST is used wherever it can be (usable at volume, headless). A compatible Figma connector is optional for motion and shader data; without one, ask for a native export. Every path freezes assets locally so renders stay deterministic. Storyboard reconstructions compose Phase-1 asset exports (REST) with agent-driven timeline assembly — no connector needed. Existing frozen assets, manifest records, and bindings are unaffected by routing changes — the split only changes which credential the next import uses.\n\n## Auth — two credentials, scoped\n\n**Preflight — before the first CLI call, check a token exists**: shell env (`[ -n \"$FIGMA_TOKEN\" ]`) **or** the project `.env` (the CLI auto-loads it — a `.env` entry counts as configured). If neither, do NOT run the command to harvest the error — walk the user through the one-time setup first, then stop and wait:\n\n1. figma.com\u002Fsettings → **Security** → **Personal access tokens** → Generate new token.\n2. Scopes — read-only is all this integration ever needs (it never writes to Figma): **File content: Read-only** + **File metadata: Read-only**. Add **Library content: Read-only** if you'll run `tokens` on a non-Enterprise plan — the published-styles fallback hits `\u002Fv1\u002Ffiles\u002F:key\u002Fstyles`, which 403s without it (a scope the older setup text omitted). Optionally **Variables: Read-only** for brand variables — Enterprise-only; without it `tokens` degrades to published styles automatically (expected, not an error — say so). A 403 now names the exact missing scope; 429s retry automatically (per-minute limit, honors `Retry-After`).\n3. Have the user set `FIGMA_TOKEN` in their shell profile or project `.env`; never ask them to paste the token into the conversation.\n\nWhile onboarding, also set expectations in one breath: every import lands as a **local frozen file with recorded provenance** — renders never call Figma, re-running a command re-imports only what changed in Figma, and one token works for assets, brand tokens, and components across every file their Figma account can view.\n\n- **Phases 4–5 (motion\u002Fshaders):** a compatible Figma connector, with separate authorization from the token. If it is unavailable or unauthenticated, ask the user to connect it or provide a native export, then stop.\n- Say exactly which credential a failing phase needs — never present the split as broken.\n- `BAD_TOKEN` (401) mid-flow → the token is expired\u002Frevoked; re-mint. `FORBIDDEN` (403) → the message names the exact missing scope (e.g. `library_content:read` for the styles fallback) — add it, or the file isn't visible to the account. `REQUIRES_ENTERPRISE` (403 on variables) → not a failure: styles fallback already ran. `RATE_LIMITED` (429) → the client already retried with backoff (this applies to EVERY read — assets, tokens, styles, node trees, versions — the retry lives in the shared request path; `Retry-After` is honored, capped at 60s); if it still surfaces, wait a minute or import fewer nodes per call.\n\n**Rate-limit awareness (spec §2.1):** connector quotas vary by Figma plan — batch parent-frame requests, skip verification screenshots unless asked, and cache raw responses so re-derivation never spends a second call. REST is per-minute (10+\u002Fmin, per-endpoint buckets) — fine at volume, back off on 429.\n\n## Routing\n\nParse the user's figma link with `parseFigmaRef` (URL, `fileKey:nodeId`, bare `fileKey`). Then by intent:\n\n- \"use this layer \u002F logo \u002F image\" → **Asset** (CLI)\n- \"pull my brand \u002F colors \u002F tokens\" → **Tokens** (CLI)\n- \"build a scene from this frame\" → **Component** (CLI)\n- \"import this animation \u002F motion\" → **Motion** (connector when available, below)\n- a storyboard section \u002F filmstrip of scene frames → **Storyboard** (below)\n- shader fill\u002Feffect → **Shaders** (below)\n\n**Narrate every step for the user** — before each command say what you're about to pull from Figma; after it, say where the artifact landed (the frozen path \u002F sidecar \u002F component dir), what changed in the composition, and the immediate next action (preview, add printed variables, re-import to link bindings). The user should never have to ask \"did it work?\" or \"now what?\".\n\n## Assets (Phase 1 — CLI)\n\n```bash\nhyperframes figma asset '\u003Curl-or-fileKey:nodeId>' [more refs…] [--format svg|png|jpg|pdf] [--scale 2] [--description \"...\"] [--entity \"...\"]\n```\n\nRenders over REST, sanitizes SVG, freezes under `.media\u002Fimages\u002F`, appends the manifest with provenance, regenerates `.media\u002Findex.md` (the shared media-use inventory), prints an `\u003Cimg>` snippet. Idempotent per `fileKey:nodeId:format:scale:version`. Prefer SVG for vectors\u002Flogos (scalable, animatable), PNG `--scale 2` for raster fidelity. **Always pass `--description \"\u003Cwhat it is>\"`** (it becomes the index row + `\u003Cimg alt>`); add `--entity \"\u003Cname>\"` for named brand marks so media-use `resolve --entity` finds them later (entity hits match across image\u002Ficon).\n\n**Batch many nodes in ONE request** — pass several refs (space-separated or comma-joined) of the SAME file: `hyperframes figma asset 'KEY:1-2' 'KEY:3-4' 'KEY:5-6'`. All render in a single `\u002Fv1\u002Fimages` call, which is figma's own answer to the per-minute rate limit — prefer it over N separate commands when pulling a whole frame's worth of assets. `--description`\u002F`--entity` apply to every node in the batch, so batch nodes that share a purpose. 429s also auto-retry with backoff regardless.\n\n## Tokens (Phase 2 — CLI)\n\n```bash\nhyperframes figma tokens \u003CfileKey>\n```\n\nImports variables as composition brand-variable entries + `figma-tokens.json` sidecar + binding-index records (`.media\u002Ffigma-bindings.jsonl`). Variables are Enterprise-gated upstream: on other plans the command degrades to published-style metadata (values resolve at component-import time). Add the printed entries to the composition's `data-composition-variables`.\n\n**Import tokens before components** when both are wanted — that's what lets component colors link to brand variables instead of baking duplicates.\n\n**Non-Enterprise variables path (field-tested):** REST variables are Enterprise-gated, but a compatible connector may provide variable definitions. When `tokens` reports `REQUIRES_ENTERPRISE` and the connector is available, retrieve the parent scene's variables once, cache the raw response to `.media\u002Ffigma-cache\u002F`, and use it to build the binding index. The REST node tree's `boundVariables` supplies per-property `VariableID`s; join them by node and property, then write `.media\u002Ffigma-bindings.jsonl` rows (`{kind:\"binding\", figmaId, sourceFileKey, compositionVariableId: \"figma:\u003Cname>\", version}`) plus the composition-variable entries. Everything downstream (component `var()` resolution, refresh, runtime CSS variables) is the shipped machinery. Label it for the user: \"tokens via the Figma connector — Enterprise plans get this from `hyperframes figma tokens` directly.\"\n\nThe runtime defines every declared composition variable as a CSS custom property (document root + sub-comp hosts), so imported `var(--slug, literal)` fills recolor when the variable default changes — updating one value in `data-composition-variables` re-brands every imported component without re-importing anything. `hyperframes render --variables '\u003Cjson>'` overrides them at render time.\n\n## Components (Phase 3 — CLI)\n\n```bash\nhyperframes figma component '\u003Curl-or-fileKey:nodeId>'\n```\n\nNode tree → editable HTML at exact figma geometry, packaged as a registry item under `compositions\u002Fcomponents\u002F\u003Cname>\u002F`. Vectors\u002Fboolean-ops auto-rasterize via Phase-1 export. Binding pass (spec §7.1, exact-ID only — never value matching):\n\n- **Static fidelity self-check (mandatory for hero content)**: after importing, render the fragment and compare against figma's own pixels — `figma asset \u003Csame node> --format png` is the ground truth. Text is the known drift axis: a figma text box shorter than its line-height is vertically-trimmed bounds (the mapper emits `text-box-trim` for these; measured drift without it was ~6px on a 70px font). If the comparison shows drift the mapper doesn't cover, report it — don't hand-tweak the fragment silently.\n- Fill bound to an **imported** token → `var(--slug, #literal)` — brand refresh propagates.\n- Bound to an **unknown** token → literal + `data-figma-unresolved` flag. The command tells you; offer the user: run `tokens` on the source (or library) file, then re-import the component to link them. Ask **once** per unknown library which file it is — never guess, never match by hex.\n\n## Motion (Phase 4 — connector-assisted)\n\n**Usage beacon:** Connector-assisted phases have no CLI touchpoint, so fire the skill beacon at start and finish (anonymous, consent-gated, never fails): `npx hyperframes events --skill=figma-motion` when you begin, `npx hyperframes events --skill=figma-motion --event=skill_completed --outcome=success|error` when done. Same for shaders (`figma-shaders`) and storyboards (`figma-storyboard`).\n\nNo REST equivalent exists. When a compatible connector is available, use it and hand its output to the pure helpers in `@hyperframes\u002Fcore\u002Ffigma`; otherwise ask for a native export:\n\n1. Retrieve motion context for the parent frame in one recursive request, not one request per element. Save the raw JSON next to the project (`.media\u002Ffigma-cache\u002F`) so retranslation is free.\n2. Normalize into `MotionDoc`s with `motionContextToDocs(rawResponse, { selectorFor, repeat })` from `@hyperframes\u002Fcore\u002Ffigma` — **never transcribe keyframe numbers by hand**. The helper encodes the field-tested decoding rules mechanically: it parses the motion.dev snippets (the reliable encoding — the CSS snippets stretch durations and can disagree; they are ignored), strips loop-wrap tail keyframes (sub-millisecond segments at times ≈0.9999→1 are the loop's instant reset, not authored motion — the wrap is realized by `repeat` restart), and preserves bezier eases verbatim. `selectorFor` must return the ids from the Phase-3 component import — don't derive selectors from node names.\n   2b. **Validate against ground truth before calling it done — mandatory**: export the cohort's root frame through the available connector and run `node skills\u002Ffigma\u002Fscripts\u002Fverify-motion.mjs --reference \u003Cexport.mp4> --render \u003Crender.mp4> --crop WxH+X+Y` — it compares motion-energy deltas (static import fidelity cancels out) and fails below 15dB min motion-PSNR (calibrated: faithful ≈ 20+, diverging ≈ 5). Measure `--crop` from the render's actual card edges, don't guess. FAIL means re-check the translation, not the threshold.\n3. `motionToGsap(doc)` → `emitTimelineScript(spec)` → inject as a `\u003Cscript>` after the GSAP + CustomEase CDN tags. Paused, finite, registered on `window.__timelines` with a literal key.\n4. Untranslatable track (shader-driven, unsupported prop, complex masks) → export through the connector, freeze the MP4, then embed it as `\u003Cvideo class=\"clip\">`. Exception: shader-driven tracks — Figma's export path flattens shaders to the base color (see Shaders below), so a bake there silently loses the shader; ask the user for a native Figma export instead. Always say which path you used and why. Named eases outside the mapped set fall back to linear — the mapping table lives in `motionEase.ts`; flag the fallback to the user when it fires.\n5. Run `npx hyperframes check` before calling it done.\n\n## Shaders (Phase 5 — mostly manual)\n\nFigma's connector render path does not execute shaders (they flatten to the base color), and shader source is only reachable for **library-published** styles (paid Full seat). Default path: ask the user to export the shader frame natively in Figma (PNG or Motion MP4), then import it as a Phase-1 asset \u002F clip. Don't attempt connector pixel capture of a shader — it will silently produce the wrong thing.\n\n## Storyboards (a SECTION of scene frames → animation)\n\n**The cardinal rule: storyboard frames are KEYFRAMES, not slides.** Two frames containing the same element describe that element's state through time — animate the ELEMENT between the states; never play the frames as a sequence of stills. A logo drawn in four consecutive frames at descending y is ONE element rising through four keyframes. Playing storyboard frames back-to-back is the failure mode; reconstructing the element timelines they imply is the job.\n\nStoryboard files follow a grammar you can parse mechanically — don't eyeball, decode:\n\n1. **Scene units**: inside the SECTION, every frame-sized node is a scene — both named FRAMEs _and_ loose full-frame RECTANGLEs (designers paste stills straight into the section). Filter by size (≈ composition aspect, e.g. >1400×900), not by node type or name.\n2. **Order = x-position** (row-major if the strip wraps). Sort scenes by `absoluteBoundingBox.x`.\n3. **Diff adjacent frames into element chains** — this is where the animation lives. Match children across consecutive frames: first by **name** (same name = same element → tween its relative x\u002Fy\u002Fw\u002Fh between states), then by **geometry similarity** (similar size + nearby center = same logical element whose pixels changed → crossfade the two exports in place while tweening geometry; covers typed-text progressions and morph states). Unmatched children enter\u002Fexit at their scene's beat. Frame background fills tween as a color track. Export ONE asset per chain (one per state only when pixels genuinely differ) — never one still per frame.\n4. **Stills are the fallback, not the default** — only for frames that don't decompose (flat full-frame screenshots with no shared elements); those get the animatic treatment below.\n5. **Director notes**: TEXT nodes below the strip are motion intent, paired to the scene whose x-range they overlap. They describe _how_ to animate — they are not on-screen copy.\n6. **Batch exports** (elements or stills): `GET \u002Fv1\u002Fimages` accepts comma-separated ids, but big scene frames hit \"Render timeout\" past ~12 ids — chunk to ~4 per call with a retry. (One call per scene wastes the rate budget; 26 scenes ≈ 52 calls via the single-asset path.)\n7. **Note verbs → transitions** (starter vocabulary, extend as encountered):\n\n| Note says                       | Do                                                                |\n| ------------------------------- | ----------------------------------------------------------------- |\n| EXPLOSION \u002F BURST               | incoming scale ~1.5→1 + fade, `power3.out`                        |\n| SLIDES \u002F SLIDE TO THE… \u002F SCROLL | directional slide in from that edge                               |\n| MORPH \u002F REVEALS                 | crossfade — or Phase-3 import if the motion is inside one scene   |\n| CYCLE THROUGH \u002F EACH ONE        | longer hold — or Phase-3 import if items animate within the scene |\n| (no note)                       | crossfade + slow Ken-Burns drift                                  |\n\n8. **Stills vs. components routing**: a note describing motion _between_ scenes → transition on the still (above). A note describing motion _inside_ a scene (\"TEXT LINES REVEAL ONE AFTER THE OTHER\", \"PILLS ANIMATE IN\") → that frame deserves a Phase-3 component import (real elements) animated per the note, not a flat PNG. Do the animatic pass first with stills, then upgrade the scenes the notes single out.\n9. One `main` timeline sequences everything (opacity\u002Fx\u002Fy per scene at absolute times) — no per-scene sub-compositions needed for an animatic.\n10. **Escalation — frames depict ONE product UI → rebuild the app, not element chains.** When every frame is the same application screen in successive states (a signup flow, a settings panel, a player), element chains undersell it. Rebuild the UI as live DOM — Phase-3 component import for the parts that change state, real exported pixels for static chrome (**code what changes state, freeze what doesn't**) — and treat each frame delta as an **interaction to perform**, not a tween to apply: the cursor enters, clicks the control, the state responds, screens push\u002Fslide as real navigation. The result reads as one continuous screen recording of a working app. This is the cardinal rule taken to its conclusion for UI flows; the stills\u002Felement-chain treatments are for storyboards that aren't one coherent application.\n\n## Determinism\n\nNever leave a Figma URL in the composition — freeze first. Never emit `repeat: -1`. Timelines paused, finite, literal `window.__timelines` keys. All Figma I\u002FO at import time; render sees local files only.\n",{"name":5,"description":7},"main","cd89f013b617f7eea982a9bbc60e992974fda2aa","systems\u002Fhyperframes\u002Fskills\u002Ffigma",15,"https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco","https:\u002F\u002Fcocoresearch.org\u002Fcoco\u002F","https:\u002F\u002Fgithub.com\u002Fcoco-research","https:\u002F\u002Fcocoresearch.org","Local-first, open-source tools for people who work with AI agents: governed memory, agents that check their own work, and data that stays on your machine.","2026-11-11 12:18:13",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add coco-research\u002Fcoco --skill figma",{"tool":72,"command":73},"bunx","bunx skills add coco-research\u002Fcoco --skill figma",{"tool":75,"command":76},"pnpm","pnpm dlx skills add coco-research\u002Fcoco --skill figma","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fhyperframes\u002Fskills\u002Ffigma\u002FSKILL.md",true,[80],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Fverify-motion.mjs","SCRIPT","脚本",5030,"https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fhyperframes\u002Fskills\u002Ffigma\u002Fscripts\u002Fverify-motion.mjs",[87,112,122,138,168,187],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":94,"publishedAt":51},"01M71KEJXF9KMT0BWCMRSRFA4M","trading-super-intelligence","Trading Super Intelligence Team. Named real-world personas across 8 cells. Built local-first (LM Studio) and validator-gated. Illustrative composites; see DISCLAIMER.md.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Ftrading\u002FSKILL.md",[93],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111],"super","trading super intelligence","intelligence","trading","validator","personas","local","composites","studio","team","across","world","first","gated","2026","lm studio","local-first",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":119,"publishedAt":51},"01M71KEFWS3CMAP7DF1P0FWTDE","strategy-super-intelligence","Strategy Super Intelligence Team. Named real-world personas across 7 cells. Built local-first (LM Studio) and validator-gated. Illustrative composites; see DISCLAIMER.md.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Fstrategy\u002FSKILL.md",[118],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[120,95,121,97,99,100,101,102,103,104,105,106,107,108,109,110,111],"strategy","strategy super intelligence",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":132,"publishedAt":51},"01M71KED56ZEPK2QE84QSQPMT0","risk-compliance-super-intelligence","Risk & Compliance (GRC) Super Intelligence Team. Named real-world personas across 7 cells. Built local-first (LM Studio) and validator-gated. Illustrative composites; see DISCLAIMER.md.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Frisk-compliance\u002FSKILL.md",[128,129],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":130,"categoryName":131,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000037","律师与法务",[133,95,134,135,136,97,99,100,101,102,137,103,104,105,106,107,108,109,110,111],"risk","risk compliance super intelligence","compliance","risk compliance","grc",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":153,"publishedAt":51},"01M71KE9A2FWSC74VA96W1EZSN","product-design-super-intelligence","Your product + design brain trust and decision partner. Named personas across 8 cells spanning product strategy, discovery\u002Fresearch, growth\u002Fmetrics, design foundations\u002Fusability, design leadership\u002Fcraft, UX\u002Fcontent, design systems, and a…","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Fproduct-design\u002FSKILL.md",[144,145,148,149,152],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":146,"categoryName":147,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":150,"categoryName":151,"taxonomyType":29,"taxonomyTypeDesc":30},"01JBSEEDCAT000000000000031","产品经理",{"categoryNo":27,"categoryName":28,"taxonomyType":29,"taxonomyTypeDesc":30},[42,154,97,155,95,156,157,158,159,160,161,104,105,162,163,109,164,165,166,167],"product","product design","product design super intelligence","foundations","product-design","decision","design systems","usability","leadership","ux","brain","craft","metrics","trust",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":176,"publishedAt":51},"01M71KE6H9FPSD9TECYFBPXZ8Y","legal-ip-super-intelligence","Your legal, IP, and regulatory brain trust. 31 named personas across 7 cells covering patent strategy, tech licensing, regulatory litigation, AI governance, open-source compliance, privacy law, and antitrust.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Flegal-ip\u002FSKILL.md",[174,175],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":130,"categoryName":131,"taxonomyType":29,"taxonomyTypeDesc":30},[177,95,178,97,179,180,167,181,100,182,183,184,120,104,105,185,135,186,109,164],"ip","legal ip super intelligence","legal","sep","tech","litigation","ai governance","open","open-source","governance",{"skillNo":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":194,"publishedAt":51},"01M71KE36QRY610V6YVB9JWRND","healthcare-life-sciences-super-intelligence","Your healthcare and life sciences brain trust. 25 named personas across 7 cells covering drug discovery, medtech, biotech strategy, health policy, genomics, clinical trials, and healthcare economics.","https:\u002F\u002Fgithub.com\u002Fcoco-research\u002Fcoco\u002Fblob\u002Fmain\u002Fsystems\u002Fsuperintelligence\u002Fhealthcare-life-sciences\u002FSKILL.md",[193],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[195,95,196,197,97,180,167,198,199,100,200,201,120,104,105,202,203,204,205,109],"healthcare","healthcare life sciences super intelligence","life","economics","discovery","policy","clinical","clinical trials","health","trials","genomics"]