margaret-design

margaret-design is a skill for Claude Code from sofiahernandes/margaret. It costs 181 tokens per session (1,235 once invoked), scanned A, original, MIT.

A two-way bridge between Figma and a codebase. It can route requests to create designs or diagrams in Figma, or turn existing Figma files and selections into code, design notes, links, or motion implementations.

In plain words
What is it for?
For generating screens, components, flowcharts, architecture diagrams, and FigJam boards, or bringing Figma work into an existing codebase.
Why use it?
It removes the need to explain the same project context separately when moving between interface design and development.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

Part of the margaret plugin — 8 skills, 4 commands shipped together

Good fit For generating screens, components, flowcharts, architecture diagrams, and FigJam boards, or bringing Figma work into an existing codebase.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sofiahernandes/margaret/margaret-design
Install

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.

Any agent
npx skills add sofiahernandes/margaret --skill margaret-design
Clone the repo
git clone --depth 1 https://github.com/sofiahernandes/margaret

Made for: Claude Code.

Or install margaret, the plugin that ships this one along with the rest of its 8 skills, 4 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for margaret-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/sofiahernandes/margaret/margaret-design/github.svg)](https://agentmods.dev/skills/sofiahernandes/margaret/margaret-design)
Your own site
<a href="https://agentmods.dev/skills/sofiahernandes/margaret/margaret-design"><img src="https://agentmods.dev/badge/skills/sofiahernandes/margaret/margaret-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for margaret-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/sofiahernandes/margaret/margaret-design"><img src="https://agentmods.dev/badge/skills/sofiahernandes/margaret/margaret-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 181 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,235 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00181 $0.01235
Opus 5.5 $0.00072 $0.00494
Sonnet 5.5 $0.00036 $0.00247
Haiku 4.5 $0.00018 $0.00123

Measured 24d ago against content hash d68e9a90bf10, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

margaret-design 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 24d 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.

skills/margaret-design/SKILL.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bridge to Figma, both directions. Doesn't reimplement Figma access — routes to whatever Figma capability this session has, and supplies the project context (existing tokens, stack, component conventions) that a bare invocation wouldn't have. Six modes, pick by intent or by the explicit argument.

Generate new artifacts

  • design (default): generate a new screen or component design from the given prompt or spec. Route to figma:figma-generate-design.
  • diagram: generate a flowchart, architecture, or sequence diagram. Route to figma:figma-generate-diagram for a standalone diagram, or figma:figma-use-figjam when the request is explicitly a FigJam working/brainstorm board rather than a diagram meant to sit in Figma alongside product design.

Ask for missing specifics (target file, spec, tokens) before generating — don't invent design intent that wasn't given.

Pull an existing file/selection into code

  • code: convert the given frame/component into working code. Route to figma:figma-design-to-code. Match this project's existing stack, component conventions, and styling approach — don't introduce a new one. Reuse existing design tokens/theme variables if the project has them instead of hardcoding values pulled from Figma.
  • context: pull structure, tokens, spacing, and component names from the file/selection and summarize — no code generated. Route to figma:figma-use. Use before a bigger build when the user wants to see what's there first.
  • connect: link existing code components to their Figma counterparts via Code Connect, so the Figma design panel resolves to the real implementation instead of a generic suggestion. Route to figma:figma-code-connect.
  • motion: read the motion/animation spec on the selection (transitions, easing, duration, triggers) and implement the equivalent in code using whatever animation approach the project already uses. Route to figma:figma-implement-motion.

If no Figma file or selection was given for a pull mode, ask for one before proceeding — do not guess at a design.

Read the full file on GitHub · 66 lines

Changes

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.

  1. 24d ago Changed · +26 lines d68e9a90bf10
  2. 3mo ago First seen · 40 lines · 181 tokens per session scan A 1068056c2f41

Subscribe to this mod's changes

margaret-design is a skill published in the GitHub repository sofiahernandes/margaret (2 stars, last pushed 23d ago), licensed MIT. It adds 181 tokens to every session and 1,235 once invoked, about $0.0007 per session on Opus 5.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-31.

Related

margaret-design compared with skills from other repositories

margaret-design next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
margaret-designsofiahernandes/margaretSkill223d agoMITA181Claude Code
figma-code-connect-componentsulises-jeremias/agent-toolkitSkill28yesterdayMITA92Claude Code
figma-create-design-system-rulesulises-jeremias/agent-toolkitSkill28yesterdayMITA71Claude Code
design-improvementulises-jeremias/agent-toolkitSkill28yesterdayMITA60Claude Code
architecture-diagramulises-jeremias/agent-toolkitSkill28yesterdayMITA171Claude Code
design-assessmentulises-jeremias/agent-toolkitSkill28yesterdayMITA61Claude Code
reviewulises-jeremias/agent-toolkitSkill28yesterdayMITA48Claude Code