Generated banner for Architecture Diagrams
Generated logo for Architecture Diagrams

Architecture Diagrams

MicrosoftOfficialPublished by Microsoft

  • Skill
  • Content generator
  • Software development
  • MIT
  • Low risk
  • Has scripts

From the author

Architecture diagram authoring for cloud infrastructure and declared data catalogs. Use when rendering Azure IaC or DS_CATALOG_V1 relationships as caller-selected ASCII or Mermaid diagrams.
— the description by Microsoft

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The Architecture Diagrams skill provides a standardized way to visualize cloud infrastructure and data catalogs. It processes infrastructure configuration files (such as Terraform, Bicep, or Kubernetes manifests) or declared DS_CATALOG_V1 data models to produce consistent, readable diagrams. The skill supports both ASCII block diagrams and Mermaid flowcharts, ensuring that structural boundaries and relationships are preserved across formats. It acts as a faithful view over source authority, requiring explicit scope and adhering to strict parsing rules to ensure accuracy.

What it does

  • Renders infrastructure topologies from files like Terraform, Bicep, ARM, and Kubernetes manifests.
  • Visualizes DS_CATALOG_V1 data models as entity-relationship diagrams.
  • Supports user-selectable output in either ASCII block format or Mermaid code blocks.
  • Maintains consistent boundaries, relationships, and labels across different output formats.
  • Provides a structured output contract including a legend and key relationship details.
  • Persists user format preferences to a local state file for consistent future generation.

When to use it

  • When you need to document cloud infrastructure topology for ADRs or design reviews.
  • When visualizing relationships within a declared DS_CATALOG_V1 data model.
  • When you need a consistent, text-based representation of system architecture that can be version-controlled.
  • When you require a clear, standardized legend and relationship summary for architectural documentation.

Advantages

  • Ensures diagrams remain synchronized with source files by treating them as a view over source authority.
  • Provides flexibility by supporting both human-readable ASCII and machine-renderable Mermaid formats.
  • Enforces strict adherence to declared data models, preventing the invention of unauthorized relationships.
  • Standardizes documentation output with a consistent structure for legends and key relationships.

Usage examples

“Generate an architecture diagram for the infrastructure in the ./infra folder.”
The agent identifies the infrastructure files, asks for a preferred format (ASCII or Mermaid) if not already set, and generates a diagram showing the services, networking, and dependencies.
“Create a data model diagram for the current DS_CATALOG_V1 catalog.”
The agent parses the catalog entities and relationships, rendering an ER diagram in the preferred format with a legend explaining multiplicity and confidence levels.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/microsoft/architecture-diagrams/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip architecture-diagrams.zip -d .agents/skills

Documentation by Microsoft

Architecture Diagrams Skill

Goal

Turn infrastructure source files or a declared DS_CATALOG_V1 data model into a readable architecture diagram for reviews, ADRs, and design discussions. Preserve the caller's selected output format and the source's authority boundaries.

Infrastructure inputs include Terraform, Bicep, ARM templates, shell scripts, Kubernetes manifests, and Docker or Compose files. Catalog input uses declared entities and relationships from data-catalog, the durable data-catalog skill. It does not infer a data model from SQL or ORM files.

This skill documents infrastructure topology and data models. To document a software system, meaning its containers, its components, and the people and systems around it, use the c4-architecture skill instead.

Success criteria

  • The diagram includes only the confirmed source scope.

  • Infrastructure sources retain their existing parsing and relationship behavior.

  • Catalog diagrams preserve declared entity IDs, endpoints, cardinality, endpoint minimums, join keys, confidence, and evidence basis without inventing relationships.

  • Caller preference controls ASCII or Mermaid output.

  • Inferred and assumed catalog relationships remain visibly distinct from confirmed relationships.

Constraints

  • Treat a diagram as a view over source authority, not a semantic authority of its own.

  • Read catalog-erd.md for DS_CATALOG_V1 input, multiplicity mapping, confidence rendering, the catalog output contract, and the Functional Planner compatibility boundary.

  • Do not parse SQL DDL, Prisma, SQLAlchemy, or another ORM as catalog input.

  • Do not render primary-key, foreign-key, or uniqueness markers for catalog join keys; the catalog declares field names, not database key roles.

  • Keep the Feasibility Study Interchange Profile and downstream requirement mappings in their owning workstreams.

