Adonis0123/adonis-skills / skills/figma-mcp
figma-mcp
VerifiedHandles every /figma-mcp invocation, which covers two jobs. First, implement or match a UI from a Figma design URL or file key (e.g. '/figma-mcp 按设计稿把这个页面做成 React', '/figma-mcp 还原度要高'): hand the visual work to figma-design-to-code and follow through to a finished screen, not just a metadata read or screenshot. Second, install, authenticate, switch accounts, recover or verify the official Figma MCP server in Codex, Claude Code, Cursor or Grok Build, keeping registration account-neutral and each host's OAuth flow authoritative. Use whoami for readiness, named-account, recovery, write and multi-host checks; for a current-account single-host read, including implement/match, let the first official read prove readiness instead of a separate identity call. Also read, filter, or audit Figma file comments (resolved review threads), which the MCP cannot read, and decide when to fall back to the Figma REST API with the user's token, e.g. on hosts outside the MCP Catalog like pi. Never copy OAuth tokens between hosts.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.4 KB |
| evals/check_description_handoff.py | script | 5.5 KB |
| evals/evals.json | config | 19.8 KB |
| evals/test_rest_scope.py | script | 3.2 KB |
| evals/trigger-eval.json | config | 2.8 KB |
| references/authentication.md | markdown | 5.6 KB |
| references/host-verification.md | markdown | 5.3 KB |
| references/rest-comments.md | markdown | 4.8 KB |
| references/rest-fallback.md | markdown | 5.4 KB |
| scripts/figma_rest.pyexecutable | script | 7.2 KB |
references/authentication.md
View on GitHub# Authentication
Read this reference only when Figma OAuth is required, the connected identity is wrong, or the user explicitly asks for Computer Use assistance.
## Keep credentials host-native
Each supported host owns its Figma registration, OAuth client flow, callback, and credential cache. Sharing the endpoint or using the same Figma account does not authorize copying credentials between hosts.
Never read, export, print, move, or symlink:
- OAuth access or refresh tokens;
- credential-store entries;
- browser cookies or profiles;
- callback query parameters;
- `whoami` names, emails, plan names, or IDs (a `planKey` may still be passed as a tool parameter when a write tool requires it).
## Keep the shared configuration account-neutral
The reusable configuration contains only the official server identifier and endpoint. It must not contain a default account, email, account alias, token, cookie, browser profile, or callback value.
When the user does not name an account, keep the current host's OAuth grant; the main skill defines which paths need `whoami`. When the user names an account, treat that identity as an invocation-time requirement rather than a stored setting.
Changing accounts must never require a second Figma server entry. Preserve the current registration and replace only the current host surface's OAuth grant.
## Switch accounts without rewriting registration
1. Call `whoami` once and compare privately when the user named a target.
2. If the current account already matches, keep the grant and stop; do not reauthenticate.
3. If it does not match, clear only the current host surface's Figma OAuth grant. An explicit switch request authorizes this scoped logout; follow any stricter host confirmation policy.
4. Start that surface's native login or Connect flow without removing or re-adding the MCP server.
5. On Figma's official OAuth page, use Switch accounts when needed and select only the user's requested existing account.
6. Let the user handle passwords, passkeys, Touch ID, 2FA, CAPTCHA, or any ambiguous account chooser.
7. After the callback succeeds, call `whoami` exactly once and report only `MATCH`, `MISMATCH`, or `UNVERIFIED`.
Use the installed host's native capability:
| Host surface | Scoped account-switch route |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| Codex CLI | `codex mcp logout figma`, then `codex mcp login figma` |
| Codex app | Figma plugin Disconnect/Connect UI |
| Claude Code | `claude mcp logout <exact-figma-identifier>`, then `claude mcp login <exact-figma-identifier>` |
| Cursor | Figma MCP/plugin Disconnect/Connect UI; use a CLI logout only if the installed CLI advertises one |
| Grok Build | The session's native Figma OAuth prompt; Grok has no `mcp logout`, so report `UNVERIFIED` rather than deleting credential files by hand |
App plugins and CLIs can keep separate grants. Do not assume switching one surface switches another.
## Select the requested account
When the user names an account:
1. Start the native login flow for exactly one host.
2. If the browser already shows an unambiguous account chooser, select only the requested account.
3. Stop and ask the user when the account is absent, ambiguous, or requires credentials, a passkey, Touch ID, 2FA, CAPTCHA, or another challenge.
4. Approve Figma access only when the consent page clearly belongs to the expected official endpoint and requested account.
5. Return to the host and call `whoami` once.
6. Compare privately and report only `MATCH`, `MISMATCH`, or `UNVERIFIED`.
When the user does not name an account, do not infer a remembered target from previous conversations or local files. On paths that use `whoami`, accept the returned identity and report the Account state as `CURRENT`; the read-only fast path reports `NOT_READ`.
If the wrong account is connected, clear only the Figma grant for the current host. Do not sign out of the user's entire browser, close unrelated sessions, or modify account settings.
## Use Kimi Computer Use only as an authorized helper
When the user explicitly requests Kimi Computer Use and the `kimi-computer-use` skill is installed:
1. Follow that skill's installation and permission checks.
2. Call `list_apps` only when the browser process identity is unknown.
3. Inspect the target browser with `get_app_state` in `ax` mode before acting.
4. Use the smallest non-secret action needed to select the requested existing account or approve the expected consent page.
5. Call `get_app_state` again after every UI mutation.
6. Stop for password, passkey, Touch ID, 2FA, CAPTCHA, account ambiguity, or unexpected consent.
Computer Use does not prove MCP readiness. The same host must still complete the path-specific proof defined by the main skill.
## Keep evidence private
Authentication evidence should contain only:
- host name;
- native command or UI route used;
- whether authentication completed;
- proof call as `WHOAMI` or `REQUESTED_READ`, and whether it completed;
- account result as `CURRENT`, `MATCH`, `MISMATCH`, `UNVERIFIED`, or `NOT_READ` for the identity-free read-only fast path;
- one blocker when incomplete.
Do not capture or attach screenshots that contain account identifiers, OAuth codes, private Figma file names, or unrelated tabs.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |