figma-preflight
Skill194 starsChanged 7 months agoMITView on GitHub
Triggers on 'let's start', 'begin', 'preflight', 'start the session', or when a Figma file URL is first shared. Verifies MCP connection, reads CLAUDE.md, audits connected libraries, and loads a Token Map of all Styles and Variables — required before any design work.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- thiagoxikota/figma-maxxingtheir own version, first seen Oct 5, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- thiagoxikota/figma-maxxing★ 12same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- component-rulesSkill
- figma-style-bindingSkill
- reference-interpreterSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Run at the start of every design session.
- Distinctive: line 17
Run these two in parallel:
- Very specific: line 19
MCP Connection: Call mcp__figma__whoami. Must return user email and plan.
- Distinctive: line 20
CLAUDE.md: Read CLAUDE.md. Extract Figma file URL (required — stop if missing), font families, session goal.
- Very specific: line 28
File Access: Call get_metadata with extracted nodeId and fileKey.
- Very specific: line 29
Libraries: Call get_libraries with fileKey.
- Very specific: line 81
After Step C, derive a semantic index from variables grouped by scopes:
- Distinctive: line 117
If any step fails, output ❌ with error and stop.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill 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.
Files
Figma Preflight
Run at the start of every design session. Do NOT start design work until all steps pass.
Prerequisite: Load figma-use skill before any use_figma call.
Step A — Connection + Config (parallel)
Run these two in parallel:
- MCP Connection: Call
mcp__figma__whoami. Must return user email and plan. Fail → stop, re-authenticate. - CLAUDE.md: Read CLAUDE.md. Extract Figma file URL (required — stop if missing), font families, session goal. If fonts field is a placeholder, auto-populate after Step C using STRING variables starting with "Family".
Step B — File + Libraries (parallel)
Parse fileKey from the Figma URL, then run in parallel:
- File Access: Call
get_metadatawith extracted nodeId and fileKey. Must return file name and pages. - Libraries: Call
get_librarieswith fileKey. Store subscribed libraries as Library Registry (name, libraryKey, description). These enablesearch_design_systemto find library styles and components during design work.
Step C — Styles + Variables + Components (single use_figma call)
Combine all three inventories in one script:
const textStyles = await figma.getLocalTextStylesAsync();
const paintStyles = await figma.getLocalPaintStylesAsync();
const collections = await figma.variables.getLocalVariableCollectionsAsync();
const variables = await figma.variables.getLocalVariablesAsync();
const grouped = {};
for (const v of variables) {
const key = v.resolvedType;
if (!grouped[key]) grouped[key] = [];
grouped[key].push({ name: v.name, scopes: v.scopes });
}
const components = {};
for (const page of figma.root.children) {
await figma.setCurrentPageAsync(page);
const sets = page.findAll(n => n.type === "COMPONENT_SET");
const solos = page.findAll(n => n.type === "COMPONENT" && n.parent.type !== "COMPONENT_SET");
if (sets.length > 0 || solos.length > 0) {
components[page.name] = {
sets: sets.map(c => c.name),
solos: solos.map(c => c.name).slice(0, 15),
};
}
}
return {
textStyles: textStyles.map(s => s.name),
paintStyles: paintStyles.map(s => s.name),
collections: collections.map(c => c.name),
variableCount: variables.length,
byType: Object.fromEntries(
Object.entries(grouped).map(([type, vars]) => [type, vars.map(v => v.name)])
),
components
};Store names only in context. IDs are looked up on-demand during design work. Library styles/variables are discovered via search_design_system.
Token Map
After Step C, derive a semantic index from variables grouped by scopes:
| Role | Scope | Example names |
| Background fill | FRAME_FILL, SHAPE_FILL | background/surface, color/neutral-100 |
| Text color | TEXT_FILL | text/primary, color/neutral-900 |
| Border / stroke | STROKE_COLOR | border/default, color/neutral-300 |
| Gap | GAP | gap/sm, spacing/xxs |
| Padding | PADDING | padding/md, spacing/section-xl |
| Border radius | CORNER_RADIUS | radius/sm, radius/full |
Status Report
✅ MCP Connection — [name] ([email]) · [plan]
✅ CLAUDE.md — Font: [primary] / [code] · Goal: [goal]
✅ Figma File — [file name] · [N] pages
✅ Libraries — [N] connected: [names]
✅ Styles — [N] text + [N] paint
✅ Variables — [N] across [N] collections
✅ Components — [N] sets across [N] pages
── Token Map ──────────────────────────────
Background : [names]
Text : [names]
Border : [names]
Gap : [names]
Padding : [names]
Radius : [names]
────────────────────────────────────────────
Ready to design.If any step fails, output ❌ with error and stop.
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
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.

