diagram-create

diagram-create is a skill for Claude Code, Codex from yarlson/yarstack. It costs 108 tokens per session (2,367 once invoked), scanned A, original, MIT.

Create or update architecture, infrastructure, deployment, swimlane, and request sequence diagrams as generated HTML pages with inline SVG and one PNG per diagram, in one fixed style with built-in layout checks. Use when the user wants to draw how an existing system, environment, pipeline, data flow, or request flow…

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Install with agentmods
npx agentmods add skills/yarlson/yarstack/diagram-create
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 yarlson/yarstack --skill diagram-create
Clone the repo
git clone --depth 1 https://github.com/yarlson/yarstack

Made for: Claude Code, 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 diagram-create

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/yarlson/yarstack/diagram-create"><img src="https://agentmods.dev/badge/skills/yarlson/yarstack/diagram-create.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,367 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.00108 $0.02367
Opus 5.5 $0.00043 $0.00947
Sonnet 5.5 $0.00022 $0.00473
Haiku 4.5 $0.00011 $0.00237

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

Security

Grade A, and why

diagram-create 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 today.

The scan reads SKILL.md. This mod also ships 9 executable files (scripts/diagram/__init__.py, scripts/diagram/build.py, scripts/diagram/geometry.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/yarstack/skills/diagram-create/SKILL.md · 179 lines

How it starts

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

Diagram Creation

Diagrams are code. A project keeps one diagrams.py that defines its diagrams with the diagram package. One command checks every diagram against the layout rules, writes the HTML pages with inline SVG, checks in Chromium that all text fits, and writes one PNG for each SVG. The package fixes every color, font, and size, so all diagrams share one style.

D is the diagram folder of the project, docs/diagrams/ by default.

1. Decide whether to draw

  • Draw only when a reader learns more from the picture than from a paragraph or a table. A list of things is a table. A one-box diagram is a sentence.
  • Charts of data (bars, lines, scatter) are out of scope.
  • The best move is usually deletion. Each node is a distinct idea: merge two nodes that always travel together. Each arrow carries information: remove an arrow that the layout already shows. A diagram is done when nothing can be removed. Aim for a density of about 4 out of 10.

2. Set up the diagram folder

  1. If D already has a diagrams.py and a diagram/ package, use them. Follow the README or AGENTS.md in that folder. Those project rules override this skill.
  2. If the project has an older generator in this style (a script with an Svg class and zone, path, label, and node helpers), keep using it. It has none of the build checks. Port it to the package only when the user asks: each path string becomes a list of waypoints, and each label becomes the label of its edge.
  3. Otherwise, copy scripts/diagrams.py and the scripts/diagram/ package from this skill's directory into D. diagrams.py holds two example diagrams. Replace them with the real ones. Make sure that the repository ignores __pycache__/.

The package lives in the project, so the project can build its diagrams without this skill. To change the style, edit diagram/style.py. Never pass colors or fonts from a diagram function.

3. Workflow

  1. Collect the facts. Take every node, edge, and label from the source of truth: code, configuration, infrastructure as code, manifests, and pipeline definitions. Draw the current state, unless the page that shows the diagram says that it shows a plan. Never invent a component to fill the layout.
  2. Choose the type (§4). Read its section in references/diagram-types.md. Read references/drawing-api.md before the first diagram.
  3. State the plan in one short message: the type, the nodes, and what the budget (§6) cuts or splits. If the user can answer, let them redirect you. If not, continue and list your assumptions in the report.
  4. Write one function for each diagram in diagrams.py, and list the pages in PAGES. First sketch the grid of columns and rows, then compute the coordinates.
  5. Download the icons and build (§7). Fix every error that the build reports, then run the taste gate (§8).
  6. If D has a README index, update it when you add, rename, or remove a diagram. Delete the HTML and PNG files that the build reports as stale. Commit diagrams.py, the HTML pages, and the PNGs together. Never edit the generated files by hand.

Read the full file on GitHub · 179 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. today First seen · 179 lines · 108 tokens per session scan A b8a91a8f329b

Subscribe to this mod's changes

diagram-create is a skill published in the GitHub repository yarlson/yarstack (3 stars, last pushed yesterday), licensed MIT. It adds 108 tokens to every session and 2,367 once invoked, about $0.0004 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-11-06.

Related

diagram-create compared with skills from other repositories

diagram-create next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
diagram-createyarlson/yarstackSkill3yesterdayMITA108Claude Code, Codex
capturedavesheffer/hunchSkill15yesterdaynoneA21Claude Code
healdavesheffer/hunchSkill15yesterdaynoneA21Claude Code
fixdavesheffer/hunchSkill15yesterdaynoneA17Claude Code
whydavesheffer/hunchSkill15yesterdaynoneA18Claude Code
fragiledavesheffer/hunchSkill15yesterdaynoneA15Claude Code
safe-changecz1993/vibe-coding-repository-standardSkill212mo agoApache-2.0A54Codex