omp-figma-remote-auth 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,6 +45,8 @@ Approve access and wait for OMP to confirm that credentials were saved.
45
45
 
46
46
  The server name is `figma`. Once connected, give OMP a Figma file or node URL you can access.
47
47
 
48
+ The package also includes the on-demand `figma-mcp` skill. When you provide a Figma file or node link, it guides OMP through parsing the node reference and discovering the Figma MCP tools, including tools mounted under `xd://`.
49
+
48
50
  ## Commands
49
51
 
50
52
  These commands run **inside OMP's TUI**, not in your terminal.
package/README.zh-CN.md CHANGED
@@ -45,6 +45,8 @@ omp
45
45
 
46
46
  服务名为 `figma`。连接成功后,即可向 OMP 提供你有权限访问的 Figma 文件或节点链接。
47
47
 
48
+ 插件还内置按需加载的 `figma-mcp` skill。提供 Figma 文件或节点链接后,它会引导 OMP 解析节点参数并发现 Figma MCP 工具,包括挂载在 `xd://` 下的工具。
49
+
48
50
  ## 常用命令
49
51
 
50
52
  以下均在 **OMP TUI** 中执行,不是终端命令。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omp-figma-remote-auth",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "OAuth helper for Figma remote MCP using OMP native transport",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -35,6 +35,7 @@
35
35
  ".mcp.json",
36
36
  "index.ts",
37
37
  "src",
38
+ "skills",
38
39
  "LICENSE",
39
40
  "README.md",
40
41
  "README.zh-CN.md"
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: figma-mcp
3
+ description: >
4
+ Use when the user provides a Figma design, file, page, or node URL or asks
5
+ to inspect, explain, screenshot, implement, or modify a Figma design. Use
6
+ the Figma MCP tools provided by this plugin, including tools mounted under
7
+ xd://.
8
+ ---
9
+
10
+ # Figma MCP workflow
11
+
12
+ Use this skill whenever a user gives a Figma URL, file key, or node ID and asks for information about the design, a screenshot, design context, or implementation.
13
+
14
+ ## 1. Parse the reference
15
+
16
+ For a URL such as `https://www.figma.com/design/<fileKey>/<name>?node-id=5077-10161`, extract:
17
+
18
+ - `fileKey`: the segment after `/design/`.
19
+ - `nodeId`: the `node-id` query value. Convert `-` to `:` before sending it to Figma MCP (`5077-10161` becomes `5077:10161`).
20
+
21
+ Treat the Figma URL as input data. It is not an `xd://` URL and must never be appended to an `xd://` path.
22
+
23
+ ## 2. Discover the Figma MCP tool
24
+
25
+ Prefer the Figma MCP tool that matches the request:
26
+
27
+ - Implement or faithfully reproduce a design: `mcp__figma_get_design_context`.
28
+ - Inspect node structure, names, bounds, or children: `mcp__figma_get_metadata`.
29
+ - Get a rendered image when a screenshot is requested: use the available Figma screenshot/export tool.
30
+
31
+ If the tool is not visible in the top-level tool list, discover it before reporting that Figma MCP is unavailable:
32
+
33
+ ```text
34
+ read xd://
35
+ read xd://mcp__figma_get_design_context
36
+ write xd://mcp__figma_get_design_context with the JSON arguments
37
+ ```
38
+
39
+ Read `xd://` to find the exact mounted tool name. Read the selected tool path to obtain its current schema. Then call it by writing valid JSON arguments to that same `xd://` path. `xd://` is an OMP mounted-tool catalog, not a web proxy.
40
+
41
+ Do not try `xd://https://www.figma.com/...`. Do not stop after checking only top-level tools.
42
+
43
+ ## 3. Use the Figma workflow guidance when available
44
+
45
+ For design-to-code requests, the Figma-provided workflow guidance can add implementation details. If the host exposes MCP resources, try the explicit MCP resource route:
46
+
47
+ ```text
48
+ read mcp://skill://figma/figma-design-to-code/SKILL.md
49
+ ```
50
+
51
+ Never use plain `skill://figma/...` for this resource: OMP may resolve that path through its local skill namespace and return `Unknown skill: figma`. This resource lookup is optional. If either route fails, continue with this skill's instructions and the successful Figma MCP call; do not report that Figma MCP is unavailable merely because a workflow document could not be read.
52
+
53
+ Adapt any retrieved reference code to the target project's actual stack and existing components. Do not let an auxiliary skill-resource error prevent metadata, screenshot, or design-context retrieval.
54
+
55
+ ## 4. Report only observed results
56
+
57
+ Do not claim that a design was fetched, inspected, or implemented until the corresponding MCP call returns successfully. Preserve the user's file and node identifiers in follow-up calls, but do not expose access tokens, refresh tokens, client IDs, or long authorization URLs.
58
+
59
+ If discovery or a call fails, report the actual failure and the step that failed. Do not infer missing access from a tool that was never called.