docs-diagram

docs-diagram is a skill for Claude Code from mgiovani/cc-arsenal. It costs 118 tokens per session (1,349 once invoked), scanned A, original, MIT.

A tool that creates Mermaid diagrams from the actual codebase. Mermaid is a text format for diagrams, such as database relationships, system architecture, deployment infrastructure, and security data flows.

In plain words
What is it for?
Use it to create entity-relationship diagrams for database models, architecture diagrams, deployment and continuous-integration setups, or security data flows in the docs/ folder.
Why use it?
It turns code and configuration into documentation that shows how the system is structured. This avoids drawing diagrams from outdated assumptions or invented details.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter; mentions subagents.

Part of the cc-arsenal plugin — 53 skills shipped together

Good fit Use it to create entity-relationship diagrams for database models, architecture diagrams, deployment and continuous-integration setups, or security data flows in the docs/ folder.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mgiovani/cc-arsenal/docs-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 mgiovani/cc-arsenal --skill docs-diagram
Clone the repo
git clone --depth 1 https://github.com/mgiovani/cc-arsenal

Made for: Claude Code.

Or install cc-arsenal, the plugin that ships this one along with the rest of its 53 skills.

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 docs-diagram

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/mgiovani/cc-arsenal/docs-diagram"><img src="https://agentmods.dev/badge/skills/mgiovani/cc-arsenal/docs-diagram.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,349 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.00118 $0.01349
Opus 5 $0.00059 $0.00674
Sonnet 5 $0.00024 $0.00270
Haiku 4.5 $0.00012 $0.00135

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

Security

Grade A, and why

docs-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 9d 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.

skills/docs-diagram/SKILL.md · 127 lines

How it starts

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

Generate System Diagrams

Generate a Mermaid diagram (ER, architecture, deployment, or security) from the real codebase and write it to docs/.

Supported Diagram Types

Type Output File Description
er docs/data-model.md Entity-Relationship diagram from database models
arch docs/architecture.md System architecture and component relationships
deployment docs/deployment.md Deployment infrastructure and CI/CD
security docs/security.md Security architecture and data flow

Workflow

1. Parse the request

Extract the diagram type (er, arch, deployment, security) and any optional scope context (e.g. "for the user and order tables"). If the type is missing or invalid, don't guess: stop, and end your response with a direct question naming the supported types, e.g. "Which diagram type do you want: architecture, er, deployment, or security?". Listing the types without asking, or asking without listing them, is not enough. Go no further until the user answers.

2. Analyze the codebase

  • Scoped request (e.g. "er diagram for the user and order tables"): Read/Grep the named files directly.
  • Broad or ambiguous request (e.g. "show me the architecture" on an unfamiliar codebase): when a Task tool is available, spawn one Explore subagent per aspect that matters for the diagram type (e.g. for arch: services, databases, external integrations, data flow). Without a Task tool, run the same per-aspect checks sequentially inline with Read/Grep/Glob instead: same checks, no parallelism, just slower.

See references/detection-patterns.md for detection commands per diagram type.

3. Verify before adding anything

Diagrams must represent real, existing components, never a plausible guess.

  • Read the file that defines a component before adding it; don't add it from memory or inference.
  • Confirm a relationship by finding the actual import/reference/FK in code, not by assuming two similarly-named things are connected.
  • Get counts by running a command (e.g. find . -name "*service*" | wc -l), then use that number, never estimate "about 5 services".
  • Drop anything that can't be verified this way. An empty directory or an unused stub file is not a component.

Read the full file on GitHub · 127 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. 9d ago First seen · 127 lines · 118 tokens per session scan A be1b2fc9517a

Subscribe to this mod's changes

docs-diagram is a skill published in the GitHub repository mgiovani/cc-arsenal (8 stars, last pushed 9d ago), licensed MIT. It adds 118 tokens to every session and 1,349 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

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.

yb2460/harness-anything · 43 tokens

extract-design-system

Extract design primitives from a public website and generate starter token files for your project.

arvindrk/extract-design-system · 20 tokens

double-diamond

A four-stage design method for understanding a problem, defining it clearly, exploring possible solutions, and choosing one to deliver.

Insajin/autopus-adk · 17 tokens

nous-branding

Generate images and content consistent with the Nous Research brand identity. Use when creating visuals in the Nous / Theia / Hermes ecosystem: a "cyber-classical" style blending neo-classical statuary, cyberpunk/industrial grunge, and retro anime illustration. Covers official brand color palette, typography…

magnus919/agent-skills · 130 tokens

figma-use

Control Figma via CLI — create shapes, frames, text, components, set styles, layout, variables, export images. Use when asked to create/modify Figma designs or automate design tasks.

dannote/figma-use · 44 tokens

awesome-design-md

Create a DESIGN.md style baseline BEFORE building UI. Use FIRST when no design draft exists — installs a proven visual style, then invoke frontend-design to implement. For borrowing a known product style, getting consistent typography/colors/spacing, or needing a fast visual starting point.

rexleimo/aios · 59 tokens