From sap-architecture
Use this skill WHENEVER the user wants to create, generate, draw, design, or author an SAP architecture diagram, SAP BTP solution diagram, SAP Cloud Foundry / Kyma / ABAP environment landscape, Cloud Connector topology, SAP S/4HANA landscape, Fiori / SAP Build / Joule architecture, subaccount diagram, MCP-to-SAP deployment diagram, XSUAA auth flow, Principal Propagation diagram, or anything that should match the visual style of https://architecture.learning.sap.com / SAP Architecture Center. Input is a text description of the topology; output is a pixel-polished `.drawio` file (and optionally a PNG export) that matches the canonical SAP Horizon look — correct palette, Helvetica typography, 10-px grid, SAP BTP service icons, straight arrows, no clipped labels.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sap-architecture:sap-architectureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Take a natural-language description of an SAP / BTP / on-prem landscape and produce a polished draw.io file in the SAP Architecture Center visual style. Every artifact it emits is validated against the same rules SAP follows in the published reference architectures.
assets/NOTICE.mdassets/icon-index.jsonassets/libraries/btp-service-icons-all-size-M.xmlassets/reference-examples/SAP_Cloud_Identity_Services_Authentication_L2.drawioassets/reference-examples/SAP_Private_Link_Service_L2.drawioassets/reference-examples/SAP_Task_Center_L2.drawioreferences/layout.mdreferences/levels.mdreferences/palette-and-typography.mdreferences/shapes-and-edges.mdscripts/autofix.pyscripts/build_icon_index.pyscripts/extract_icon.pyscripts/validate.pyTake a natural-language description of an SAP / BTP / on-prem landscape and produce a polished draw.io file in the SAP Architecture Center visual style. Every artifact it emits is validated against the same rules SAP follows in the published reference architectures.
Trigger on any of:
For generic diagrams (flowcharts, ER, class) without an SAP angle, use the general drawio skill instead.
Follow this sequence exactly — each step produces input for the next, and each gate catches different classes of bug.
Before touching XML, write out (in your head or as a hidden scratch pad):
references/levels.md for signals.User / MCP Client, SAP BTP, On-Premise, Third-party / Hyperscaler.Keep this plan short — a 10-line bullet list is plenty. Don't skip it: diagrams built without a plan drift off-grid and end up with bent arrows.
Copy the closest bundled .drawio from assets/reference-examples/ into the target location:
| Reference | Best for |
|---|---|
SAP_Cloud_Identity_Services_Authentication_L2.drawio | Identity / OAuth / trust / sign-in flows (IAS ↔ XSUAA, SSO) |
SAP_Private_Link_Service_L2.drawio | Subaccount → hyperscaler private network, destination + connectivity |
SAP_Task_Center_L2.drawio | BTP service consuming multiple backend systems via Destination Service |
Preserve the title band, zone containers, legend (if any), SAP logo, and canvas size (1169 × 827). Rename <diagram name="…"> to your subject. Delete the inner cards and edges but keep ONE of each as a styling template.
Do not draw from scratch. Starting from a pristine template is the single highest-fidelity trick in this skill.
For every BTP service in your plan, look up the icon:
python3 .claude/skills/sap-architecture/scripts/extract_icon.py "Destination Service" \
--x 600 --y 300 --w 80 --h 96 --id svc-dest --parent 1
The script:
assets/icon-index.json)<mxCell> with the exact SVG data URI the SAP library shipsx/y/w/h to the 10-px gridTo list all available icons: extract_icon.py --list
Common service → canonical library name hints: "Destination Service" → sap-destination-service, "XSUAA" / "Authorization & Trust" → sap-authorization-and-trust-management-service, "Cloud Connector" → cloud-connector, "Audit Log" → sap-audit-log-service.
Build the full .drawio file following these references:
references/layout.md — canvas, zones, title band, network barreferences/palette-and-typography.md — exact hex values and font sizesreferences/shapes-and-edges.md — zone / card / pill / edge style stringsRules that matter most (from research — these are the ones every junior attempt gets wrong):
orthogonalEdgeStyle edge between A and B to render without a kink, either A.centerX == B.centerX or A.centerY == B.centerY. See shapes-and-edges.md.absoluteArcSize=1 next to every arcSize. Without it, 16 is percent and zones get 130-px-radius corners.labelBackgroundColor=default on every edge label. Else text bleeds into the #EBF8FF BTP fill.239.9999… garbage.parent="1", not as children of a zone.Before reporting the diagram as done, run:
python3 .claude/skills/sap-architecture/scripts/autofix.py --write my-diagram.drawio
python3 .claude/skills/sap-architecture/scripts/validate.py my-diagram.drawio
Autofix handles the mechanical issues: grid snapping, hex case, missing absoluteArcSize=1, wrong strokeWidth, wrong fontFamily.
Validate catches everything the LLM can't easily self-police:
mxGeometrylabelBackgroundColorDo not skip this step. The validator replaces five rounds of "look at the screenshot and tell me what's wrong". If it reports any error, fix it and re-run. Warnings are acceptable if the user has explicitly asked for something off-convention; otherwise fix them.
If the user asked for a PNG/SVG/PDF, export with:
"/Applications/draw.io.app/Contents/MacOS/draw.io" -x -f png -e -b 10 -s 2 \
-o my-diagram.drawio.png my-diagram.drawio
(drawio binary on Linux, /mnt/c/Program Files/draw.io/draw.io.exe on WSL2, draw.io.exe on Windows. -e embeds the XML so the PNG is still editable; -s 2 is 2× scale; -b 10 is a 10-px border.)
Finally, print the flow narration — a numbered list that spells out what each pill means. SAP Architecture Center puts this in the Markdown page below the embedded image, never inside the canvas. Example:
Flow
- User signs in to SAP Cloud Identity Services (IAS). (green pill)
- IAS federates the assertion to XSUAA via SAML / OIDC trust. (magenta TRUST pill)
- Claude Desktop calls the ARC-1 MCP endpoint with the XSUAA JWT. (teal MCP TOOL CALL pill)
- ARC-1 resolves the user's destination via BTP Destination Service.
- Cloud Connector opens an mTLS tunnel to the on-prem SAP ABAP system using Principal Propagation (PP). (green mTLS · PP pill)
.claude/skills/sap-architecture/
├── SKILL.md (this file)
├── README.md — user-facing documentation / examples
├── references/
│ ├── levels.md — L0 / L1 / L2 / L3 decision guide + canvas conventions
│ ├── palette-and-typography.md — Horizon hex values + Helvetica hierarchy
│ ├── shapes-and-edges.md — style strings + center-alignment rule
│ └── layout.md — canvas skeleton + zone-by-zone placement
├── assets/
│ ├── libraries/
│ │ └── btp-service-icons-all-size-M.xml — 100 SAP BTP service icons
│ ├── reference-examples/ — 3 pristine L2 SAP ref-arch templates
│ └── icon-index.json — slug → library label + ready-to-paste mxCell style
└── scripts/
├── build_icon_index.py — regenerate icon-index.json after library refresh
├── extract_icon.py — fuzzy service name → mxCell with grid-snapped geometry
├── validate.py — structural + alignment + text-fit + palette checks
└── autofix.py — mechanical fixes (grid, hex case, arcSize, strokeWidth)
shape=mxgraph.sap.icon;SAPIcon=<Name> stencils. They render as blank frames in many installations. Use the bundled inline SVG library.palette-and-typography.md trigger validator warnings.labelBackgroundColor=default on edge labels — it's the single most common bug..drawio.If the user says "make me a BTP deployment diagram" with nothing else, ask ONE clarifying question:
What's the subject app or flow? e.g. "CAP app with XSUAA + HANA Cloud reading from on-prem ECC".
Then proceed. Don't ask more than one question — producing a reasonable default and letting the user iterate beats a long back-and-forth.
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 marianfoo/btp-drawio-skill --plugin sap-architecture