Stop rules

  • Stop and ask for scope when infrastructure boundaries are ambiguous.

  • Stop and report an unsupported catalog version, unresolved endpoint, unknown cardinality, missing or invalid endpoint minimum, unknown confidence value, or malformed join-key declaration instead of guessing or partially rendering.

  • Stop before diagram generation when no output preference can be resolved.

Output Format

This skill produces either ASCII block diagrams or Mermaid diagrams. Neither is the default: the caller or surrounding context chooses the output format for each diagram. When the caller does not state a preference, ask which format they want before generating.

The diagram type follows the source type. Infrastructure sources render as ASCII block diagrams or Mermaid flowcharts using the ASCII Conventions or Mermaid Conventions below. Catalog sources render as ASCII entity lines or a Mermaid erDiagram using catalog-erd.md. In every case, keep the structure, boundaries, and relationships identical across formats.

Preference Contract

Architecture diagram format selection applies beyond ADRs. For standalone usage, consult the root state file at .copilot-tracking/architecture-diagrams/state.json. If that file is absent, create it when a format is chosen.

{
  "userPreferences": {
    "diagramFormat": "mermaid"
  },
  "repoVisibility": "private"
}

The userPreferences.diagramFormat value must be either ascii or mermaid. The repoVisibility field is optional and may be used by surrounding workflows when they need to distinguish public and private repositories. Resolution order is:

  1. Explicit request or caller state.

  2. Root state file at .copilot-tracking/architecture-diagrams/state.json.

  3. If no preference is known for a standalone request, ask once and persist the answer to the root state file for later reuse.

Workflow

Follow this sequence when authoring a diagram:

  1. Discovery. Identify the relevant infrastructure files or declared catalog and the architectural scope. When the scope is unclear, ask which folders, services, or entities should be included.

  2. Parsing. For infrastructure, extract services, data stores, networking components, ingress points, and deployment units. For a catalog, execute scripts/render_catalog_erd.py or follow catalog-erd.md without adding inferred semantics.

  3. Relationship mapping. For infrastructure, connect components with the correct direction. For a catalog, retain the exact declared endpoints, cardinality, endpoint minimums, join keys, confidence, and basis.

  4. Generation. Render the final diagram in the caller's chosen format, with clear boundaries or entity labels and a compact legend.

ASCII Conventions

Use consistent box notation and alignment:

+------------------+      +------------------+
|   Service Name   |----->|   Service Name   |
+------------------+      +------------------+

Use the following conventions for readability:

  • Keep box labels short and specific.

  • Keep arrows aligned and use one relationship per line when possible.

  • Prefer clearly named boundaries over dense decoration.

  • Use repeated box shapes for similar components.

Arrow Types

ArrowMeaning
---->Data flow or dependency
<--->Bidirectional connection
- - >Optional or conditional resource

Grouping and Boundaries

Group related components inside a larger boundary when they share a network, account, or deployment domain.

Use a full box for a strong boundary:

+-----------------------------------------------+
|  Resource Group                               |
|                                               |
|  +-------------+        +-------------+       |
|  |   VNet      |------->|   Subnet    |       |
|  +-------------+        +-------------+       |
|                                               |
+-----------------------------------------------+

Use labeled boundaries for secondary or nested boundaries:

:--- Virtual Network ---------------------------:
:                                               :
:  +-------------+        +-------------+       :
:  |   Subnet A  |------->|   Subnet B  |       :
:  +-------------+        +-------------+       :
:                                               :
:-----------------------------------------------:

Mermaid Conventions

When the caller chooses Mermaid output, render a mermaid fenced code block using a flowchart that expresses the same structure, boundaries, and relationships you would draw in ASCII.

  • Use flowchart TB for top-to-bottom topologies and flowchart LR when the main flow reads left to right.

  • Declare each component as a node with a short, specific label, for example lb["Load Balancer"], and use [("...")] for data stores.

  • Group components that share a network, account, or deployment domain inside a subgraph block, such as a VNet, subnet, or resource group.

  • Use --> for data flow or dependency, <--> for bidirectional connections, and -. optional .-> for optional or conditional links.

  • Keep node identifiers stable and lowercase, and reserve labels for the human-readable name.

