context-diagramming
Produce a system context diagram — highest-level view showing the system boundary plus external entities (actors / other systems / organizations) with labeled data + interaction flows. Defines what's in scope and out of scope.
What this skill does
# Context Diagramming
You produce a system context diagram — a single-box-plus-surroundings view that makes the system's boundary, external participants, and inbound / outbound flows crystal clear. Aligns with C4 Level 1 (system context) and classic DFD Level 0.
## Core rules
- **One system per diagram**: the system is a single opaque box; internals are out of scope
- **External entities classified**: person / user-group / system / organization
- **Every flow labeled**: purpose + data / interaction type
- **In-scope vs out-of-scope explicit**: the diagram itself is the scope statement
- **No internal details**: resist urge to "peek inside" the system — that's a container / component diagram
- **No fabricated entities**: work from supplied actors + systems or elicit
## Input handling
| Dimension | Required | Default |
|---|---|---|
| **System name** | Yes | — |
| **System purpose** (1 sentence) | Yes | — |
| **External entities** | Yes (≥2) | Elicit |
| **Known flows** | No | Elicit |
| **Style** | No | `C4` (C4 model Level 1) |
## Phase 1 — Setup
```
**System**: [name]
**Purpose**: [one-sentence what-it-does]
**Style**: [C4 / classic / DFD-level-0]
**Scope clarification**: [what's inside the system box vs outside]
```
Ask render mode per `diagram-rendering` mixin and output path (default: `/documentation/[case]/context-diagramming/`).
## Phase 2 — Entity classification
Every external entity gets a type:
| Type | Symbol convention (C4) | Examples |
|---|---|---|
| **Person / User** | Stick figure or person icon | End customer, administrator, support agent |
| **User group** | Group icon | "Developers at partner company", "Mobile app users" |
| **Software system** | Rectangle | "Payment gateway", "CRM", "Email service" |
| **Organization** | Rectangle with org label | "Regulator", "Partner company", "Data provider" |
Per entity:
- **Name** — human-readable
- **Type** — from above
- **Role** — what it does relative to our system
- **Internal or external to organization** — for C4 we typically show only external to the system's boundary; internal actors who use the system also count as external to the box
- **Variation** (optional) — if multiple sub-types exist (e.g., "Registered customer" vs "Guest customer")
Rule: 3–8 entities typical. Fewer = probably missing; more = probably showing internal details.
## Phase 3 — Flow specification
Per flow (arrow between entity and system, or system and entity):
| Field | Description |
|---|---|
| **From → To** | Direction |
| **Purpose** | Why this flow exists (1 sentence) |
| **Type** | interaction / data / notification / control / payment / ... |
| **Protocol / channel** (optional) | REST API, email, file transfer, webhook, UI |
| **Frequency** (optional) | Synchronous / async / batch |
| **Data** (optional) | What's carried |
| **Direction** | In / out / both |
Rules:
- Every flow has clear purpose
- Avoid "data" as a flow name — say what data and why
- Bidirectional interactions can be one arrow labeled "interacts with" or two arrows (preferred for clarity)
## Phase 4 — Scope statement
Explicit in-scope / out-of-scope list:
| In scope (inside the system box) |
|---|
| [Feature / capability 1] |
| [Feature / capability 2] |
| Out of scope (external entities or separate systems) |
|---|
| [External entity 1] — [reason it's external] |
| [Adjacent system] — [why it's not in this system] |
Rule: if scope is ambiguous on any item, ask user to place it explicitly.
## Phase 5 — Constraints & assumptions
Surface key constraints shaping the boundary:
- **Regulatory** — "Payment data must be processed by PCI-certified external provider" → payment gateway external
- **Organizational** — "CRM owned by another team" → external system
- **Technical** — "Legacy mainframe can't be modified" → external integration
- **Business** — "Partner API is a commercial contract" → external organization
## Phase 6 — C4 Level 1 conventions (if style=C4)
C4 model Level 1 (System Context):
- The system under focus is drawn prominently in the center
- External systems and personas drawn around it
- Relationships labeled with purpose + optionally protocol
- Color coding: system under focus often filled, externals outlined
- A brief description shown under each entity
Recommended: for each entity, add `[Description: 8 words]` and `[Technology: REST API / SaaS / ...]` annotations.
## Phase 7 — DFD Level 0 (if style=DFD)
Data Flow Diagram conventions:
- System drawn as a single process (circle or rounded rect)
- External entities as squares
- Data stores usually appear at Level 1 only (not Level 0)
- Labeled data flows (nouns, not verbs)
Use DFD style when emphasizing **data** flows; use C4 when emphasizing **system architecture** including both human and machine actors.
## Phase 8 — Diagram
### C4 Level 1 example
```mermaid
flowchart TB
U["Person: End User<br/>[customer using web + mobile]"]
ADMIN["Person: Admin<br/>[internal operations staff]"]
PAY["System: Payment gateway<br/>[external PCI-DSS certified service]"]
EMAIL["System: Email service<br/>[external: SendGrid / SES]"]
ANA["System: Analytics<br/>[external: Mixpanel]"]
CRM["System: CRM<br/>[internal, owned by ops team]"]
SYS(("Our Product<br/>[system-under-focus]<br/>Processes orders + accounts"))
U -- "browses, places orders, manages account" --> SYS
SYS -- "returns UI + confirmations" --> U
ADMIN -- "manages users + operations" --> SYS
SYS -- "charges via REST" --> PAY
PAY -- "returns authorization status" --> SYS
SYS -- "sends transactional emails" --> EMAIL
SYS -- "sends events" --> ANA
SYS -- "syncs customer data" --> CRM
style SYS fill:#4a90e2,color:#fff,stroke:#2c5fa0
```
### Classic / DFD Level 0 example
```mermaid
flowchart TB
U[["End User"]]
PAY[["Payment Gateway"]]
CRM[["CRM"]]
SYS((Our Product))
U -- "order + profile data" --> SYS
SYS -- "order confirmations + invoices" --> U
SYS -- "charge request" --> PAY
PAY -- "authorization" --> SYS
SYS -- "customer records" --> CRM
```
## Phase 9 — Diagram rendering
Per `diagram-rendering` mixin. File names:
- `context-diagram.mmd` / `.png`
## Phase 10 — Report assembly and approval
```markdown
# Context Diagram: [System]
**Date**: [date]
**System**: [name]
**Purpose**: [one sentence]
**Style**: [C4 / classic / DFD-Level-0]
## Scope
[System + one-sentence purpose + style]
## External Entities
[Table: name, type, role, description, technology (if C4)]
## Flows
[Table: from → to, purpose, type, protocol, frequency, data, direction]
## Scope Statement
### In scope
[List of capabilities within system boundary]
### Out of scope
[Entities / systems that are external, with reason]
## Constraints & Assumptions
[Regulatory / organizational / technical / business drivers]
## Diagram
[Mermaid flowchart]
## Assumptions & Limitations
[`[Assumed]` entities or flows, description gaps]
```
Present for user approval. Save only after confirmation.
## Generation + extraction rules
- One system, one diagram
- Every external entity typed
- Every flow has purpose + direction
- In/out of scope explicit
- No internal details shown
- No fabricated entities
## Failure behavior
| Situation | Behavior |
|---|---|
| No system name | Interview mode (§7) |
| Fewer than 2 external entities | Ask; system-in-a-vacuum is unusual |
| Internal component surfaced as "external" | Reclassify; probably belongs inside system box (show later in Level 2) |
| Many flows with same direction and purpose | Consolidate (single entity, multiple actions) |
| Scope ambiguity on specific items | Force user to place explicitly |
| mmdc failure | See `diagram-rendering` mixin |
| Out-of-scope (decomposition to components) | "Context diagram is Level 1. For decomposition, see future C4-modeling skill / data-flow-diagramming." |
## Self-check
```
[] One system under focus
[] One-sentence purpose
[] Style declared
[] ≥2 external entiRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.