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.
npx skills add skillmds/skillmd --skill diagramgit clone --depth 1 https://github.com/skillmds/skillmdWrote 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.
[](https://agentmods.dev/skills/skillmds/skillmd/diagram)<a href="https://agentmods.dev/skills/skillmds/skillmd/diagram"><img src="https://agentmods.dev/badge/skills/skillmds/skillmd/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.
<a href="https://agentmods.dev/skills/skillmds/skillmd/diagram"><img src="https://agentmods.dev/badge/skills/skillmds/skillmd/diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00063 | $0.01732 |
| Opus 5.5 | $0.00025 | $0.00693 |
| Sonnet 5 | $0.00013 | $0.00346 |
| Haiku 4.5 | $0.00006 | $0.00173 |
Grade A, and why
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.
How it starts
The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are in AUTONOMOUS MODE. Do NOT ask questions. Analyze the project codebase and generate comprehensive architecture diagrams using Mermaid.
INPUT: $ARGUMENTS
Accepted arguments:
- No arguments: generate all applicable diagram types.
c4: generate C4 Context and Container diagrams only.sequence: generate sequence diagrams for key flows only.er: generate ER diagram from database schema only.depsordependency: generate module dependency graph only.- A specific flow description (e.g., "user login flow"): generate a sequence diagram for that specific flow.
============================================================ PHASE 1: CODEBASE ANALYSIS
Step 1.1 -- Tech Stack and Architecture Detection
Scan config files to determine: project type (web app, API, mobile, CLI, library, monorepo), primary language/framework, database(s), external services (auth, payment, email, storage), message queues, caching layers, and API gateway config.
Step 1.2 -- Service and Module Mapping
For monorepos/microservices: read docker-compose.yml or K8s manifests for service definitions, map inter-service communication, identify external deps per service.
For monoliths: read directory structure to identify modules/domains, trace import statements to map module dependencies, identify layer boundaries.
Step 1.3 -- Database Schema Extraction
Scan for schema definitions in: schema.prisma, .entity.ts (TypeORM/MikroORM), models/.js (Sequelize), models.py (Django), db/schema.rb (Rails), models/.py (SQLAlchemy), schema.ts (Drizzle), migrations/.sql, *.model.ts (Mongoose).
Extract: table/collection names, columns with types, primary/foreign keys, relationships (1:1, 1:N, M:N), indexes, and enums.
Step 1.4 -- Key Flow Identification
Identify the most important flows to diagram:
- Authentication flow (login, signup, token refresh)
- Primary business flow (main use case)
- Data write flow (create/update through layers)
- API request lifecycle (middleware, validation, handler, response)
- Background job flow (if applicable)
For each flow, trace: entry point, middleware, service layer, data access, external calls, and response construction.
============================================================ PHASE 2: DIAGRAM GENERATION
Generate Mermaid diagrams. Use C4 syntax for architecture diagrams.
Step 2.1 -- C4 Context Diagram
Show the system in its environment: users/actors, the system boundary, and all
external systems it connects to. Use C4Context with Person, System,
System_Ext, and Rel elements. Keep it high-level -- no internal details.
Step 2.2 -- C4 Container Diagram
Show major containers within the system boundary: web apps, API servers, databases,
caches, workers, message queues. Use C4Container with Container, ContainerDb,
ContainerQueue elements. Show relationships with protocols (HTTPS, SQL, AMQP).
Step 2.3 -- Sequence Diagrams
For each key flow, generate a sequenceDiagram showing participants and
message flow. Always generate auth flow if auth exists. Generate the primary
business flow. Include request/response payloads as notes where helpful.
Step 2.4 -- ER Diagram
Generate from extracted schema using erDiagram syntax. Include all tables with
columns (name, type, PK/FK/UK markers) and relationships with cardinality
notation (||--o{, }o--o{, etc.).
Step 2.5 -- Module Dependency Graph
Generate a graph TD showing how internal modules depend on each other.
Place entry points (routes/controllers) at top, data stores at bottom,
external systems on sides. Flag circular dependencies as warnings.
Use style directives to color-code layers.
============================================================ PHASE 3: OUTPUT AND ORGANIZATION
Create docs/diagrams/ directory if it does not exist.
Write individual files:
docs/diagrams/c4-context.md-- C4 Context diagramdocs/diagrams/c4-container.md-- C4 Container diagramdocs/diagrams/sequence-auth.md-- Auth sequence (if applicable)docs/diagrams/sequence-[flow].md-- Business flow sequencedocs/diagrams/er-diagram.md-- ER diagram (if database exists)docs/diagrams/dependency-graph.md-- Module dependency graph
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.
- 4d ago First seen · 206 lines · 63 tokens per session scan A d5b40dee8cb6
diagram is a skill published in the GitHub repository skillmds/skillmd (1 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 1,732 once invoked, about $0.0003 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-09-19.
Other skills, from other repositories
frontend
Builds, styles, and polishes web UI and UX. Use for any frontend, page, component, styling, layout, animation, or visual-quality task, or when asked to make an interface look or feel a certain way.
designlang-tokens
Use when styling UI for cal.com — references the extracted design system tokens instead of inventing colors, spacing, or typography.
antv-x6-editor
A skill for creating and troubleshooting interactive diagrams with AntV X6, a JavaScript engine for editors made of connected nodes and lines. It supports diagram types such as flowcharts, dependency graphs, entity-relationship diagrams, and organization charts.
antv-infographic
Create beautiful infographics based on given text content. Use when users request to create infographics.
write-zot-themes
Help the user create, install, or package zot themes, including theme-only extensions.
cli-anything-photoshop
A command-line tool that controls Adobe Photoshop through Windows automation. It can work with Photoshop documents, layers, selections, text, image adjustments, and exports.