figma-generate-diagram — Codex skill: what it does, how to install
Prepares Mermaid.js syntax for the generate_diagram tool and renders editable FigJam boards. Needed before building flowcharts, ERDs, or sequence diagrams.
npx skills add openai/plugins --skill figma-generate-diagram -a codexWhat figma-generate-diagram does
This skill acts as a required filter before invoking the generate_diagram tool. It instructs the agent to create clean Mermaid.js code that renders as an editable FigJam diagram. Supported formats include flowcharts, sequence diagrams, state diagrams, ER diagrams, and Gantt charts.
The skill enforces strict syntax rules. Mermaid input cannot contain emojis, HTML tags, or literal \n escape sequences. Node identifiers require camelCase formatting without underscores to keep line routing intact. If you request an unsupported diagram such as a mindmap, class diagram, or pie chart, the skill halts execution instead of attempting a broken tool call.
Because generated boards live in FigJam, calling design-only APIs like figma.createPage() will throw an error. Keep this skill active if you generate architecture flows or database models through Codex. Without these guidelines, Mermaid rendering frequently fails.
What it helps with
- Prevent Mermaid syntax failures when rendering FigJam boards
- Generate architecture flowcharts directly from source code
- Build database ER diagrams from table definitions
- Trace API authentication handshakes with sequence diagrams
Example prompts for the agent
- Generate a FigJam ER diagram for our database schema
- Draw a sequence diagram for the API authentication flow
- Build an architecture flowchart for services in this repository
How to install figma-generate-diagram
1Skills CLI (Vercel)
npx skills add openai/plugins --skill figma-generate-diagram -a codex2Manually: put the files in place
.agents/skills/figma-generate-diagram/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openai/plugins --skill figma-generate-diagram -a claude-code2Manually: put the files in place
~/.claude/skills/figma-generate-diagram/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/figma-generate-diagram/
Manually: put the files in place
.cursor/skills/figma-generate-diagram/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openai/plugins figma-generate-diagram2Manually: put the files in place
.github/skills/figma-generate-diagram/SKILL.mdPlatform CLI
gemini skills install https://github.com/openai/plugins --path plugins/figma/skills/figma-generate-diagramManually: put the files in place
.devin/skills/figma-generate-diagram/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set201
The whole set →Similar
Questions about figma-generate-diagram
How to install figma-generate-diagram in Codex?
Run npx skills add openai/plugins --skill figma-generate-diagram -a codex in your project terminal.
What does figma-generate-diagram do?
It routes requests to appropriate diagram workflows and enforces syntax constraints for Mermaid before calling generate_diagram.
Which diagram formats are unsupported?
The tool rejects mindmaps, pie charts, C4 diagrams, class diagrams, and git graphs. The skill warns about these limitations before running any calls.