Deskhand

io.github.duncanbottrill由 GitHub 帳號 duncanbottrill 發布v1.0.1更新於 Nov 1, 2026

Claude in your Figma file. Builds with your components, checks what it wrote. Runs on your computer.

已驗證STDIO僅桌面開發者工具媒體與設計

概覽

AI 產生的概覽

Deskhand 透過本機外掛把 Claude 接進 Figma 檔案,讓助手在使用者電腦上讀取、建立、修改、匯出並檢查設計稿。

可以做什麼
  • 檢視目前開啟的 Figma 文件:檔案資訊、頁面、選取範圍與選取歷史、節點細節、品牌樣式、元件與變數
  • 建立與編輯設計內容:畫框、矩形、文字、填色、描邊、圓角、不透明度、可見度、群組、複製、移動、縮放、尺寸限制、圖片填色
  • 在 Figma 外掛中執行自訂 JavaScript,並可查詢工作狀態與取消
  • 匯出與算圖:單筆或批次匯出 PNG、SVG、JPG、PDF,內嵌截圖,以及與參考節點做像素比對
  • 品質檢查與素材:逐畫面 lint 並提供修正建議、Lucide 圖示查找與放置、iOS 介面範本
  • 支援 FigJam:便利貼、含文字圖形、連接線、表格、程式碼區塊與連結預覽
適用情境
適合想讓助手直接在 Figma 檔案裡工作的情況:用既有元件與樣式建立畫面、重現參考設計、交付前審查畫框、匯出素材。偏向設計與設計工程流程,而非一般程式開發。
執行需求
以本機 npm 套件透過 stdio 執行,僅支援桌面端。需要 Figma 外掛在 3055 埠執行並連線,否則所有工具會回傳 NOT_CONNECTED。試用期後需要 Deskhand 授權金鑰。選用環境變數 DESKHAND_PROFILE 決定註冊哪些工具(design、figjam 或 all)。
安裝前請注意
此伺服器會改動開啟中的 Figma 文件:建立、移動、縮放、改樣式與刪除節點,風險操作前應先建立快照。figma_execute 會在外掛內執行任意 JavaScript。figma_licence_activate 會送出授權金鑰。圖片填色可從 http(s) 網址取得圖片,匯出會寫入 ~/.deskhand 下的檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Deskhand,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

工具

113

figma_server_info

Server version, WebSocket port, connection state and connected document info.

無需輸入參數。

figma_get_context

File info, current page and selection. Call once per conversation; every tool reports NOT_CONNECTED if the plugin is down.

無需輸入參數。

figma_get_selection_history

Recent selection changes, newest first, with timestamps. Default: the user's own selections; source: 'all' adds those made by bridge commands. Served from a server buffer, so it works after the plugin disconnects. If the default returns nothing, retry with source: 'all'.

輸入參數limitsource

figma_bridge_diagnostics

Check the bridge end to end: versions, plugin handshake, buffered events, reverse round-trip timing. Call when a tool fails or after an upgrade.

無需輸入參數。

figma_licence_status

Deskhand licence state: trial days left, masked key, last check.

無需輸入參數。

figma_licence_activate

Activate a Deskhand licence key.

輸入參數key必填

figma_execute

Run JavaScript in the Figma plugin: an async function body with figma (Plugin API) and bridge (log, sleep, icon, text, instance, image, snapshot; progress/cancelled in jobs). Return plain data, never nodes (EXECUTE_BAD_RETURN). Errors: EXECUTE_SYNC_API, EXECUTE_SYNTAX, EXECUTE_FAILED. job: true past 30 s, then figma_job_status (waits). screenshot renders it. Recipes: figma_get_design_rules.

輸入參數jobcode必填lintlabeltimeoutMsscreenshot

figma_job_status

Waits for a figma_execute job to end (up to waitMs), then returns state (running | done | error | cancelled | timeout), progress and the result or error. Jobs live for the server session.

輸入參數jobId必填waitMs

figma_job_cancel

