c4-architecture-docs

c4-architecture-docs is a skill for Claude Code from atretyak1985/swarmery. It costs 51 tokens per session (841 once invoked), scanned A, original, Apache-2.0.

A guide for documenting a large feature or system with the C4 model, a way to show software architecture from broad system views down to components and runtime flows.

In plain words
What is it for?
Use it to create Mermaid diagrams and a narrative architecture document for an epic or major feature.
Why use it?
It turns architecture decisions into diagrams and written explanations grounded in the project's real systems.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the core plugin — 37 skills, 8 commands, 13 agents shipped together

Good fit Use it to create Mermaid diagrams and a narrative architecture document for an epic or major feature.

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

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 37 skills, 8 commands, 13 agents.

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 c4-architecture-docs

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/atretyak1985/swarmery/c4-architecture-docs"><img src="https://agentmods.dev/badge/skills/atretyak1985/swarmery/c4-architecture-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 841 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.00051 $0.00841
Opus 5.5 $0.00020 $0.00336
Sonnet 5.5 $0.00010 $0.00168
Haiku 4.5 $0.00005 $0.00084

Measured 1mo ago against content hash a733611035a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

c4-architecture-docs 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.

plugins/core/skills/c4-architecture-docs/SKILL.md · 58 lines

How it starts

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

Purpose

Produce house-consistent C4 architecture documentation for a big issue: a small set of Mermaid C4 diagrams (.mmd) plus a short narrative doc, filed in the task dir and rendered for review. This skill owns the HOW — level selection, diagram grammar, labelling rules, and the file-and-promote workflow; it does not render (hand the .mmd to the project's Mermaid viewer) and does not replace an ADR. Project tiers and containers are never baked in — read them from .claude/project.json and the project's CLAUDE.md.

Rules (never violate)

  • Draw the minimum levels: L1+L2 always; one L3 only per touched container; Dynamic only for a non-obvious runtime flow; L4 almost never.
  • Ground every box in the project's real inventory (.claude/project.json, CLAUDE.md) — never invent systems or protocols.
  • Complexity gate: a view exceeding ~10 elements / ~12 relationships / ~10 dynamic steps must be split or authored as a styled flowchart, never Mermaid C4.
  • Every element typed + described; every container/component technology-labelled; every relationship directed, labelled, protocol-labelled across containers.
  • Render and visually inspect a screenshot of every diagram — console-clean is not the readability bar; crossing lines or overlapping labels fail review.
  • File artifacts in the task dir (narrative ≤200 lines); record each boundary/technology decision as a linked ADR; promotion is deliberate and ASK-gated when contract-touching.

Resources

  • Read resources/authoring-workflow.md when executing — the 8-step procedure, inputs/outputs, checklists, escalation, examples, failure modes.
  • Read resources/c4-levels.md when choosing abstraction levels.
  • Read resources/notation-and-review-checklist.md before finalizing a diagram.
  • Read resources/mermaid-c4-syntax.md when writing .mmd (syntax + gotchas).
  • Copy starters from templates/; study the neutral idiom in examples/.

How to use

What it does

Turns a big issue — an epic, cross-tier feature, or incident review — into C4 documentation: minimal Mermaid diagrams plus a ≤200-line narrative, grounded in the project's real repos, rendered and visually reviewed, decisions captured as ADRs.

Read the full file on GitHub · 58 lines

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 First seen · 58 lines · 51 tokens per session scan A a733611035a8

Subscribe to this mod's changes

c4-architecture-docs is a skill published in the GitHub repository atretyak1985/swarmery (7 stars, last pushed today), licensed Apache-2.0. It adds 51 tokens to every session and 841 once invoked, about $0.0002 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-03.