agentsclimarketplace

C4 architecture

Skill selamy-labs/agent-skills/skills/c4-architecture

Use when documenting a system's architecture, not just drawing one diagram. Apply the C4 model — context, container, component, deployment — choosing the level by audience, stopping at context plus container for most teams, and writing the result into versioned markdown.From its SKILL.md

Install
npx -y skills add selamy-labs/agent-skills --skill c4-architecture

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.5 KB, 540 tokens by cl100k_base, as published. Nobody here has run it

C4 Architecture Documentation

C4 is a methodology, not a notation: it documents a system at four zoom levels so each audience sees the right amount of detail. The discipline is choosing the level deliberately and stopping early — most teams over-diagram.

The four levels — pick by audience

LevelDiagramAudienceShowsWhen
1C4ContextEveryoneThe system + the people/systems around itAlways
2C4ContainerTechnicalApps, services, databases inside itAlways
3C4ComponentDevelopersInternals of one containerOnly if it adds value
4C4DeploymentOpsInfra nodes the containers run onProduction systems

Context + Container is enough for most software teams. Reach for Component only when one container is complex enough that its internals are a real question; reach for Deployment when how-it-runs matters. A diagram nobody asked a question about is maintenance debt.

Workflow

  1. Scope — decide which level(s) the audience actually needs (default: 1+2).
  2. Analyze — read the codebase to identify the real containers (deployable units) and their relationships, not the aspirational architecture.
  3. Generate — write the diagrams in Mermaid C4 syntax (see mermaid-diagrams for the rendering mechanics).
  4. Document — commit them to markdown with a sentence of context per diagram explaining what decision it informs.

Example — Level 1

C4Context
    title System Context — Orders Service
    Person(customer, "Customer", "Places orders")
    System(orders, "Orders Service", "Accepts and tracks orders")
    System_Ext(payments, "Payments", "Third-party processor")
    Rel(customer, orders, "Places order")
    Rel(orders, payments, "Charges via", "HTTPS")

Keep it true

Architecture docs are only valuable if they match reality — diagram the containers that actually deploy, and update the C4 markdown in the same PR that changes the architecture. A pretty diagram of a system that no longer exists is worse than none.


Adapted from the MIT-licensed softaworks/agent-toolkit c4-architecture skill.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,629. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.