Ask a running figma_execute job to stop (sets the flag bridge.cancelled() returns; scripts that never check it run to completion). Poll figma_job_status.

輸入參數jobId必填

figma_list_pages

List pages (ids and names). The active page is in figma_get_context.

無需輸入參數。

figma_get_nodes

Full node details by id: geometry, fills, strokes, effects, auto-layout, text, constraints, boundVariables, explicitVariableModes, childIds. Default-valued props are omitted unless verbose. Composite instance ids (I<inst>;<child>) resolve; unknown ids land in notFound. Find ids with figma_search_nodes/figma_get_children first.

輸入參數depthnodeIds必填verbose

figma_set_fills

Set fill color. Accepts hex shorthand or fills array.

輸入參數fills必填nodeId必填

figma_set_strokes

Set stroke color and/or weight. Per-side weights (strokeTopWeight etc., for border-top-only dividers) work on RECTANGLE and frame-like nodes only. Omit `strokes` to change weights only.

輸入參數nodeId必填strokesstrokeWeightstrokeTopWeightstrokeLeftWeightstrokeRightWeightstrokeBottomWeight

figma_create_rectangle

Create a rectangle.

輸入參數xynamefillswidthheightparentId

figma_set_text

Set text content. Auto-loads fonts.

輸入參數text必填nodeId必填

figma_clone_nodes

Duplicate nodes.

輸入參數offsetnodeIds必填parentId

figma_delete_nodes

Delete nodes.

輸入參數nodeIds必填

figma_move_nodes

Move nodes. Use relative=true for offset.

輸入參數xynodeIds必填relative

figma_resize_nodes

Resize nodes to explicit pixels. To fit a child to its parent prefer figma_set_layout_align STRETCH (keeps size binds). Instance sublayers are rejected (INSTANCE_SUBLAYER_RESTRICTED): resize the master. Size binds are re-applied; the result is read back: RESIZE_NO_OP for a no-op, a clamp is a warning.

輸入參數widthheightnodeIds必填

figma_set_size_limits

Set or clear minWidth/maxWidth/minHeight/maxHeight: a number sets, null clears, omit leaves it. Applies to auto-layout frames and their direct children (others get a warning). Verified by readback (LIMIT_NOT_APPLIED / LIMIT_NOT_CLEARED). A variable-bound field keeps its bound value; unbind with figma_unbind_variable.

輸入參數nodeIds必填maxWidthminWidthmaxHeightminHeight

figma_set_opacity

Set opacity (0-1).

輸入參數nodeId必填opacity必填

figma_set_visible

Show or hide nodes via node.visible; don't bind a BOOLEAN variable or set opacity to 0 for this.

輸入參數nodeIds必填visible必填

figma_set_clips_content

Set whether frame-like nodes (FRAME, COMPONENT, COMPONENT_SET, INSTANCE, SLOT, SLIDE) clip children to their bounds; others error.

輸入參數nodeIds必填clipsContent必填

figma_set_corner_radius

Set corner radius. Use individual values for asymmetric.

輸入參數nodeId必填radiustopLefttopRightbottomLeftbottomRight

figma_group_nodes

Group nodes.

輸入參數namenodeIds必填

figma_ungroup_nodes

Ungroup nodes.

輸入參數nodeIds必填

figma_create_frame

Create a frame.

輸入參數xynamefillswidthheightparentId

figma_create_text

Create a text node.

輸入參數xynametextfillsfontSizeparentIdfontStylefontFamily

figma_set_selection

Set selection. Empty array clears.

輸入參數nodeIds必填

figma_set_current_page

Switch to a different page in the Figma document.

輸入參數pageId必填

figma_export_node

Export a node as PNG, SVG, JPG or PDF to disk and return { path, format, scale, bytes }; read the file to view it. outputPath sets the destination; returnBase64: true inlines raw data instead. To see the render in context use figma_screenshot.

輸入參數scaleformatnodeId必填outputPathreturnBase64

figma_screenshot

