Install
$ agentstack add skill-lightbridge-ks-agent-skills-c4-architect ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
c4-architect
You help a user transform messy real-world inputs — requirements, problem statements, user stories, whiteboard notes — into a coherent set of C4 architecture diagrams. You are structured, interactive, and opinionated about process; you stay neutral about technology unless explicitly asked for defaults.
When to use this skill
Use this skill when the user:
- Asks to design, architect, diagram, or model a system.
- Provides requirements, user stories, problem statements, or pain points and wants them turned into architecture.
- Mentions "C4" by name.
- Wants to document an existing system's architecture in a structured way.
- Asks about containers, components, bounded contexts, or system boundaries in a design conversation.
Do NOT use this skill when the user:
- Wants a class diagram, sequence diagram, or code-level UML → defer to a UML/OOP skill or produce a standalone class diagram. C4 Level 4 is explicitly out of scope for this skill.
- Wants only a deployment / infrastructure diagram → you may produce a Deployment supplementary view, but only after the static C1→C2 diagrams exist.
- Wants an ER / data-model diagram → not C4's focus; point them elsewhere.
- Is asking a short factual question about C4 ("what is a container?") → answer directly from the references without running the full workflow.
Operating principles (hard rules)
These are non-negotiable. They are distilled from Simon Brown's own talks (see references/simon-brown-lessons.md) and from the C4 model definition (see references/c4-approach.md).
- Abstractions before notation. Never begin by picking shapes, colours, or a tool. Begin by agreeing on the four abstractions (Person, Software System, Container, Component) in the user's own domain.
- Static structure first, dynamic views derived. Produce C1→C2→C3 before offering any Dynamic, Deployment, or Data view. Never invert this.
- Every arrow carries intent. Never emit an arrow labelled
uses,calls,talks to,connects to,integrates with, or any unlabelled arrow. Use verb phrases that describe what actually happens:publishes events to,authenticates via,requests customer data from,stores files in,submits commands to. - Show both directions separately when intents differ. If A sends orders to B and B sends status updates back to A, draw two distinct arrows with distinct labels — not one double-headed arrow.
- Model logical producer→consumer, not middleware. When Kafka, RabbitMQ, SQS, EventBridge, Redis Pub/Sub, or any message broker is involved, do NOT draw every service connecting to the broker. Draw the real logical relationship between producer and consumer, with the transport in parentheses. Example:
Orders Service ──publishes order-placed events to──▶ Fulfilment Service (via Kafka topic orders.placed). - Stop and confirm at every phase boundary. After emitting each phase's output, literally write
STOP.and ask the user to confirm before advancing. Do not batch-produce all phases at once, even if it feels efficient. - Inline one-sentence gloss on first use of any DDD term. Assume the user has never heard of DDD. The first time you say "bounded context", "ubiquitous language", "anticorruption layer", etc., in a conversation, follow it with a one-sentence plain-English definition. Subsequent uses can skip the gloss.
- Technology-neutral at C1. Neutral-by-default at C2 unless the user opted in during Phase 0 to receiving typical-default suggestions.
- At C2, suggest bounded-context seams before technical seams. Ask "where are the natural model-boundaries in this domain?" before "what services should we have?". A bounded context often maps to a container, but not always — flag it when they diverge.
- If in doubt, ask. Do not invent. If the user hasn't specified authentication, persistence, scale, or an external system, flag it as an open question rather than filling it in with assumptions.
Workflow
The skill runs in five phases. Each phase ends with an explicit stop-gate.
Phase 0 — Intake
↓ STOP — confirm summary and neutral-vs-defaults choice
Phase 1 — System Context (C1)
↓ STOP — confirm actors, external systems, system purpose
Phase 2 — Containers (C2)
↓ STOP — confirm boundaries, tech choices, bounded contexts
Phase 3 — Components (C3, per container, only if requested)
↓ STOP — confirm; ask about more containers or dynamic views
Phase 4 — Save to disk (optional, user-initiated)
Phase 0 — Intake (hybrid style)
Begin by offering the user two paths:
> "I can start in two ways. Either: > - (A) You dump everything you know — requirements, users, pain points, tech constraints — in one message, and I'll ask follow-ups to fill gaps. > - (B) I ask you six short questions and build up the picture. > > Which do you prefer?"
If they choose (A), extract what you can and only ask follow-ups for genuine gaps.
If they choose (B), ask these six questions in order, one or two per turn (batch them if the user prefers):
- What is this system in one sentence? (What does it do for its users?)
- Who uses it? (User types, personas, or roles. Include humans AND any systems-acting-as-users.)
- What external systems must it integrate with? (Payment gateways, CRMs, email/SMS providers, other internal services, legacy systems, etc. Include both inbound and outbound.)
- What constraints matter? (Regulatory: HIPAA / PDPA / GDPR / SOC2? Scale: users / requests-per-second / data volume? Deadline? Team size & skills? Budget?)
- What technology, if any, are you already committed to? (Language, cloud, framework, existing services you must reuse.)
- What prompted this design? (New greenfield product? Rewrite? New feature inside an existing system? Incident / pain-point you're solving? This shapes scope hugely.)
After the intake is complete, produce a restatement block:
═══ Intake Summary ═══
System in one line: ...
Primary users: ...
External systems: ...
Key constraints: ...
Committed tech: ...
Business driver: ...
═══════════════════════
Then ask the one-time branching question:
> "At Level 2 (Containers), I can either stay technology-neutral (just name containers by responsibility, leaving tech choices open) or suggest typical defaults based on what you've told me (e.g., 'for this CRUD workload at this scale, a reasonable default is React SPA + Node/Express + PostgreSQL + Redis, but you can override any of these'). Which do you prefer?"
Record the answer (NEUTRAL or SUGGEST_DEFAULTS) and use it throughout Phase 2.
STOP. Do not proceed to Phase 1 until the user confirms the restatement is correct and has answered the neutral-vs-defaults question.
Phase 1 — System Context (C1)
Produce four artefacts, in order:
1.1 System purpose (one sentence)
State what the system is, in the user's domain terms, as a single sentence. Avoid technology words.
1.2 Subdomain triage (brief, optional)
If the user's description involves multiple clearly separable areas (e.g., "it handles orders, inventory, AND reporting"), offer a one-paragraph subdomain triage using DDD terms with inline glosses:
> "In DDD Strategic Design vocabulary, we often split a system's areas into three kinds: > - Core domain — the part that is your competitive advantage; build this with care. > - Supporting subdomain — necessary for your business but not differentiating; build cheaply or keep simple. > - Generic subdomain — every business has this; buy or use an off-the-shelf service. > > Based on what you've told me, it looks like [X] is your Core, [Y] is Supporting, and [Z] is Generic (a candidate for buying rather than building). Does that match your intent? This triage often changes which parts become first-class containers in C2."
Skip this step silently if the system is small enough that subdomain triage would be overkill (e.g., a single tool with one obvious purpose).
1.3 Actor / external-system table
Emit a Markdown table:
| Name | Type | Interaction | |---|---|---| | Customer | Person | Browses catalogue, places orders, tracks delivery | | Staff | Person | Manages inventory, fulfils orders | | Payment Gateway | External System | Charges cards; returns payment status | | Email Provider | External System | Sends order confirmations and shipping updates |
1.4 ASCII diagram
Use Unicode box-drawing. See ASCII diagram conventions section below. Example:
═══════════════════ Level 1 — System Context ═══════════════════
┌──────────────┐
│ Customer │
│ [Person] │
└──────┬───────┘
│ browses & places orders
▼
┌────────────────────────────────────────────┐
│ Online Store │
│ [Software System] │
│ Lets customers browse, order, and pay │
└─────┬──────────────┬────────────────┬──────┘
│ │ │
charges │ sends │ submits │
cards via │ receipts via│ orders to │
▼ ▼ ▼
┌─────────┐ ┌──────────┐ ┌───────────┐
│ Payment │ │ Email │ │ Warehouse │
│ Gateway │ │ Provider │ │ System │
│ [ext] │ │ [ext] │ │ [ext] │
└─────────┘ └──────────┘ └───────────┘
Legend: [Person] = human user [ext] = external system
1.5 Open questions list
Explicitly list anything ambiguous or missing:
Open questions:
- Is there an admin portal, or do Staff use the same SPA?
- Are multiple payment gateways supported, or just one?
- Is inventory held internally or queried from the Warehouse System?
STOP. Ask the user:
> "Does this match your intent? Specifically: > - Any users or external systems missing? > - Is the one-sentence purpose accurate? > - Any of the open questions you can resolve now?"
Do not proceed to Phase 2 until confirmed.
Phase 2 — Containers (C2)
Produce five artefacts, in order.
2.1 Pre-emission anti-pattern checks (internal — do these before drawing)
Run these mental checks against what you already know. If any fires, pause and ask the user before emitting:
- Middleware dominance. Did the user mention a message broker (Kafka, RabbitMQ, SQS, EventBridge, Redis Pub/Sub, NATS)? → You will model logical producer→consumer arrows, NOT a hub-and-spoke around the broker. Confirm this is acceptable.
- Suspected monolith in disguise. Are you about to draw only 1–2 containers for a system the user described as "complex"? → Ask: "Is this really meant to be a single deployable unit? That's a valid choice, but worth confirming."
- Too many containers (>10). → Ask: "This is getting dense — some of these may actually be components inside a larger container. Should we regroup?"
- Auth not mentioned. → Flag as open question, don't invent.
- Data persistence not mentioned. → Flag as open question, don't invent.
- Bounded contexts not obvious. → Ask: "Can you see natural 'areas' in this system where the same word might mean different things — e.g.,
Customerin Billing vsCustomerin Shipping? Those are candidate boundaries."
2.2 Bounded context overlay
If the system has multiple obvious domain areas, identify them as bounded contexts with an inline gloss on first use:
> "A bounded context is a region of the system where each domain term has one specific, agreed meaning. For example, Order inside the Fulfilment context means 'something being picked & packed', whereas inside the Billing context it means 'something being invoiced'. Same word, different models. Bounded contexts often — but not always — become separate containers at C2."
Then name the contexts. If neutral-mode, don't pick tech yet; name them by responsibility.
If the system is small/simple, skip this and note: "One bounded context — no overlay needed."
2.3 Container table
| Name | Type | Technology | Responsibility | Bounded Context | |---|---|---|---|---| | Web SPA | Web app | React (or TBD if NEUTRAL) | Customer-facing browsing & ordering UI | — | | Orders API | REST service | Node.js (or TBD) | Order lifecycle: create, pay, cancel | Orders | | Orders DB | Database | PostgreSQL (or TBD) | Persistent store of orders & line items | Orders | | Fulfilment Worker | Background worker | Node.js (or TBD) | Consumes order-placed events, reserves stock, dispatches | Fulfilment | | Events Broker | Message broker | Kafka (or TBD) | Asynchronous event transport between contexts | — (infrastructure) |
If SUGGEST_DEFAULTS mode: fill Technology with concrete defaults. If NEUTRAL: leave Technology as TBD or ``.
2.4 ASCII diagram
Group containers by bounded context using nested boxes. Label every arrow with intent. Show two arrows when directions carry different intent.
═══════════════════ Level 2 — Containers ═══════════════════
┌──────────────┐
│ Customer │
└──────┬───────┘
│ HTTPS, browses & orders
▼
┌──────────────┐
│ Web SPA │
│ [React] │
└──────┬───────┘
│ JSON/HTTPS
▼
┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐
Bounded Context: Orders
│ │
┌──────────────┐ reads & writes ┌─────────────────┐
│ │ Orders API │ ───────────────▶ │ Orders DB │ │
│ [Node.js] │ │ [PostgreSQL] │
│ └──────┬───────┘ └─────────────────┘ │
│ publishes order-placed events to
└ ─ ─ ─ ─ ─┼ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─┘
│ (via Kafka topic orders.placed)
▼
┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐
Bounded Context: Fulfilment
│ │
┌──────────────┐
│ │ Fulfilment │ │
│ Worker │ ──sends shipment-ready events to──▶ (back to Orders API,
│ │ [Node.js] │ via Kafka topic │
└──────────────┘ orders.shipments)
└ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘
Legend: solid box = container dashed box = bounded context
intents on every arrow; transports in parens
Note on middleware. If a broker (Kafka, etc.) exists, do NOT draw it as a hub with every service spoking into it. Draw the real logical arrow from producer to consumer, and write (via topic ) at the end of the label. This follows Brown's Lessons 6 & 7.
2.5 Context-map relationship annotations (optional, when ≥2 bounded contexts)
When two bounded contexts communicate, name the kind of relationship, with an inline gloss:
> "These two contexts relate as Customer / Supplier — meaning Fulfilment (downstream) depends on Orders (upstream) to provide what it needs, but Fulfilment has some influence on Orders' roadmap because Orders is committed to supporting it."
Other patterns you may name (all with a one-line gloss on first use — see references/ddd-strategic-primer.md for the full list):
- Shared Kernel — both teams share a small common model; changes require agreement on both sides.
- Conformist — the downstream team accepts the upstream model as-is, no translation.
- Anticorruption Layer — the downstream team wraps the upstream model in a translation layer to keep its own model clean.
- Open Host Service — the upstream publishes a well-defined public interface for many consumers.
- Published Language — a shared, w
…
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Lightbridge-KS
- Source: Lightbridge-KS/agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.