From btp-solution-diagram-generator
Use when creating, editing, or generating SAP BTP (Business Technology Platform) solution diagrams as draw.io (.drawio) files — solution architectures, process flows, data flows, deployment topologies, or any visual showing SAP BTP services, subaccounts, runtimes, integrations, identity flows, or hybrid SAP/non-SAP landscapes. Covers the official SAP BTP Solution Diagram Guidelines (SAP Fiori Horizon colors, area/layer conventions, connector semantics for auth/trust/authorization, the SAP BTP Service Icon library, diagram levels L0–L3), mxGraph XML authoring, and the end-to-end workflow from request to a ready-to-open .drawio file. Trigger on phrases like "BTP architecture diagram", "SAP solution diagram", "draw the subaccount layout", "diagram my CAP/SAP Build app", "show the Cloud Identity Services flow", "visualize the BTP landscape" — even when the user doesn't say the word "drawio" explicitly.
How this skill is triggered — by the user, by Claude, or both
Slash command
/btp-solution-diagram-generator:btp-solution-diagram-generatorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate, edit, and validate `.drawio` diagrams that follow the official
assets/libraries/20-02-00-sap-btp-service-icons-foundational-set/20-02-00-01-sap-btp-service-icons-foundational-size-S.xmlassets/libraries/20-02-00-sap-btp-service-icons-foundational-set/20-02-00-02-sap-btp-service-icons-foundational-size-M.xmlassets/libraries/20-02-00-sap-btp-service-icons-foundational-set/20-02-00-03-sap-btp-service-icons-foundational-size-L.xmlassets/libraries/20-02-01-sap-btp-service-icons-integration-suite-set/20-02-01-01-sap-btp-service-icons-integration_suite-size-S.xmlassets/libraries/20-02-01-sap-btp-service-icons-integration-suite-set/20-02-01-02-sap-btp-service-icons-integration_suite-size-M.xmlassets/libraries/20-02-01-sap-btp-service-icons-integration-suite-set/20-02-01-03-sap-btp-service-icons-integration_suite-size-L.xmlassets/libraries/20-02-02-sap-btp-service-icons-app-dev-automation-set/20-02-02-01-sap-btp-service-icons-app-dev-automation-size-S.xmlassets/libraries/20-02-02-sap-btp-service-icons-app-dev-automation-set/20-02-02-02-sap-btp-service-icons-app-dev-automation-size-M.xmlassets/libraries/20-02-02-sap-btp-service-icons-app-dev-automation-set/20-02-02-03-sap-btp-service-icons-app-dev-automation-size-L.xmlassets/libraries/20-02-04-sap-btp-service-icons-data-analytics-set/20-02-04-01-sap-btp-service-icons-data-analytics-size-S.xmlassets/libraries/20-02-04-sap-btp-service-icons-data-analytics-set/20-02-04-02-sap-btp-service-icons-data-analytics-size-M.xmlassets/libraries/20-02-04-sap-btp-service-icons-data-analytics-set/20-02-04-03-sap-btp-service-icons-data-analytics-size-L.xmlassets/libraries/20-02-05-sap-btp-service-icons-ai-set/20-02-05-01-sap-btp-service-icons-ai-size-S.xmlassets/libraries/20-02-05-sap-btp-service-icons-ai-set/20-02-05-02-sap-btp-service-icons-ai-size-M.xmlassets/libraries/20-02-05-sap-btp-service-icons-ai-set/20-02-05-03-sap-btp-service-icons-ai-size-L.xmlassets/libraries/20-02-06-sap-btp-service-icons-btp-saas-set/20-02-06-01-sap-btp-service-icons-btp-saas-set-size-S.xmlassets/libraries/20-02-06-sap-btp-service-icons-btp-saas-set/20-02-06-02-sap-btp-service-icons-btp-saas-set-size-M.xmlassets/libraries/20-02-06-sap-btp-service-icons-btp-saas-set/20-02-06-03-sap-btp-service-icons-btp-saas-set-size-L.xmlassets/libraries/20-02-99-sap-btp-service-icons-all/20-02-99-01-sap-btp-service-icons-all-size-S.xmlassets/libraries/20-02-99-sap-btp-service-icons-all/20-02-99-02-sap-btp-service-icons-all-size-M.xmlGenerate, edit, and validate .drawio diagrams that follow the official
SAP BTP Solution Diagram Guidelines.
Output files open directly in draw.io (web, desktop, or VS Code
extension hediet.vscode-drawio) without any manual fixes.
The goal isn't just "a diagram that opens" — it's a diagram that looks like it came out of SAP's own guideline, using the SAP Fiori Horizon palette, the grey-circle BTP service icons, and the area/connector conventions SAP architects expect.
Trigger this skill for any request that involves visualizing SAP BTP architecture. Examples — load this skill even if "drawio" or "BTP" isn't spelled out:
.drawio file mentioning BTP services or running on the BTP landscapeIf the user wants a non-BTP diagram (pure flowchart, UML, ER), fall back to the generic draw.io approach. This skill is specifically for BTP-flavored diagrams.
| Type | Starter template | What it shows |
|---|---|---|
| Solution / Architecture (L0–L3) | assets/templates/solution-diagram-l2.drawio | BTP subaccount with services, runtimes, identity, and integrations |
| Process flow | assets/templates/process-flow.drawio | Numbered sequence of steps across BTP and external systems |
| Data flow | assets/templates/data-flow.drawio | Direction and shape of data movement between services |
| Reusable legend | assets/templates/legend.drawio | Drop-in legend for connectors and semantic colors |
SAP's guideline defines four levels of detail. Pick the right one up front — users often ask for "an architecture diagram" when what they need is L1 or L2.
| Level | Audience | Shows |
|---|---|---|
| L0 | Executive / business | BTP as a single block, 2–4 high-level capability areas, no service icons |
| L1 | Solution overview | Major components grouped into areas; minimal service names; logical flows |
| L2 | Technical stakeholders (default) | Individual BTP services with icons, clear auth/trust/data flows, legend |
| L3 | Deep technical | L2 plus protocols, ports, adapters, destinations, principal propagation details |
If the user doesn't specify, default to L2 and mention you did.
app.diagrams.net), desktop, or the VS Code extension
hediet.vscode-drawio. All three render the same .drawio XML.scripts/:
validate_drawio.py — structural validation + BTP-specific checksgenerate_btp_diagram.py — scaffold a new BTP diagram with defaults applieddownload_btp_libraries.py — fetch the official SAP BTP icon libraries
(.xml) from GitHub so the user can import them into draw.ioNo other dependencies. The scripts use only the Python standard library.
Follow this order for every BTP diagram request.
You want to pin down five things. If the user's prompt already covers them, skip ahead; don't ask for the sake of asking.
assets/templates/solution-diagram-l2.drawioassets/templates/process-flow.drawioassets/templates/data-flow.drawioIf none fits, start fresh with this minimal skeleton (A4 landscape, 1169×827):
<mxfile host="Electron" modified="" version="27.0.0">
<diagram id="page-1" name="BTP Solution Diagram">
<mxGraphModel dx="1422" dy="762" grid="1" gridSize="10" guides="1"
tooltips="1" connect="1" arrows="1" fold="1"
page="1" pageScale="1" pageWidth="1169" pageHeight="827"
math="0" shadow="0" background="none">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- your cells -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
Cells id="0" and id="1" are mandatory and must be first, in that order. id="1"
must have parent="0". Never reuse those ids for anything else.
Before writing any XML, sketch mentally (or in a comment):
strokeColor=#0070F2, fillColor=#EBF8FF, arcSize=16,
absoluteArcSize=1). It's usually the largest single element and sits
center/upper-left.strokeColor=#475E75, fillColor=#F5F6F7).#CC00DC), authentication is green
(#188918), authorization is indigo (#5D36FF) — use these sparingly.Never use draw.io's default fillColor/strokeColor palette (the pale pastel blue, etc.). Always use the SAP Horizon values below. Everything else will look off-brand.
Primary colors
| Purpose | strokeColor | fillColor | Notes |
|---|---|---|---|
| SAP / BTP area | #0070F2 | #EBF8FF | The default container for anything BTP-owned |
| Non-SAP area | #475E75 | #F5F6F7 | 3rd-party apps, external IdPs, partner systems |
| Title text | #1D2D3E | — | Used for headers and labels |
| Body text | #556B82 | — | Used for descriptions and secondary labels |
Semantic colors (for lines and status indicators)
| Purpose | Color |
|---|---|
| Positive / Authentication flow | #188918 (fill #F5FAE5) |
| Critical / Warning | #C35500 (fill #FFF8D6) |
| Negative / Error | #D20A0A (fill #FFEAF4) |
Accent colors (use sparingly to highlight)
| Purpose | Color |
|---|---|
| Teal (emphasis) | #07838F (fill #DAFDF5) |
| Indigo / Authorization flow | #5D36FF (fill #F1ECFF) |
| Pink / Trust flow | #CC00DC (fill #FFF0FA) |
Full reference:
references/btp-colors-and-styles.md
Connector meaning in BTP diagrams is standardized. Stick to these and the reader can understand the flow without you having to over-explain in the legend.
| Meaning | Line style | Color |
|---|---|---|
| Direct, synchronous data flow (request-response) | solid, one-directional | grey #475E75 or blue #0070F2 |
| Indirect / asynchronous data flow | dashed, one-directional | same |
| Optional data flow | dotted | same |
| Mutual trust | solid, bi-directional | pink #CC00DC |
| Authentication | solid or dashed | green #188918 |
| Authorization | solid | indigo #5D36FF |
| Firewall / network barrier | thick (strokeWidth=4) | grey #475E75 |
Edge style string pattern:
endArrow=blockThin;html=1;strokeColor=#475E75;strokeWidth=1.5;rounded=0;endFill=1;endSize=4;
For a dashed line add dashed=1; and for dotted add dashed=1;dashPattern=1 4;.
Full reference:
references/btp-connectors-and-annotations.md
The guideline is emphatic: use the icon version with the grey background circle, not the older flat icons.
The full SAP BTP icon library is bundled inside this skill at
assets/libraries/. You don't need to fetch anything — the XML files are
already here, mirroring the structure from SAP/btp-solution-diagrams.
Three approaches:
(a) Import a bundled library into draw.io (recommended for editable files). In draw.io (web / desktop / VS Code):
File → Open Library from → File…assets/libraries/ — e.g. for every
service in one file (Size M):
assets/libraries/20-02-99-sap-btp-service-icons-all/20-02-99-02-sap-btp-service-icons-all-size-M.xmlSize M (24px) is the default. Size S (16px) is useful for dense L3 diagrams; size L (48px) for L0/L1 overviews.
(b) Copy an <mxCell> directly from the bundled library XML.
Each icon in the library is a fully-formed <mxCell> with a
shape=image;image=data:image/svg+xml,<base64>;... style. For fully
self-contained .drawio files, copy the cell into your diagram and
adjust x, y, width, height, and value (the label). No library
import required afterwards.
(c) Start from a real SAP reference example.
assets/reference-examples/ contains 11 editable .drawio files from the
SAP repo (Task Center L0/L1/L2, Build Work Zone L2, Cloud Identity
Authentication/Authorization/Lifecycle, Private Link Service, SAP Start,
Build Process Automation L2). These are great if the user wants something
close to an existing SAP scenario.
Searchable icon catalog (names and IDs): see
references/btp-icons.mdThe bundled libraries are a snapshot of the SAP repo. To refresh them against upstream, run
python scripts/download_btp_libraries.py --all --out assets/libraries.
Every BTP solution diagram should include:
#0070F2, bold, Arial or Helvetica#475E75,
fontSize 12, non-bold#1D2D3EfillColor=#FFFFFF,
strokeColor=#eaecee, arcSize=16, absoluteArcSize=1) containing one entry
per connector type and per access/color used. See assets/templates/legend.drawio.drawio extension.python scripts/validate_drawio.py <path-to-file.drawio>
This checks XML well-formedness, required root cells, unique ids, parent
references, vertex geometry, edge endpoints, plus BTP-specific guidance
(presence of title, presence of legend, use of BTP palette).┌─────────────────────────────────────────────────────────────┐
│ [Title: "SAP Task Center - BTP Solution Diagram"] │ <-- #0070F2, bold, 16pt
│ Short description (2–3 lines) │ <-- #475E75, 12pt
│ Diagram Level: L2 │
│ │
│ ┌──────────────────────────────┐ ┌───────────────────┐ │
│ │ SAP BTP Subaccount (blue) │ │ Non-SAP System │ │
│ │ │ │ (grey) │ │
│ │ ┌──[Cloud Foundry runtime] │ │ │ │
│ │ │ [icon] SAP Build WZ │ │ │ │
│ │ │ [icon] SAP Task Center │ │ │ │
│ │ └────────────────────────┘ │ │ │
│ │ │ └───────────────────┘ │
│ │ [icon] Cloud Identity Svc │ │
│ │ [icon] Destination Service │ │
│ └──────────────────────────────┘ │
│ │
│ ┌─ Legend ─────────────────┐ │
│ │ ● Access ─► Service │ │
│ │ ● Authentication ══► MTrust│ │
│ │ ● Authorization ··► Opt. │ │
│ └──────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
The blue BTP subaccount dominates; internal services nest inside with alternating fill to provide contrast; non-SAP systems are grey, outside; identity/trust flows use semantic colors; a legend explains the connector semantics.
Full reference: references/drawio-xml-schema.md. The highlights:
Vertex cell (any shape, container, or icon):
<mxCell id="unique-id" value="Label"
style="rounded=1;whiteSpace=wrap;html=1;fillColor=#EBF8FF;strokeColor=#0070F2;"
vertex="1" parent="1">
<mxGeometry x="100" y="100" width="320" height="200" as="geometry" />
</mxCell>
Edge cell (any connector):
<mxCell id="edge-1" value=""
style="endArrow=blockThin;html=1;strokeColor=#475E75;strokeWidth=1.5;endFill=1;endSize=4;"
edge="1" source="a" target="b" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
BTP service icon (grey-circle version — the important bit is
shape=image;...image=data:image/svg+xml,<BASE64>):
<mxCell id="svc-wz" value="SAP Build Work Zone"
style="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image=data:image/svg+xml,<BASE64>;fontColor=#556B82;fontSize=10;"
vertex="1" parent="1">
<mxGeometry x="240" y="160" width="48" height="48" as="geometry" />
</mxCell>
Rules (every file must satisfy these or draw.io won't render):
id="0" and id="1" exist, are first and second, in that orderparent pointing at an existing id<mxGeometry as="geometry"> childsource+target attributes pointing at real vertex
ids, or <mxPoint as="sourcePoint"> + <mxPoint as="targetPoint"> in its
<mxGeometry> (floating edges)& → &, < → <,
> → >#0070F2 / #EBF8FF,
stay consistent. Don't mix Horizon with draw.io defaults.btp- plus a random
suffix is safest.Layout
Labels
#556B82, Arial#0070F2Colors
Connector direction
dashPattern=1 4) for optional.File naming
task-center-l2.drawio,
cap-on-cf-extension.drawio, s4-datasphere-data-flow.drawio-l1, -l2, -l3 so readers know the granularity up front| Symptom | Likely cause | Fix |
|---|---|---|
| File opens blank | Missing id=0 or id=1 cell | Add both at the top of <root> |
| Icon shows as a red X | SVG base64 is truncated or corrupted | Re-copy from library XML — the whole image=data:image/svg+xml,... blob must be intact |
| Shape appears far away | Child of a group, but x/y given in page coords | Convert to relative coords, or set parent="1" if you want page coords |
| Lines look flat pastel | Using draw.io's default colors | Replace with Horizon palette from §4 |
| "Diagram looks off" but no specific issue | Palette mixing, inconsistent fonts, too many accent colors | Audit against references/btp-colors-and-styles.md |
| Validator complains "no title cell" | No 16pt header at top of page | Add a text;...fontSize=16;fontStyle=1;fontColor=#0070F2; cell |
| Can't find a service icon | Service may be under a different naming in the library | Search the icon catalog in references/btp-icons.md |
Deliver three things with every generated file:
.drawio file at the requested pathOpen the file in draw.io (
app.diagrams.net) or the VS Code extensionhediet.vscode-drawio. To add more SAP BTP services, load the official icon library:File → Open Library from → URL…, pastehttps://github.com/SAP/btp-solution-diagrams/blob/main/assets/shape-libraries-and-editable-presets/draw.io/20-02-99-sap-btp-service-icons-all/20-02-99-02-sap-btp-service-icons-all-size-M.xml
| File | What's in it |
|---|---|
references/btp-colors-and-styles.md | Complete Horizon palette, text styles, spacing rules, ready-to-paste style strings |
references/btp-areas-and-layers.md | Area types (BTP, non-SAP, accent), nesting rules, cardinality (stacked areas), layer proportions |
references/btp-connectors-and-annotations.md | Connector semantics, authentication/authorization/trust color mapping, firewall style, interface annotations |
references/btp-icons.md | Catalog of all ~200 SAP BTP service icons with their library titles — search by service name |
references/drawio-xml-schema.md | mxfile/mxGraphModel/mxCell attribute reference, coordinate system, reserved cells |
references/diagram-levels.md | When to use L0 vs L1 vs L2 vs L3, and the contents expected at each |
assets/templates/solution-diagram-l2.drawio | Ready-to-edit L2 solution diagram with BTP subaccount, 3rd-party area, legend |
assets/templates/process-flow.drawio | Numbered process-flow starter |
assets/templates/data-flow.drawio | Data-flow starter with two systems and a BTP area |
assets/templates/legend.drawio | Drop-in legend you can copy into any diagram |
assets/libraries/ | Bundled — the full SAP BTP icon library (all 22 XML files: foundational / integration-suite / app-dev-automation / data-analytics / AI / BTP-SaaS / all-in-one, in sizes S/M/L, plus generics and annotation helpers) |
assets/reference-examples/ | Bundled — 11 editable .drawio files from SAP (Task Center L0/L1/L2, Build Work Zone L2, Cloud Identity flows, Private Link, SAP Start, Build Process Automation L2) |
scripts/validate_drawio.py |
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub lemaiwo/btp-drawio-skill --plugin btp-solution-diagram-generator