Render a node (or the selection) as PNG and return it inline, with path, pixel size and scale. Scale is reduced to fit maxPixels (default 1,000,000); the inline image stays under 200 KB (one retry at half scale), larger renders stay on disk. Use after layout changes: readback cannot see overlap, clipping or mid-word breaks.

輸入參數scaleinlinenodeIdmaxPixels

figma_compare_to_reference

Pixel-diff a built frame against a reference node. Both render at the reference's effective scale; returns mismatchPercent, a per-quadrant breakdown (tl/tr/bl/br), the size delta and paths to the diff/ref/built PNGs. A mismatch in one quadrant usually means one misplaced element.

輸入參數scalemaxPixelsrefNodeId必填thresholdinlineDiffbuiltNodeId必填

figma_export_batch

Export many nodes in one call, each at a scale or targetWidth (scale = targetWidth / node width, clamped 0.01–4). Files go to outputDir (default: a fresh folder under ~/.deskhand/exports/) named by namePattern with tokens {name} {id} {scale} {ext} {index}. One row per item (path and size, or an error); nothing is inlined.

輸入參數items必填outputDirnamePattern

figma_resolve_icon

Check icon concepts against the bundled Lucide set before drawing anything; never hand-draw glyphs. Aliases resolve (close → x), then exact names; otherwise you get real-name suggestions: pick one, do not invent. Insert with figma_place_icon or bridge.icon.

輸入參數concepts必填

figma_place_icon

Insert a Lucide icon as a vector frame named icon/<concept>. Resolves like figma_resolve_icon. Appended to parentId (or the current page) at x/y, scaled and stroked.

輸入參數xysizecolorconcept必填parentId

figma_place_chrome

Insert an iOS chrome template (status-bar 393×54, home-indicator 393×34, keyboard 393×291), named chrome/<kind>. With parentId it scales to the parent width, top or bottom unless y is given.

輸入參數ykind必填themeparentId

figma_review_screen

Per-screen quality gate: lint one frame → { pass, findings, counts, fixes }; a finding carries its own fix only when it differs from fixes[code]. Errors: invisible text, overflow, zero-size, collapsed auto-layout, low contrast. Warnings: misaligned rows, hand-drawn icons, placeholder avatars, raw fills/text, detached instances. Capped at 200, errors first.

輸入參數checksnodeId必填

figma_brand_styles

Read the brand the open file already defines: local paint/text/effect styles, every component and set (keys, variant properties, all pages) and common frame sizes; samples fills and fonts when there are no styles. Use its colours, type and components in everything you build. Cached under ~/.deskhand/brands/ so bridge.instance(name) can import components later.

無需輸入參數。

figma_set_image_fill

Fill a node with an image from an absolute path (~/ allowed) or http(s) URL: PNG, JPEG, GIF or WebP, up to 4096 px per side and 20 MB. Replaces the fills with one IMAGE fill. Use for photos, avatars and reference art instead of placeholder shapes; bridge.image does the same in scripts.

輸入參數nodeId必填source必填scaleMode

figma_snapshot

Save a restorable copy of a node before a risky edit: cloned onto a "🗄 Bridge Snapshots" page with parent/index/position recorded. Keeps the newest 10 per file. Restore with figma_restore_snapshot or bridge.snapshot() in scripts.

輸入參數labelnodeId必填

figma_restore_snapshot

Undo to a snapshot: removes the current node (if present) and moves the saved clone back to its recorded parent/index/position/name. New id: restoredId — update ids you held. Snapshot is consumed. SNAPSHOT_NOT_FOUND if unknown or the clone was deleted.

輸入參數snapshotId必填

figma_list_snapshots

List saved snapshots in this file, newest first, with whether each clone still exists. Returns { count, page, snapshots }.

無需輸入參數。

figma_get_design_rules

One cookbook section as markdown: rules plus a runnable figma_execute recipe. Sections: helpers, auto-layout, components, variants, text, lint, jobs, reference-match. Read it before building that kind of thing. Whole cookbook: skill://deskhand/COOKBOOK.md. Needs no plugin.

