Plumb · node
plumb_nodeExtract a Figma screen or node as a normalized design spec with deduplicated tokens and CSS-shaped node tree, auto-layout resolved to flexbox, for code generation.
Instructions
Extract a Figma screen or node as a compact, normalized Plumb Design Spec (PDS): deduplicated design tokens plus a CSS-shaped node tree, with auto-layout pre-resolved to flexbox. With the Plumb plugin paired, pass a screen id or name (no file key) — duplicate names come back as a match list to disambiguate. On the REST path, pass fileKey + id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Node/screen id to extract. | |
| url | No | Paste a full Figma URL — fileKey and node-id are auto-extracted (the `-` separator is normalised to `:`). | |
| name | No | Screen name — plugin path; resolved against the paired file. | |
| depth | No | Levels to disclose. Default 3. | |
| notes | No | Include human-readable notes per node. | |
| fileKey | No | Figma file key — REST path. Omit when the Plumb plugin is paired. | |
| expandAll | No | Walk the entire subtree in one call, ignoring `depth`. Subject to `maxTokens` (defaults to 60000 if omitted); if the spec exceeds the budget, depth is auto-trimmed and `meta.truncated` is set. Use this to skip the drill-loop on dense screens. | |
| maxTokens | No | Soft token budget; fit-to-budget reduces depth to fit. | |
| collapseRoles | No | Semantic-aware compression: collapse every node whose detected role (nav/hero/footer/sidebar/card/button) is in this list to a one-line `summary` instead of its full subtree — same `more` contract as depth truncation (call plumb_node on that node's `id` to expand it later). Opt-in and explicit on purpose: e.g. ['nav','footer'] to skip boilerplate chrome while keeping the hero and body in full. |