agentleFS
karthikyaddanakarthikyaddana/figma-mcp-free/.github/copilot-instructions.md

figma-mcp-free

Copilot instructions17 starsChanged 9 months agoMITView on GitHub

These rules define the recommended workflow when implementing Figma designs using the Figma MCP Free server. The bridge extracts full typography information: - fontFamily: The font family name - fontWeight: CSS numeric weight (100-900), mapped from Figma style names - fontStyle: "italic" or "oblique" when applicable - fontSize: Size in pixels - lineHeight: In px or % (omitted for AUTO) - letterSpacing: In px or % (omitted when 0) - textCase: CSS values (uppercase, lowercase, capitalize, small-caps) - textDecoration: CSS…

The file

We split this copilot-instructions.md into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run get_design_context first to fetch the structured representation for the exact node(s).

    line 7
  2. Very specific:

    If the response is too large or truncated, run get_metadata to get the high-level node map with layer IDs, names, types, positions, and …

    line 8
  3. Very specific:

    Run get_screenshot for a visual reference of the node being implemented.

    line 9
  4. Very specific:

    Run get_variable_defs to retrieve design tokens (colors, spacing, typography variables).

    line 10
  5. Distinctive:

    Only after you have design context, screenshot, and token info, start implementation.

    line 11
  6. Distinctive:

    Treat the Figma MCP output as a representation of design structure and behavior, not as final code.

    line 17
  7. Distinctive:

    Use the project's color system, typography scale, and spacing tokens consistently.

    line 19
  8. Very specific:

    Always use colon-separated format: 4029:12345

    line 39
  9. Distinctive:

    Never use hyphens in node IDs

    line 40
  10. Very specific:

    When extracting from Figma URLs, convert node-id=1-2 to 1:2

    line 41
  11. Distinctive:

    When nodes use Figma variables (design tokens), the output includes:

    line 69
  12. Very specific:

    Use get_variable_defs to resolve variable IDs to names and values

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Figma MCP Free Rules

These rules define the recommended workflow when implementing Figma designs using the Figma MCP Free server.

Required Flow (do not skip)

  1. Run get_design_context first to fetch the structured representation for the exact node(s).
  2. If the response is too large or truncated, run get_metadata to get the high-level node map with layer IDs, names, types, positions, and sizes. Then re-fetch only the required node(s) with get_design_context.
  3. Run get_screenshot for a visual reference of the node being implemented.
  4. Run get_variable_defs to retrieve design tokens (colors, spacing, typography variables).
  5. Only after you have design context, screenshot, and token info, start implementation.
  6. Translate the output into this project's conventions, styles, and framework. Reuse existing color tokens, components, and typography.
  7. Validate against Figma for 1:1 look and behavior before marking complete.

Implementation Rules

  • Treat the Figma MCP output as a representation of design structure and behavior, not as final code.
  • Reuse existing components (buttons, inputs, typography, icon wrappers) instead of duplicating functionality.
  • Use the project's color system, typography scale, and spacing tokens consistently.
  • Respect existing routing, state management, and data-fetch patterns already adopted in the repo.
  • Strive for 1:1 visual parity with the Figma design.
  • Validate the final UI against the Figma screenshot for both look and behavior.

Tool Usage Guide

ToolWhen to Use
get_metadataFirst, to understand structure of large designs. Returns lightweight node tree with IDs, types, positions, sizes.
get_design_contextPrimary tool. Returns full layout, typography, fills, effects, components for selected nodes.
get_screenshotAlways. Provides visual reference for implementation validation. PNG preserves transparency.
get_variable_defsTo extract design tokens (colors, spacing, typography variables).
get_stylesTo get all local text/paint/effect styles defined in the document.
get_nodeTo fetch a specific node by ID with full properties.
get_selectionTo see what's currently selected in Figma.
create_design_system_rulesOnce per project. Generates custom rules tailored to your stack.

Node ID Format

  • Always use colon-separated format: 4029:12345
  • Never use hyphens in node IDs
  • When extracting from Figma URLs, convert node-id=1-2 to 1:2

Typography Data

The bridge extracts full typography information:

  • fontFamily: The font family name
  • fontWeight: CSS numeric weight (100-900), mapped from Figma style names
  • fontStyle: "italic" or "oblique" when applicable
  • fontSize: Size in pixels
  • lineHeight: In px or % (omitted for AUTO)
  • letterSpacing: In px or % (omitted when 0)
  • textCase: CSS values (uppercase, lowercase, capitalize, small-caps)
  • textDecoration: CSS values (underline, line-through)
  • textSegments: When text has mixed styles, individual segments with their own style properties

Layout Data

Auto-layout properties map to CSS flexbox:

  • mode: "row" or "column" (maps to flex-direction)
  • justifyContent: flex-start, flex-end, center, space-between
  • alignItems: flex-start, flex-end, center, baseline
  • gap: Gap between items in px
  • padding: CSS shorthand padding
  • wrap: Whether flex-wrap is enabled
  • sizing.horizontal / sizing.vertical: "fixed", "fill" (flex-grow), or "hug" (fit-content)

Variable Bindings

When nodes use Figma variables (design tokens), the output includes:

  • boundVariables: Maps property names to variable IDs
  • fills[].variableId: Variable ID bound to a specific fill color
  • Use get_variable_defs to resolve variable IDs to names and values

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.