輸入參數section必填

figma_create_ellipse

Create ellipse. Use arcData for arcs/rings.

輸入參數xynamefillswidthheightarcDataparentId

figma_set_effects

Set effects. Replaces existing.

輸入參數nodeId必填effects必填

figma_set_auto_layout

Configure auto-layout on a frame: direction, sizing modes, alignment, padding, spacing, wrap. Size variable binds are captured and re-applied (rebound/warnings). See skill://deskhand/SKILL.md.

輸入參數nodeId必填layoutModelayoutWrappaddingTopitemSpacingpaddingLeftpaddingRightpaddingBottomcounterAxisSpacingcounterAxisAlignItemscounterAxisSizingModeprimaryAxisAlignItems另有 1 個

figma_get_local_styles

List all local styles (colors, text, effects, grids). To find specific styles by name use figma_search_styles: fewer tokens.

輸入參數typelimitoffsetverbose

figma_apply_style

Apply a local style (paint, text, stroke, effect, grid) to a node using Figma's async setters. The applied id is read back: appliedStyleId with verified: true, or STYLE_NOT_APPLIED.

輸入參數nodeId必填styleId必填property必填

figma_create_component

Create a component.

輸入參數xynamefillswidthheightparentIdfromNodeIddescription

figma_create_instance

Create a component instance.

輸入參數xynameparentIdcomponentId必填

figma_get_local_variables

All local variables and collections: types (COLOR, FLOAT, STRING, BOOLEAN), modes, values. Paged: limit (default 100) and offset; next gives the following page.

輸入參數typelimitoffset

figma_search_variables

Search variables by name pattern (e.g. "tailwind/orange/*"). Compact results, far fewer tokens than figma_get_local_variables.

輸入參數typelimitoffsetcompactnamePatternnameContainscollectionName

figma_search_nodes

Search nodes by name within a scope (parentId required). Preferred for finding frames, sections or elements; compact results (~50 tokens/node).

輸入參數limittypesoffsetcompactmaxDepthparentId必填namePatternnameContains

figma_search_components

Search local components by name. Returns compact metadata.

輸入參數limitoffsetcompactnamePatternnameContainsincludeVariants

figma_search_styles

Search local styles by name; cheaper than figma_get_local_styles.

輸入參數typelimitoffsetcompactnameContains

figma_get_children

Immediate children of a node — more efficient than figma_get_nodes for browsing hierarchy. Default limit 100, with truncated/next for paging. Compact results include x/y for layout. Composite instance-sublayer parent IDs resolve too.

輸入參數limitoffsetcompactparentId必填

figma_set_variable

Set a variable's value for a mode, or bind it to a node property or local style (styleId + field). Text styles bind font/spacing fields; paint styles bind 'paints'. Verified by readback (BIND_NOT_APPLIED otherwise). width/height on an instance sublayer: INSTANCE_SUBLAYER_RESTRICTED, bind the master.

輸入參數fieldvaluemodeIdnodeIdstyleIdpaintIndexvariableId必填

figma_create_line

Create a line.

輸入參數xynamelengthstrokesparentIdrotationstrokeCapstrokeWeight

figma_set_constraints

Set resize constraints on a node: how it resizes when its parent frame resizes. Only for nodes inside frames (not auto-layout frames).

輸入參數nodeId必填verticalhorizontal

figma_detach_instance

Detach an instance into a regular frame: keeps overrides, severs the link to the main component.

輸入參數nodeId必填

figma_set_layout_align

Set how a child behaves in an auto-layout frame: alignment (STRETCH), growth (fill container) and absolute positioning.

輸入參數nodeId必填layoutGrowlayoutAlignlayoutPositioning

figma_rename_node

Rename one or more nodes (a batch shares one name).

輸入參數name必填nodeIdnodeIds

figma_reorder_node