flowchart TB
    subgraph rg["Resource Group"]
        lb["Load Balancer"]
        subgraph subnet["App Subnet"]
            vm1["VM 1"]
            vm2["VM 2"]
        end
        db[("SQL Database")]
    end
    lb --> vm1
    lb --> vm2
    vm1 --> db
    vm2 --> db

Layout Guidelines

  • Place external or public services at the top.

  • Place compute or application tiers in the middle.

  • Place data stores at the bottom.

  • Group components by network boundary, such as a VNet or subnet.

  • Let the main flow run from top to bottom when the direction is clear.

Resource Identification Heuristics

When reading infrastructure sources, extract:

  • Resource type and name

  • Network associations, including VNet, subnet, private endpoint, or ingress settings

  • Dependencies that are explicit in configuration and those that are implied by references

  • Deployment relationships such as container registry, service mesh, or workload placement

Output Format Contract

Use this structure for every infrastructure diagram:

## <Name> Architecture

[diagram in the selected format]

### Legend
[Arrow meanings from this diagram; reference the arrow types above]

### Key Relationships
[Notable connections and dependencies]

The title should use title case and follow the pattern <Name> Architecture. The legend should explain any special symbols used, and the key relationships section should focus on the most important dependencies or data flows.

Catalog diagrams use the parallel ## <Engagement> Data Model contract defined in catalog-erd.md, with a Legend covering multiplicity and confidence and a Key Relationships section carrying every declared relationship and its basis.

Worked Example: AKS Platform Architecture

## AKS Platform Architecture

+===============================================================+
|  Resource Group                                               |
|  :--- Virtual Network ------------------------------------:   |
|  :  +------------------+        +------------------+      :   |
|  :  |   NAT Gateway    |------->|   AKS Cluster    |      :   |
|  :  +------------------+        +--------+---------+      :   |
|  :                              +--------v---------+      :   |
|  :                              |       ACR        |      :   |
| :                              +------------------+      : |
|:----------------------------------------------------------:|
|      +------------------+        +------------------+      |
|     | Log Analytics    |<-------|  App Insights    |          |
|     +------------------+        +------------------+          |
+===============================================================+

### Legend
See the arrow types above. Additional symbols: `====` primary boundary, `:---:` secondary boundary.

### Key Relationships
* AKS pulls images from ACR through the network boundary.
* NAT Gateway provides egress for AKS workloads.

The same architecture in Mermaid form expresses identical structure, boundaries, and relationships:

## AKS Platform Architecture

```mermaid
flowchart TB
    subgraph rg["Resource Group"]
        subgraph vnet["Virtual Network"]
            nat["NAT Gateway"]
            aks["AKS Cluster"]
            acr["ACR"]
        end
        appinsights["App Insights"]
        logs[("Log Analytics")]
    end
    nat --> aks
    aks --> acr
    appinsights --> logs
```

### Legend
See the arrow types above; `subgraph` blocks denote network or resource boundaries.

### Key Relationships
* AKS pulls images from ACR through the network boundary.
* NAT Gateway provides egress for AKS workloads.

Authoring Guidelines

  • Ask one or two clarifying questions when the architecture scope is ambiguous.

  • Announce the current workflow stage when you move from discovery to parsing or generation.

  • Present a draft diagram with a short summary of the resources included before finalizing.

  • Note important inference decisions, such as implicit dependencies, when they affect the diagram.

  • Treat the diagram as a static representation of infrastructure sources, not a runtime execution view.

  • Keep the output focused on a single architecture scope so it remains readable.

Files

references/catalog-erd.md


title: Catalog-driven entity relationship diagrams description: Input authority, cardinality mapping, confidence rendering, and compatibility boundaries for DS_CATALOG_V1 diagrams

Input authority

