figma-generate-diagram

figma-generate-diagram is a skill for Codex from PracticalSwan/agent-skills. It costs 164 tokens per session (2,931 once invoked), scanned A, original, MIT.

A guide for creating editable diagrams in FigJam from Mermaid text, including flowcharts, architecture diagrams, sequence diagrams, and entity-relationship diagrams.

In plain words
What is it for?
Use it to create flowcharts, sequence diagrams, state diagrams, timelines, or database relationship diagrams from structured text.
Why use it?
It helps choose a supported diagram format and avoid rendering problems when generating diagrams.

Skill for Codex

Written for Codex: reads ~/.codex or $CODEX_HOME. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it to create flowcharts, sequence diagrams, state diagrams, timelines, or database relationship diagrams from structured text.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/practicalswan/agent-skills/figma-generate-diagram
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 PracticalSwan/agent-skills --skill figma-generate-diagram
Clone the repo
git clone --depth 1 https://github.com/PracticalSwan/agent-skills

Made for: Codex.

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 figma-generate-diagram

README.md
[![agentmods](https://agentmods.dev/badge/skills/practicalswan/agent-skills/figma-generate-diagram/github.svg)](https://agentmods.dev/skills/practicalswan/agent-skills/figma-generate-diagram)
Your own site
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/figma-generate-diagram"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/figma-generate-diagram/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 figma-generate-diagram

Your own site · 80×15
<a href="https://agentmods.dev/skills/practicalswan/agent-skills/figma-generate-diagram"><img src="https://agentmods.dev/badge/skills/practicalswan/agent-skills/figma-generate-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 164 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,931 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.00164 $0.02931
Opus 5 $0.00082 $0.01465
Sonnet 5 $0.00033 $0.00586
Haiku 4.5 $0.00016 $0.00293

Measured 4d ago against content hash 5b2329c9afcc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

figma-generate-diagram 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 4d 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

figma-generate-diagram/SKILL.md · 165 lines

How it starts

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

generate-diagram

You MUST load this skill before every generate_diagram tool call. Skipping it causes preventable rendering failures and low-quality output.

generate_diagram takes Mermaid.js syntax and produces an editable FigJam diagram. This skill routes you to the right per-type guidance and sets universal constraints.

Step 1: Is generate_diagram the right tool?

Supported diagram types

flowchart, sequenceDiagram, stateDiagram / stateDiagram-v2, gantt, erDiagram.

Unsupported — don't call the tool

If the user wants any of these, tell them directly that generate_diagram doesn't support it instead of calling the tool and failing:

  • Pie chart, mindmap, venn diagram, class diagram, journey, timeline, quadrant, C4, git graph, requirement diagram

When to push the user to edit in Figma

The tool cannot:

  • Change fonts on an existing diagram
  • Move individual shapes
  • Edit a diagram node-by-node after generation

If the user asks for any of those on an existing diagram, recommend they open the diagram in Figma and edit there. For content-level changes, it's usually faster to regenerate.

Step 2: Pick the diagram type

Lightweight routing — use the first match.

User wants… Type Next step
Services + datastores + queues + integrations Architecture flowchart Read references/architecture.md
Decision tree, process flow, pipeline, dependency graph, user journey Flowchart Read references/flowchart.md
Interactions between parties over time (API calls, auth, messaging) Sequence diagram Read references/sequence.md
Data model, tables, keys, cardinality ER diagram Read references/erd.md
Named states with transitions between them State diagram Read references/state.md
Project schedule with dates, milestones Gantt chart Read references/gantt.md

Read the full file on GitHub · 165 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago Changed 5b2329c9afcc
  2. 6d ago Changed 189284c24a94
  3. 8d ago First seen · 165 lines · 164 tokens per session scan A b1e06bb48b5e

Subscribe to this mod's changes

figma-generate-diagram is a skill published in the GitHub repository PracticalSwan/agent-skills (14 stars, last pushed 4d ago), licensed MIT. It adds 164 tokens to every session and 2,931 once invoked, about $0.0008 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-09-03.

Related

Other skills, from other repositories

aws-diagram-mcp

Seamlessly create diagrams using the Python diagrams package DSL. This server allows you to generate AWS diagrams, sequence diagrams, flow diagrams, and class diagrams using Python code.

Friz-zy/ai-capability-registry · 40 tokens

drawio-skill

Create, edit, synchronize, inspect, test, and publish editable draw.io diagrams. Use when the user explicitly requests draw.io/diagrams.net, needs a polished architecture, ERD, UML, sequence, C4, SysML, BPMN, network, swimlane, ML, or infrastructure diagram, wants code/IaC/SQL/OpenAPI/AsyncAPI/Protobuf converted into…

Agents365-ai/drawio-skill · 133 tokens

figma-codegen

Generate framework-aware code from a Figma design. Reads the project's stack profile and emits code matching the existing framework (React/Vue/Svelte/Next/etc.) and styling (Tailwind/CSS/CSS-in-JS), reusing existing components and design tokens instead of regenerating from scratch. Triggers whenever the user wants a…

awdr74100/figwright · 145 tokens

figma-build

Build a Figma design from code or a description — the reverse of figma-codegen. Reuses the connected file's existing design system (components, variables, styles) instead of drawing primitives with hardcoded values. Triggers whenever the user wants something created or updated IN Figma from code or a spec — e.g.…

awdr74100/figwright · 180 tokens

create-diagram

Create architecture diagrams from a local codebase or system description. Use when the user asks to diagram a repo, map system architecture, show component relationships, create drill-down views, or explain a system visually with tld.

Mertcikla/tld · 48 tokens

create-component-md

Generate a canonical JSON contract and a self-contained implementation Markdown specification for a Figma component covering API, structure, color, and screen-reader behavior. Reads a base.json produced by the uSpec Extract plugin, runs four read-only interpretation skills in parallel, reconciles their outputs, and…

redongreen/uSpec · 107 tokens