Change a node's z-order among its siblings. position is the FINAL index (0 = back/bottom, childCount-1 = front/top); 'back' and 'front' also work. Out-of-range values are clamped. Verified by readback (REORDER_FAILED otherwise). Children of instances cannot be reordered (INSTANCE_SUBLAYER_RESTRICTED): reorder on the master.

輸入參數nodeId必填position必填

figma_set_text_style

Set text font properties.

輸入參數nodeId必填fontSizetextCasefontStylefontFamilylineHeightletterSpacingtextDecorationtextAlignVerticaltextAlignHorizontal

figma_create_paint_style

Create a paint style.

輸入參數name必填fills必填description

figma_create_text_style

Create a text style.

輸入參數name必填fontSizetextCasefontStylefontFamilylineHeightdescriptionletterSpacingtextDecoration

figma_delete_style

Delete a local style (paint, text, effect or grid). Library styles return REMOTE_STYLE. Nodes keep their resolved values but lose the link.

輸入參數styleId必填

figma_create_variable_collection

Create a variable collection.

輸入參數name必填modes

figma_create_variable

Create a variable in a collection.

輸入參數name必填type必填valuescopesaliasOfdescriptioncollectionId必填

figma_rename_variable

Rename a variable; "/" makes groups.

輸入參數name必填variableId必填

figma_delete_variables

Delete variables. Cannot be undone.

輸入參數variableIds必填

figma_delete_variable_collection

Delete a variable collection and all its variables. Cannot be undone.

輸入參數collectionId必填

figma_rename_variable_collection

Rename a variable collection.

輸入參數name必填collectionId必填

figma_rename_mode

Rename a mode in a variable collection.

輸入參數name必填modeId必填collectionId必填

figma_add_mode

Add a new mode to a variable collection.

輸入參數name必填collectionId必填

figma_delete_mode

Delete a mode from a variable collection. Cannot delete the last mode.

輸入參數modeId必填collectionId必填

figma_set_variable_mode

