i-diagram

An SVG diagram generator for creating scalable graphics such as architecture diagrams, flowcharts, timelines, mind maps, and sequence diagrams.

In plain words
What is it for?
Use it to show system components, process steps, time-ordered interactions, structures, relationships, or brainstorming ideas in a light or dark theme.
Why use it?
It turns technical or conceptual relationships into a visual document that can be viewed and resized without losing quality.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/jtsang4/efficient-coding/i-diagram
Any agent
npx skills add jtsang4/efficient-coding --skill i-diagram
Clone the repo
git clone --depth 1 https://github.com/jtsang4/efficient-coding

Made for: Claude Code, Codex.

Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,108 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00151 $0.04108
Opus 5 $0.00076 $0.02054
Sonnet 5 $0.00030 $0.00822
Haiku 4.5 $0.00015 $0.00411

Measured 2d ago against content hash ca3fd0a616b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

i-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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/main.ts), 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.

skills/i-diagram/SKILL.md · 274 lines

How it starts

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

Diagram Generator

Create professional SVG diagrams across multiple diagram types. All output is a single self-contained .svg file with embedded styles and fonts.

Theme Selection

Two themes are supported: light (default) and dark.

  • Use the light theme unless the user explicitly asks for dark (e.g. "暗色" "深色主题" "dark mode" "dark theme")
  • All colors in this document are defined as theme tokens — pick the column matching the selected theme and use those literals consistently throughout the SVG
  • Never mix tokens from both themes in one diagram

Supported Diagram Types

Type When to Use Key Characteristics
Architecture System components & relationships Grouped boxes, connection arrows, region boundaries
Flowchart Decision logic, process steps Diamond decisions, rounded step boxes, directional flow
Sequence Time-ordered interactions between actors Vertical lifelines, horizontal messages, activation bars
Structural Class diagrams, ER diagrams, org charts Compartmented boxes, typed relationships (inheritance, composition)
Mind Map Brainstorming, topic exploration Central node, radiating branches, organic layout
Timeline Chronological events Horizontal/vertical axis, event markers, period spans
Illustrative Conceptual explanations, comparisons Free-form layout, icons, annotations, visual metaphors
State Machine State transitions, lifecycle Rounded state nodes, labeled transitions, start/end markers
Data Flow Data transformation pipelines Process bubbles, data stores, external entities

Design System

All colors below are theme tokens. After selecting the theme, substitute every token with its literal value from the matching column. Token placeholders like {bg}, {text}, {line} appear in code snippets throughout this document and the reference files.

Base Tokens

Token Light (default) Dark Use For
{bg} #f8fafc #0f172a Canvas background, masking rects
{grid} #e2e8f0 #1e293b Background grid lines
{text} #0f172a white Primary labels, component names
{text-sub} #64748b #94a3b8 Sublabels, descriptions, annotations
{text-msg} #334155 #e2e8f0 Message/arrow labels
{line} #64748b #64748b Default arrows, connection lines
{line-soft} #94a3b8 #334155 Lifelines, dividers, subtle lines

Read the full file on GitHub · 274 lines

Files

What ships with it

6 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. 2d ago First seen · 274 lines · 151 tokens per session scan A ca3fd0a616b0

Subscribe to this mod's changes

i-diagram is a skill published in the GitHub repository jtsang4/efficient-coding (2 stars, last pushed 7d ago), licensed MIT. It adds 151 tokens to every session and 4,108 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-08-31.