figma-authoring-constraints
Use when a designer asks how to structure a Figma file so it produces clean code, when a design keeps yielding pixel-snapshot output, or when…
Skill by jajupmochi
Chalk Labs
Need help deploying figma-authoring-constraints?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jajupmochi-figma-authoring-constraints
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/figma-authoring-constraints
What's inside
- Skill name
figma-authoring-constraints- Description
- Use when a designer asks how to structure a Figma file so it produces clean code, when a design keeps yielding pixel-snapshot output, or when get_variable_defs comes back empty — the 20 Figma-side authoring constraints that make a design cleanly code-able via the Figma MCP.
- License
- MIT
- Instructions
- 108 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# /figma-authoring-constraints
Figma-side rules that make a design **clean and code-able** *before* it reaches an agent. These are the design
half of the pipeline: the `figma-design-fetch` skill fetches + implements + verifies; **this** is what makes the
fetch worth anything. If a design breaks these, `get_design_context` degrades to a rigid pixel snapshot and
`get_variable_defs` comes back empty — no amount of agent effort fixes a design authored as a flat mockup.
Authoritative source: Figma's [Structure your Figma file for better code](https://developers.figma.com/docs/figma-mcp-server/structure-figma-file/).
Each rule is one executable sentence + a reference. Give this to designers; the `figma-design-fetch`
**pre-fetch lint** enforces a subset (unbound colors · default names · raster nodes · absolute positioning) as
a hard gate.
## Master TOC
- [Variables / tokens (1–5)](#variables--tokens-15)
- [Auto layout (6–9)](#auto-layout-69)
- [Components / variants (10–12)](#components--variants-1012)
- [Naming (13–15)](#naming-1315)
- [Dev Mode / Code Connect readiness (16–18)](#dev-mode--code-connect-readiness-1618)
- [Don't use raster placeholders (19–20)](#dont-use-raster-placeholders-1920)
- [How these map to the MCP gotchas](#how-these-map-to-the-mcp-gotchas)
- [Companion](#companion)
- [Provenance](#provenance)
## Variables / tokens (1–5)
1. **Bind every color, spacing, radius, and font size to a Figma variable — never a bare literal.** This is
exactly what `get_variable_defs` returns; unbound values force the agent to eyeball hex.
([Figma](https://developers.figma.com/docs/figma-mcp-server/structure-figma-file/), [variables guide](https://help.figma.com/hc/en-us/articles/15339657135383-Guide-to-variables-in-Figma))
2. **Build two token tiers: primitive → semantic.** Primitives hold raw values (color ramps / spacing steps);
semantics alias them by UI role (page background / primary action / danger text).
([zeroheight](https://zeroheight.com/blog/figma-variables-and-design-tokens-part-one-variable-architecture/))
3. **Name semantic tokens by *intent*, not appearance** — `text/subdued` (survives dark mode), not `text/gray`
(breaks the moment a mode is added).
4. **Prefer variables over styles for anything tokenizable** (variables carry modes/themes, scoping, and
code-syntax handoff); reserve styles for what variables can't express — gradients / compound fills / shadows.
([Figma](https://help.figma.com/hc/en-us/articles/18490793776023-Update-1-Tokens-variables-and-styles))
5. **Set a "code syntax" on variables** so handoff / MCP emits the real code-side token name, not the Figma label.
## Auto layout (6–9)
6. **Every container uses auto layout — no absolute positioning.** Auto layout is what tells the agent the
responsive intent, and it maps cleanly to flexbox.
([Figma](https://developers.figma.com/docs/figma-mcp-server/structure-figma-file/), [auto layout guide](https://help.figma.com/hc/en-us/articles/360040451373-Guide-to-auto-layout))
7. **Set padding / gap / direction / alignment in the auto-layout panel, don't hand-nudge** — they map directly
to `padding` / `gap` / `flex-direction` / alignment.
8. **Use hug vs fill deliberately** (buttons/cards hug = content-sized; sections fill = `flex-grow:1`); don't mix
fill children under a hug parent.
9. **Nest auto-layout frames to express the real DOM hierarchy** (header + content each with its own padding/gap).
## Components / variants (10–12)
10. **Componentize anything reused** (button / card / input / nav item).
11. **States of one thing = variants; genuinely different things = different components**; organize by named
properties (Size / State). ([variants](https://help.figma.com/hc/en-us/articles/360056440594-Create-and-use-variants))
12. **Make every interactive state a variant** (default / hover / active / focus / disabled) so the agent has an
implementable state to build.
## Naming (13–15)
13. **Replace default names with intent names**: `Frame1268` / `Group5` → `CardContainer` / `ProductImage` /
`CTA_Button`.
14. **Match component names to what developers call them in code**, encoding hierarchy with `/`
(`Button/Primary/Default`); write the convention down before the first component.
([LogRocket](https://blog.logrocket.com/ux-design/design-to-code-with-figma-mcp/))
15. **Give pages / sections / frames clear, navigable names** — think about how a developer or agent finds this
frame. ([Dev Mode guide](https://help.figma.com/hc/en-us/articles/15023124644247-Guide-to-Dev-Mode))
## Dev Mode / Code Connect readiness (16–18)
16. **Use Code Connect to link Figma components to real code** — Figma calls it the first path to consistent
code-side reuse; without it the model can only guess. (Needs Org/Enterprise; without it, use the markdown
`Need→Token` contract from #2/#13.)
17. **Use annotations + dev resources** to convey intent visuals can't (behavior / alignment / responsiveness;
link to the real component / doc).
18. **Select small frames (one Card, one Header), not big heavy frames** — small selections keep the MCP context
controllable and the output predictable.
([custom rules](https://developers.figma.com/docs/figma-mcp-server/add-custom-rules/))
## Don't use raster placeholders (19–20)
19. **Never hand the agent a flattened / rasterized mockup or a pure-image frame** — an image has no semantics,
so the model only produces a pixel snapshot that drifts from the design system. Build with real layers +
variables + components. ([LogRocket](https://blog.logrocket.com/ux-design/design-to-code-with-figma-mcp/))
20. **Avoid unnamed / deeply-nested layers mixed with tokens** (the inverse of #13/#2).
## How these map to the MCP gotchas
- **Empty `get_variable_defs`** = the design bound no variables (not an MCP bug). #1–#5 are the fix; the
`figma-design-fetch` pre-fetch lint makes "variables bound" a gate before code-gen.
- **`get_design_context` quality tracks structure** — auto layout / componentization / semantic names / Code
Connect are exactly what make it emit componentized code instead of a div-soup.
- **Low-fidelity mockup → pixel snapshot** = breaking #19; the fix is entirely on the design side.
- **Code Connect paywall** (needs Dev/Full seat + Org/Enterprise): when you lack it, #2/#13's markdown
`Need→Token` table + component barrel is the substitute mapping contract.
## Companion
- `figma-design-fetch` — the agent-side pipeline that consumes a design authored to these rules; its pre-fetch
lint enforces #1 / #6 / #13 / #19 as a gate.
## Provenance
The Figma-side (Part B) half of the Figma→code pipeline, distilled from Figma's official "structure your file"
guidance + the aliafsahnoudeh reference project. Kept as a standalone designer-facing spec so the design and the
agent-side pipeline evolve together.From jajupmochi/agent-harness, MIT.
More from jajupmochi/agent-harness
- 0.502score
figma-design-fetch
jajupmochi
Use when the user shares a figma.com URL, wants to implement/mock a UI from Figma, or do design-to-code — connect the Figma MCP, fetch the design…
SkillCFreshness: C★ 1Claude Code +9 - 0.502score
agent-update-watcher
jajupmochi
Use to keep up with the fast-moving agent ecosystem (new/updated CLIs, plugins, skills) WITHOUT burning tokens on constant checks.
SkillCFreshness: C★ 1Claude Code +9 - 0.502score
claude-desktop-sessions
jajupmochi
Use when Claude Code sessions started in the terminal CLI don't appear in the Claude Desktop app's Code tab, when you want to hand a running CLI session to…
SkillCFreshness: C★ 1Claude Code +9 - 0.502score
doc-writing
jajupmochi
Use when writing or updating any document a human will read — a design or architecture spec, a feature manual and its in-app guide, an audit / bugfix / test…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
long-running-tasks
jajupmochi
Manage long-running commands and multi-step work in Codex.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
init-agent-config
jajupmochi
Scaffold a new project with the relevant subset of agent-harness rules, hooks, skills, recommendations, and templates.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
agent-config-adapter
jajupmochi
Adapt an existing agent configuration or plugin to a new agent or model route.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
publish
jajupmochi
Tag a new version of agent-harness, push to GitHub, and create a GitHub release.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
autopilot
jajupmochi
Set up or manage the autopilot daily autonomous project-driver.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
init-codex-config
jajupmochi
Scaffold or migrate a project to use agent-harness from Codex.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
new-hook
jajupmochi
Scaffold a new hook under hooks/<kebab-name>/.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
end-of-turn-marker
jajupmochi
Every turn MUST end with a visible divider header followed by numbered summary items.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 10, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/jajupmochi/agent-harness
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jajupmochi
- 0.502score
agent-update-watcher
jajupmochi
Use to keep up with the fast-moving agent ecosystem (new/updated CLIs, plugins, skills) WITHOUT burning tokens on constant checks.
SkillCFreshness: C★ 1Claude Code +9 - 0.502score
claude-desktop-sessions
jajupmochi
Use when Claude Code sessions started in the terminal CLI don't appear in the Claude Desktop app's Code tab, when you want to hand a running CLI session to…
SkillCFreshness: C★ 1Claude Code +9 - 0.502score
doc-writing
jajupmochi
Use when writing or updating any document a human will read — a design or architecture spec, a feature manual and its in-app guide, an audit / bugfix / test…
SkillCFreshness: C★ 1Claude Code +9 - 0.502score
figma-design-fetch
jajupmochi
Use when the user shares a figma.com URL, wants to implement/mock a UI from Figma, or do design-to-code — connect the Figma MCP, fetch the design…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
init-codex-config
jajupmochi
Scaffold or migrate a project to use agent-harness from Codex.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
publish
jajupmochi
Tag a new version of agent-harness, push to GitHub, and create a GitHub release.
SkillCFreshness: C★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get figma-authoring-constraints running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
figma-authoring-constraints skill. Agent Mart. https://agentmart.dev/skills/jajupmochi-figma-authoring-constraints (last updated 2026-10-24)