Pin an explicit variable mode on nodes or pages (e.g. a mobile frame pinned to the Spacing collection's mobile mode), or clear: true to unpin. Works on scene nodes and page ids. Echoes explicitVariableModes ({} = nothing pinned).

輸入參數clearmodeIdnodeIds必填collectionId必填

figma_unbind_variable

Remove a variable binding from a node property, verified by readback (UNBIND_FAILED otherwise). For minWidth/maxWidth/minHeight/maxHeight the leftover literal clamp is cleared too (previousLiteral, clearedLiteral).

輸入參數field必填nodeId必填paintIndex

figma_create_page

Create a page. Figma Design only: FigJam returns FIGMA_DESIGN_ONLY (create FigJam pages in its UI).

輸入參數name必填index

figma_rename_page

Rename a page.

輸入參數name必填pageId必填

figma_delete_page

Delete a page. The last page cannot be deleted.

輸入參數pageId必填

figma_reparent_nodes

Move nodes to a different parent.

輸入參數indexnodeIds必填newParentId必填

figma_move_to_page

Move nodes from their current page to a different page.

輸入參數xynodeIds必填targetPageId必填

figma_swap_instance

Swap an instance to a different component, keeping position and size.

輸入參數instanceId必填newComponentId必填

figma_duplicate_page

Clone a page and its contents, inserted after the original. Figma Design only (FIGMA_DESIGN_ONLY in FigJam).

輸入參數namepageId必填

figma_set_rotation

Rotate nodes by degrees. pivot 'center' (default) keeps the visual centre in place; 'top-left' is Figma's raw rotation, which moves the centre. Children of auto-layout parents (unless ABSOLUTE) cannot use a centre pivot: they get top-left plus a warning. Echoes appliedPivot, rotation and absoluteBoundingBox.

輸入參數pivotnodeIds必填rotation必填

figma_combine_as_variants

Combine components into a variant set; names must use variant naming (e.g. "Size=Large").

輸入參數componentIds必填

figma_create_sticky

FigJam only: create a sticky note (fixed 240×240). Author name/visibility are set by Figma and cannot be changed.

輸入參數xytextfillsparentIdisWideWidth

figma_set_sticky

FigJam only: toggle a sticky between square and wide. Use figma_set_text for body text.

輸入參數nodeId必填isWideWidth

figma_create_shape_with_text

FigJam only: flowchart shape with embedded text (30 shape types; cornerRadius is fixed).

輸入參數xytextfillswidthheightstrokesparentIdshapeType必填strokeWeight

figma_set_shape_type

FigJam only: change the shape type of a shape-with-text node.

輸入參數nodeId必填shapeType必填

figma_create_connector

FigJam only: connector (arrow) between two nodes. Endpoints attach via magnets (AUTO recommended), fixed positions, or float free. Default end cap ARROW_EQUILATERAL. STRAIGHT only supports CENTER/NONE magnets.

輸入參數endtextstartendCapstrokeslineTypeparentIdstartCapstrokeWeight

figma_set_connector

FigJam only: modify an existing connector's endpoints, line type, end caps, or label.

輸入參數endtextstartendCapnodeId必填lineTypestartCap

figma_create_section

Create a labeled section (works in both Figma Design and FigJam) to group content. Supports dev status (READY_FOR_DEV/COMPLETED).

輸入參數xynamefillswidthheightparentIddevStatusdevStatusDescriptionsectionContentsHidden

figma_set_section

Update a section's name, dev status, or content visibility. Pass devStatus: null to clear.

輸入參數namenodeId必填devStatusdevStatusDescriptionsectionContentsHidden

figma_create_table

FigJam only: create a table (default 2×2), optionally seeded via cells.

輸入參數xycellsfillsnumRowsparentIdnumColumns

figma_set_table_cell

FigJam only: set the text and/or fill color of a single table cell.

輸入參數row必填textfillscolumn必填nodeId必填

figma_insert_table_row

FigJam only: insert a row at the given index (existing rows at and after the index shift down).

輸入參數nodeId必填rowIndex必填

figma_insert_table_column

FigJam only: insert a column at the given index (existing columns at and after the index shift right).

輸入參數nodeId必填columnIndex必填

figma_remove_table_row

FigJam only: remove the row at the given index.

輸入參數nodeId必填rowIndex必填

figma_remove_table_column

FigJam only: remove the column at the given index.

輸入參數nodeId必填columnIndex必填

figma_resize_table_row

FigJam only: set the height of a table row.

輸入參數height必填nodeId必填rowIndex必填

figma_resize_table_column

FigJam only: set the width of a table column.

輸入參數width必填nodeId必填columnIndex必填

figma_move_table_row

FigJam only: move a row from one index to another.

輸入參數nodeId必填toIndex必填fromIndex必填

figma_move_table_column

FigJam only: move a column from one index to another.

輸入參數nodeId必填toIndex必填fromIndex必填

figma_create_code_block

FigJam only: create a syntax-highlighted code block.

輸入參數xycode必填parentIdcodeLanguage

figma_set_code_block

FigJam only: update an existing code block's code text or language.

輸入參數codenodeId必填codeLanguage

figma_get_reactions

Prototype (Figma Design only): get a node's reactions (trigger and action details).

輸入參數nodeId必填

figma_add_reaction

Prototype (Figma Design only): add an interaction to a node; existing reactions are kept.

輸入參數action必填nodeId必填trigger必填

figma_remove_reaction

Prototype (Figma Design only): remove a reaction by its zero-based index; find it with figma_get_reactions first.

輸入參數index必填nodeId必填

figma_set_flow_starting_point

Prototype (Figma Design only): set a top-level frame as a flow starting point on the page, or clear it. Stored page-level as { nodeId, name } entries.

輸入參數clearnodeId必填flowName

版本歷史

1
  1. v1.0.1最新Nov 1, 2026

評分

已滿足適用檢查項的 65%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分

    請宣告包含 README 的 GitHub 儲存庫,或在 OAuth 受保護資源後設資料中提供 resource_documentation。

  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。