docs-diagram

docs-diagram is a skill for Claude Code from mgiovani/cc-arsenal. It costs 118 tokens per session (1,687 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: disable-model-invocation in frontmatter. Also seen: agent in frontmatter; mentions subagents.

Part of the cc-arsenal-docs plugin — 6 skills shipped together , and of cc-arsenal

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-docs, the plugin that ships this one along with the rest of its 6 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,687 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.01687
Opus 5.5 $0.00047 $0.00675
Sonnet 5.5 $0.00024 $0.00337
Haiku 4.5 $0.00012 $0.00169

Measured 1mo ago against content hash 4419de4b89e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 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 · 143 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. 1mo ago Changed · +15 lines 4419de4b89e7
  2. 2mo ago Changed 44f539a1ccbb
  3. 2mo ago Changed · +1 lines 572023c6e490
  4. 3mo 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 1mo ago), licensed MIT. It adds 118 tokens to every session and 1,687 once invoked, about $0.0005 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-08-31.

Related

docs-diagram compared with skills from other repositories

docs-diagram next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
docs-diagrammgiovani/cc-arsenalSkill81mo agoMITA118Claude Code
frontendcode-yeongyu/lazycodexSkill4.0k2d agoMITA79Codex
landing-cro-reviewAtomicBot-ai/atomic-agentSkill3.6ktodayMITA28Claude Code, Codex
aoe-keyboard-focusagent-of-empires/agent-of-empiresSkill5.3ktodayMITA71Claude Code, Codex
app-screenshot-debugtermio-sh/termioSkill7162d agoMITA161Claude Code, Codex
cli-anything-photoshopyb2460/harness-anythingSkill3.3k1mo agoMITA43Claude Code, Codex
write-zot-themespatriceckhart/zotSkill374yesterdayMITA23Claude Code, Codex