/cc-arsenal:docs-diagram <type> [context]from cc-arsenal
Generates Mermaid diagrams (ER, architecture, deployment, security) by analyzing the actual codebase and writes them to docs/.
Ships in cc-arsenal. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate a Mermaid diagram (ER, architecture, deployment, or security) from the
real codebase and write it to docs/.
| 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 |
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.
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.
Diagrams must represent real, existing components, never a plausible guess.
find . -name "*service*" | wc -l), then
use that number, never estimate "about 5 services".Use the syntax for the diagram type from references/mermaid-patterns.md. Keep it readable: if a system has too many pieces for one clear diagram, split it into multiple focused views rather than cramming everything into one.
Load assets/templates/<type>.md (er → data-model.md, arch →
architecture.md, deployment → deployment.md, security → security.md).
Replace {{PROJECT_NAME}} and {{DATE}}, plus the diagram placeholder and
the entity/component list placeholders, with the verified content from steps 3-4.
Write to the file in docs/ named in the table above. If it already exists, ask
before overwriting, and preserve any hand-written sections you can identify
(anything outside the placeholder fields).
Needs mmdc: install with npm i -g @mermaid-js/mermaid-cli, or run it ad hoc by defining mmdc() { npx -y -p @mermaid-js/mermaid-cli mmdc "$@"; } first. If Chromium refuses to launch in a sandbox, add -p with a puppeteer config of {"args":["--no-sandbox"]}.
Run this on the file you wrote; each FAIL <name>-N.mmd names the doc and the Nth mermaid block in it:
d=$(mktemp -d)
for md in docs/<file>.md; do
awk -v out="$d/${md//\//__}" '/^```mermaid/{f=out "-" ++n ".mmd"; next} /^```/{f=""} f{print > f}' "$md"
done
for f in "$d"/*.mmd; do mmdc -q -i "$f" -o "${f%.mmd}.svg" || echo "FAIL $f"; done
Fix each failing block using its parser error, then re-run until nothing prints FAIL. Cap at 3 rounds, then report the blocks that still fail. An unreplaced {{PLACEHOLDER}} in a block also fails here. If mmdc can't be installed (no Node or no network), say so in the report and fall back to a careful syntax review against references/mermaid-patterns.md.
State the diagram type and the output file, then report the actual counts detected (e.g. "4 entities, 6 relationships"). These must be the numbers from step 3's commands, not a summary written from memory. Suggest regenerating when the diagrammed subsystem changes.
Scoped ER request (docs-diagram er for the user and order tables): Grep for
class User / class Order in the ORM models directory, read both files, extract
columns and FKs, check the Order.user_id FK is actually declared
in the model, then write docs/data-model.md with an erDiagram block containing
only USER and ORDER.
Broad architecture request (docs-diagram arch): with a Task tool, spawn
Explore agents for services, databases, and external integrations; without one,
run find . -name "*service*", find . -name "*.config.*", and a grep for known
client SDKs sequentially. Merge only the components every check confirms into one
graph TB diagram.
Missing/invalid type (docs-diagram): do not guess a type or generate
anything; end the response with "Which diagram type do you want: architecture,
er, deployment, or security?" alongside their output files.
assets/templates/architecture.md (opens in a new tab)assets/templates/data-model.md (opens in a new tab)assets/templates/deployment.md (opens in a new tab)assets/templates/security.md (opens in a new tab)evals/evals.json (opens in a new tab)evals/trigger-eval.json (opens in a new tab)references/detection-patterns.md (opens in a new tab)references/mermaid-patterns.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
general-purpose), in the backgroundThree short reads, in order
52 skills in this plugin
/agent-browserHeadless browser automation CLI optimized for AI agents: drives a real browser via accessibility-tree snapshots and @e1-style refs for ~93% less context than raw DOM tools. Use whenever a task needs to interact with a live web page: click, fill forms, log in, extract text or data, take screenshots, test a running web app, or scrape a site. Triggers on 'automate the browser', 'fill this form', 'click the button', 'take a screenshot of the page', 'log into', 'scrape this site', 'test my web app', 'headless browser'. Not for Playwright test-suite authoring or CDP/service-worker work needing the full JS API: use Playwright directly. Not for driving the user's own already-open, logged-in Chrome tab: use claude-in-chrome for that./anything-to-skillTurns a docs site, local folder, PDF or book, YouTube video, playlist or channel, or a topic into a source-grounded, token-efficient agent skill (hub SKILL.md, sectioned references, INDEX, evals), and can compact it into a lean expert skill. Use for "make a skill from these docs", "turn this channel into a skill". Not for a skill from your own description (use create-skill), improving one (use improve-skill) or finding third-party skills (use find-skills).Other plugins' skills for the same job
/ci-generateGenerate a production-ready CI/CD pipeline config (GitHub Actions, GitLab CI, CircleCI, or Jenkins) by discovering the project's actual stack, test/build commands, and dependencies. Use when setting up CI for a new project, adding a missing workflow file, or asked to create/generate a pipeline, workflow, or `.gitlab-ci.yml`/`Jenkinsfile`. Not for writing a Dockerfile itself (see docker-init), this only wires CI stages around one. Not for running existing CI checks locally (use ci-local), this skill only authors the pipeline file itself.npx claudepluginhub mgiovani/ai-arsenal --plugin cc-arsenal