/mif-docs:c4-model-diagram <the system to map across C4 levels>from mif-docs
Author a C4 model architecture document — Simon Brown's four levels of abstraction (System Context, Container, Component, Code) rendered as notation-independent Mermaid C4 diagrams plus an element catalog of people, systems, containers, and components. Use when the user needs to map or communicate software architecture at varying zoom levels for mixed technical/non-technical audiences. Anti-trigger; for a point-in-time decision record use adr, for a sequence/data-flow or deployment-only view use the matching diagram genre instead.
Ships in mif-docs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Produces a C4 model in Simon Brown's sense (c4model.com): a set of nested diagrams that describe a software system at four levels of abstraction, each zooming in one notch. C4 is abstraction-first and notation-independent — the value is the consistent set of boxes-and-lines abstractions (person, software system, container, component), not any particular drawing tool. Mermaid C4 is one rendering; the abstractions are the contract.
```mermaid block using the matching
block keyword: C4Context, C4Container, or C4Component. Declare people
with Person(...), systems with System(...)/System_Ext(...), containers
with Container(...)/ContainerDb(...), components with Component(...),
group an in-scope system with a System_Boundary/Container_Boundary, and
connect everything with Rel(...) labelled by what flows and how.type: semantic — a C4 model is declarative architectural knowledge (what the
system is), not a time-bound event or a how-to. Climb to L2 with namespace
(e.g. architecture/c4/<system>), title, and tags when known. Gate every
output with mif-validate at its target level; the floor is --level 1.
A C4 model is consumed as much by tools as by people: a docs pipeline checking whether an architecture view is stale, an agent tracing which larger document embeds it, a reviewer asking where the model came from. As prose with embedded diagrams (L1) every one of those needs reading and inference. The MIF layer makes them answerable from frontmatter alone:
| Question a consumer asks | Answered by (frontmatter) |
|---|---|
| Is this architecture view still current? | temporal.validFrom / validUntil / ttl |
| What kind of document is this? | ontology (architecture-view) + conceptType |
| Where did the model come from; can I trust it? | provenance (W3C-PROV) + trustLevel |
| What larger document embeds these diagrams? | typed relationships[] (relates-to the arc42 genre) |
The same document still reads as a human C4 model and projects losslessly to JSON-LD and back — one artifact, two readers.
This skill ships the same model at two MIF levels so the climb is explicit:
templates/good-l1.md — L1 floor: id, type, created + the body
(diagrams + element catalogs). A complete, valid C4 model, but opaque to a
machine consumer. Validate with mif-validate --level 1.templates/good.md — L3 (the highest this genre honestly supports): adds
namespace, modified, temporal validity, an architecture-view
ontology type, W3C-PROV provenance, and a typed relates-to relationship
into the arc42 document genre. Validate with mif-validate --level 3.Author at the highest level the context supports (grade down rather than
fabricate). templates/bad.md shows the antipattern: a "C4" diagram that mixes
abstraction levels and shows tech-only boxes with no people or boundaries.
The finished document contains its own ```mermaid ... ``` fence. Any
time that document is reproduced verbatim inside another markdown context —
a transcript, a chat reply, a PR description, a code-review comment — that
outer context is itself commonly wrapped in a fenced block. Nesting a 3-backtick
fence inside another 3-backtick fence is invalid markdown, and the failure mode
is not "it renders wrong" — it is that the model, trying to keep the outer
fence intact, escapes the inner fence's backticks (\``mermaidinstead of mermaid `). An escaped fence is no longer a fenced code block at all: it reads as literal backslash-backtick characters, so any downstream consumer — a human, a renderer, a grader — looking for a real ` mermaid ` block will
not find one, even though the diagram content is otherwise correct.
Never escape backticks to solve this. Instead, widen the outer fence so it cannot collide with the inner one:
````markdown) — one more than
the 3-backtick mermaid fence nested inside it — and close it with four
backticks too. The inner ```mermaid fence then passes through untouched,
exactly as written in the delivered file.This applies whether you are writing the primary output file (write it with a real, unescaped fence — never escaped, regardless of surrounding tool calls) or narrating/reproducing that file's contents afterward.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub modeled-information-format/mif-docs-plugin --plugin mif-docs47 skills in this plugin
/academicWrite a formal academic research report — Abstract, Background, Method, Findings, Discussion, References — with a selectable citation style (author-date/APA or numbered/Vancouver-IMRaD) and optional APA Method sub-sections. Use when the deliverable is a scholarly write-up for a research or technical-expert audience that demands traceable evidence and explicit method. Anti-trigger; for an informal trade-off narrative use google-design-doc, for a practitioner decision report built around a mandatory comparison table use engineering./adrWrite an Architectural Decision Record (ADR) in the Structured MADR format — one decision, its drivers, the options weighed with risk, the chosen outcome, the consequences accepted, and an audit trail — validated by the structured-madr Action in both smadr and MIF modes. Use when a team is making or capturing a consequential, hard-to-reverse technical choice and needs it documented with rationale. Anti-trigger; for a how-to use diataxis-how-to, for requirements use prd or feature-spec, not an ADR./ai-architecture-docWrite a composite AI-spec architecture document that embeds an arc42/C4-style structure plus testable non-functional requirements and an ADR-style decision log in one spec-channel artifact. Use for an architecture spec a coding agent can consume. Anti-trigger; for a pure narrative use arc42-arch-doc, for diagrams alone use c4-model-diagram.