agentleFS
patonkikhpatonkikh/APES/skills/architecture/system-context-builder/skill.md

system-context-builder

Skill3 starsChanged 4 months agoMITView on GitHub

Produce a C4 Level 1 (System Context) diagram and description showing the system, its users, and external dependencies. Use when working on solution architecture, C4 diagrams, APIs, ADRs, or system design.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    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:

    Use Mermaid C4-style or flowchart:

    line 52
  2. Distinctive:

    Follow C4 Model Level 1 strictly.

    line 113
  3. Distinctive:

    Use consistent naming from solution architecture components at abstract level.

    line 114
  4. Distinctive:

    Keep diagram readable: max 7±2 nodes.

    line 117

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

System Context Builder

Purpose

Produce a C4 Level 1 (System Context) diagram and description showing the system, its users, and external dependencies.

Input: Solution architecture or PRD, stakeholder list (optional)
Output: System Context document with Mermaid diagram, actor descriptions, and external system inventory Examples: See examples.md for worked input/output.


Workflow

Step 1: Identify the system boundary

Define:

  • System name and one-sentence purpose
  • What is inside the system boundary
  • What is explicitly outside

Step 2: Identify actors (users and personas)

List all human actors:

ActorType (user/admin/operator)GoalInteraction

Map to personas from product skills if available.

Step 3: Identify external systems

List all external systems the solution interacts with:

SystemPurposeProtocolData exchangedOwned by

Include: identity providers, payment, email, analytics, third-party APIs.

Step 4: Draw context diagram

Use Mermaid C4-style or flowchart:

flowchart LR
    actor1[Actor] --> system[System]
    system --> ext1[External System]

Rules:

  • One central system node
  • Actors on the left/top
  • External systems on the right/bottom
  • Label every arrow with action or data flow

Step 5: Document trust boundaries

Identify security boundaries between system and externals.

Step 6: Validate

Run Validation checklist.


Decision Rules

ConditionAction
No solution architecture or PRDStop; request input or run solution-architecture
Actor overlaps with external systemClarify: human actor vs software system
More than 10 external systemsGroup into categories; detail in appendix
Undocumented integrationMark as "TBD"; add to open questions
System boundary unclearAsk user to confirm scope before diagramming

Validation

  • System boundary explicitly defined
  • All actors from PRD/user flows represented
  • All external integrations listed
  • Mermaid diagram renders with labeled relationships
  • Trust boundaries identified
  • No container-level detail (defer to container-diagram-builder)
  • Diagram matches written descriptions

Anti-patterns

  • Missing externals — ignoring auth provider, payment, email services.
  • Container in context — showing databases or internal services at Level 1.
  • Unlabeled arrows — relationships without action/data description.
  • Actor = system — treating batch jobs or admin tools as users without clarity.
  • Scope creep — including future-phase systems without marking as planned.

Best Practices

  • Follow C4 Model Level 1 strictly.
  • Use consistent naming from solution architecture components at abstract level.
  • Mark planned vs current integrations.
  • Align actors with PRD user flows.
  • Keep diagram readable: max 7±2 nodes.

Output Structure

# System Context: [System Name]

## System
**Name:** [name]
**Purpose:** [one sentence]
**Boundary:** [what's in/out]

## Actors
| Actor | Type | Goal | Interactions |
|-------|------|------|--------------|

## External Systems
| System | Purpose | Protocol | Data | Status |
|--------|---------|----------|------|--------|

## Context Diagram
```mermaid
[diagram]

Trust Boundaries

BoundaryControls

Open Questions

  • [Question]

---

# Next Skills

| Outcome | Recommended Skill |
|---------|-------------------|
| Decompose into containers | `architecture/container-diagram-builder` |
| Design APIs for externals | `architecture/api-designer` |
| Update solution architecture | `architecture/solution-architecture` |
| Record integration decisions | `architecture/adr-generator` |

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.