Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/awdr74100/figwright/agents-mdgit clone --depth 1 https://github.com/awdr74100/figwrightWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.05203 | $0.05203 |
| Opus 5 | $0.02601 | $0.02601 |
| Sonnet 5 | $0.01041 | $0.01041 |
| Haiku 4.5 | $0.00520 | $0.00520 |
Grade A, and why
figwright AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AGENTS.md
Figwright is an open-source, bidirectional Figma agent for MCP clients (Claude Code and others). It connects an MCP server to a Figma plugin over a local WebSocket relay, letting an AI agent both read designs with high-fidelity grounding and write back to the canvas — no Figma paid tier required.
This file is the canonical guide for AI agents and contributors working in this repo. (CLAUDE.md points here.)
Architecture
Two halves talk over a local WebSocket relay:
- MCP server (
packages/mcp, published as@figwright/mcp) — the Node process an MCP client launches. It exposes 112 tools — reads, writes, and higher-level grounding tools that join Figma data with the user's codebase (component / token / icon maps) — plus a codegen prompt. It owns the relay, leader/follower election (multiple MCP servers can share one plugin; newest build wins — a leader on an older build abdicates to a newer one at the next idle moment), and request idempotency. - Figma plugin (
packages/plugin) — a Vue 3 + Vite UI plus a sandbox that runs inside Figma and performs the actual Figma API calls. It connects out to the server's WebSocket. - Shared (
packages/shared) — types, Zod schemas, the msgpack wire codec, and the plugin↔server protocol. It is bundled into the server at build time (not published on its own).
Design stance: provider-first. Rather than a fixed compiler pipeline, the tools surface faithful, de-duplicated design context and let the LLM generate code that matches the user's actual stack (detected framework / styling system). The figma-codegen skill and the MCP figma_to_code prompt encode this approach.
Layout
packages/
shared/ # types, Zod schemas, msgpack codec, plugin↔server protocol (bundled into mcp)
mcp/ # the MCP server — @figwright/mcp (Node, ESM): relay, election, tools, joins
plugin/ # Figma plugin — Vue 3 + Vite + Tailwind v4 (UI) + sandbox (Figma API)
skills/ # agent skills that orchestrate the tools (figma-codegen, figma-build) — installable via `npx skills add`
test/ # cross-package integration tests (e.g. server tool registry ↔ plugin handlers)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 100 lines · 5,203 tokens per session scan A f89cf1267b0e
figwright AGENTS.md is an instructions file published in the GitHub repository awdr74100/figwright (633 stars, last pushed 3d ago), licensed MIT. It adds 5,203 tokens to every session, about $0.0260 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
FigCC AGENTS.md
Instructions for madebypan/FigCC, covering agents.md, project identity, runtime architecture, security invariants and compatibility and storage.
Figma-to-Code_MCP CLAUDE.md
Instructions for vincegx/Figma-to-Code_MCP, covering claude.md, project overview, essential commands, docker environment (primary) and start the application (hot reload enabled).
naksha-studio GEMINI.md
Instructions for Adityaraj0421/naksha-studio, covering naksha design team — gemini cli, project memory (v5), how to use, the team and core design (6 roles).
figma-edit-mcp CLAUDE.md
Instructions for neozhehan/figma-edit-mcp, a project described as: Read, create, and modify Figma designs programmatically via MCP, empowering AI to execute Figma changes safer, cleaner, and faster.
stitch-kit AGENTS.md
Instructions for gabelul/stitch-kit, covering agents.md, what this repo is, skill structure, quick install (both platforms) and installing (claude code).
canicode CLAUDE.md
Instructions for let-sunny/canicode, covering canicode, core goal, target environment, tech stack and project structure.