agentleFS
ulises-jeremiasulises-jeremias/agent-toolkit/skills/architecture/c4-model/SKILL.md

c4-model

Skill18 starsChanged 3 months agoMITView on GitHub

WHAT — C4 model methodology (Context, Container, Component, Code) guidance — what to draw at each level, when, and how to render C4-inspired diagrams via Mermaid (PlantUML/Structurizr optional advanced). Methodology not renderer.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not mandate Structurizr DSL for every diagram — Mermaid suffices for most.

    line 48
  2. Distinctive:

    Do not dump PlantUML infra as separate skill — keep as optional note.

    line 49

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

C4 Model — Methodology Overlay (WHAT → HOW via Mermaid)

Sources (2026-08-12): Simon Brown C4 https://c4model.com/ (Context, Container, Component, Code); Structurizr DSL https://github.com/structurizr/dsl (open-source DSL, paid cloud) + structurizr-mcp https://github.com/cubical6/structurizr-mcp + go-structurizr; C4-PlantUML https://github.com/plantuml-stdlib/C4-PlantUML; overarch https://github.com/soulspace-org/overarch (PlantUML/Structurizr generation); rendering via Mermaid mermaid-js/mermaid MIT per §44.

Pack: architecture core (architect + ADR + TRD + threat-model + mermaid (+ C4 via mermaid)) — c4-model teaches what to draw; mermaid renders it. See docs/architecture/research-385-diagram.md for C4 vs Mermaid vs PlantUML/Structurizr decision (Excalidraw/draw.io REJECT).

When to use

  • Need system Context / Container / Component / Code views.

Instructions

  1. Select level: Context (system + actors) → Container (apps/data stores) → Component (modules) → Code (classes, optional).
  2. Render via Mermaid (C4-inspired): flowchart TD with subgraph for boundaries, e.g.:
    flowchart TD
      user([User]) --> web[Web Container]
      web --> api[API Container]
      api --> db[(Database Container)]
      subgraph System Context
        user; web; api; db
      end
  3. Advanced (optional): For consistency checks across views, use Structurizr DSL (structurizr-cli + workspace.dsl → PlantUML/Mermaid) or C4-PlantUML (@startuml + !include C4_Context.puml); note structurizr CLI requires DSL file and is heavier.

Collaboration

  • architect defines system → c4-model selects C4 level → mermaid renders → ADR records decision.

Anti-patterns

  • Do not mandate Structurizr DSL for every diagram — Mermaid suffices for most.
  • Do not dump PlantUML infra as separate skill — keep as optional note.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.