Use data-catalog, the durable data-catalog skill for declared entities, relationships, identity, lineage, and model semantics, when a caller supplies a DS_CATALOG_V1 Markdown catalog. Parsed YAML frontmatter is semantic authority. The renderer does not infer entities, endpoints, cardinalities, endpoint minimums, join keys, or confidence from SQL, ORM definitions, naming conventions, or prose.

A catalog that passes data-catalog validation is the expected input. The renderer rejects an unsupported catalog version, a missing or non-string entity ID or name, a duplicate entity or relationship ID, an identifier collision, an unresolved endpoint, an unknown cardinality, a missing or invalid endpoint minimum, an unknown confidence value, an empty basis, and any malformed join-key declaration. It fails with EXIT_ERROR instead of omitting, defaulting, truncating, inferring, or partially rendering a fact. The renderer is a view over the catalog, not a second catalog validator or semantic owner.

Multiplicity mapping

cardinality supplies the maximum on each side. from_minimum and to_minimum supply the minimum. Both are required and neither is inferred.

Catalog cardinalityfrom maximumto maximum
one-to-oneoneone
one-to-manyonemany
many-to-manymanymany

Each endpoint combines its declared minimum with its derived maximum:

Minimum and maximumMermaid leftMermaid rightASCII
zero and one|oo|0..1
one and one||||1
zero and many}oo{0..*
one and many}||{1..*

Identifiers, attributes, and labels

Mermaid node identifiers derive reversibly from declared entity IDs by escaping every character outside a-z0-9 as _<hex>, so distinct catalog IDs cannot collide. Node labels use the customer-readable name. Relationship evidence in Key Relationships preserves the exact declared relationship ID.

Entity attributes list only the declared join-key field names that the entity participates in, deduplicated and in declaration order. The renderer never adds a synthetic attribute and never emits PK, FK, uniqueness, or any other constraint marker, because the catalog does not declare database key roles.

Relationship labels show the ordered join-key pairing as from_field = to_field. A confirmed relationship carries no confidence marker. An unconfirmed relationship appends exactly (inferred) or (assumed). All connectors are solid: Mermaid reserves dashed ER lines for non-identifying relationships, which this catalog does not model, so confidence never uses the line-style channel and no per-edge style, class, or linkStyle is emitted.

Output contract

Catalog rendering produces this structure in both formats:

## <Engagement> Data Model

[diagram in the selected format]

### Legend
[multiplicity, attribute, confidence, and connector meanings]

### Key Relationships
[every relationship with its declared ID, endpoints, multiplicity, ordered join keys, confidence, and basis]

When the catalog declares no relationships, both formats still render the declared entities and state explicitly that no relationships are declared.

This contract is specific to catalog input. Infrastructure sources keep the <Name> Architecture output contract and the flowchart conventions described in the skill.

Format behavior

Honor the existing caller preference contract. Mermaid output uses erDiagram. ASCII output uses compact entity and relationship lines carrying the same declared multiplicity, join-key, and confidence facts. Neither format changes the catalog.

Execute scripts/render_catalog_erd.py with --format mermaid or --format ascii when deterministic rendering is useful.

Compatibility boundary

DS_CATALOG_V1 is the only supported catalog input version. SQL DDL, Prisma, SQLAlchemy, and other ORM sources remain outside this input type because they do not carry the catalog's declared evidence confidence and engagement semantics. Existing infrastructure-source workflows remain unchanged.

The Feasibility Study Interchange Profile is a separate producer contract owned by feasibility, the evidence-led feasibility-study skill. A future Functional Planner workstream owns adoption of that profile, version negotiation, source-to-requirement mappings, and FR-### allocation. This skill does not parse feasibility studies, claim current Functional Planner compatibility, write back to source studies, or modify requirements artifacts.

Requirements and compatibility

Written for: GitHub Copilot, Claude Code

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Claude Code frontmatter, Needs Python, Needs Node.js

The author says: Works in any chat context where the caller needs an ASCII or Mermaid diagram from infrastructure source files or a declared DS_CATALOG_V1 data catalog

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Microsoft
Publisher
Microsoft (Official)
Source
microsoft/hve-core · .github/skills/hve-core/architecture-diagrams · commit f425e94
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Microsoft.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download architecture-diagrams.zip