HLD Diagram Sheet Skill
Use this skill when the user wants a high-level architecture/design document that looks like a polished hand-laid system diagram rather than a generic flowchart.
The output should be a single-page diagram, usually SVG first, then PNG or PDF. Use scripts/render_hld.py with a YAML spec. Do not use Mermaid, Graphviz, or auto-layout for the final artifact; this style depends on fixed visual placement.
Visual style
Canvas:
- Default size:
1080 x 779.
- Background: very pale blue-gray, with faint blueprint/perspective linework near the edges.
- Title: centered, uppercase, heavy sans-serif, near the top edge.
Boxes:
- Rounded rectangles with light blue fill, blue-gray stroke, and soft shadow.
- Text is centered and set in a monospaced/typewriter face.
- Primary service boxes are medium-sized cards.
- Data stores use the same card treatment, plus a small cylinder icon.
- Derived/eventual stores can use the same card treatment but should be clearly labeled as derived/eventual.
- State-changing paths should land on the system of truth first.
Arrows:
- Main arrows are muted blue-gray, 2 px, with triangular heads.
- Eventual/derived fan-out paths are muted green.
- Prefer orthogonal paths when a connection crosses rows.
- Put short labels near the line, not inside arrows.
Special elements:
- Stream/change-log bus: long rounded capsule with a Kafka-style node icon on the left and a segmented pipe/cylinder on the right.
- Small icons should be vector shapes, not external image files. Use them sparingly: key, clock, route, calendar, clipboard, database, Redis stack, search, alarm, phone, bell, document, fan-out, sync, chart.
- Keep labels terse:
(SYNC), CDC, claim, fan-out\n(delta), GET ?range\n(1 hop).
Workflow
- Draft the system as rows:
- clients and gateway
- write/read services
- systems of truth
- change stream
- indexes, schedulers, workers, derived stores
- external wake/read labels
- Create a YAML file based on
examples/calendar_booking.yaml.
- Run:
python scripts/render_hld.py examples/calendar_booking.yaml --out outputs/calendar_booking --format all
- Open the PNG or SVG. Check for:
- clipped text
- crowded labels
- arrows touching text
- icons covering words
- unclear source of truth vs derived storage
- Adjust
x, y, w, and h in the YAML. Re-render.
YAML structure
Minimum:
canvas:
width: 1080
height: 779
title: "SYSTEM HIGH-LEVEL DESIGN (HLD)"
nodes:
- id: api
kind: box
x: 320
y: 47
w: 597
h: 53
text: "API Gateway - authN->N, rate-limit, route"
- id: service
kind: box
x: 420
y: 148
w: 200
h: 79
text: "Application Service"
edges:
- from: api.bottom
to: service.top
labels:
- text: "(SYNC)"
x: 230
y: 260
Node kinds:
Edge endpoints:
node.top, node.bottom, node.left, node.right, node.center
- absolute points like
[420, 510]
Icons can be attached globally:
icons:
- name: db
x: 306
y: 352
scale: 0.82
Supported icon names: devices, key, clock, route, calendar, calendar_pen, calendar_check, clipboard, map, db, redis, kafka, search, alarm, phone_bell, doc, fanout, sync, chart, updown.
Layout rules
Use exact positions. The renderer intentionally avoids auto-layout, because auto-layout makes this style look generic.
Good spacing targets:
- 18-28 px between vertical rows.
- 16-28 px between cards in a row.
- 8-16 px between a label and its arrow.
- Keep stream bus centered and wide.
- Use blue arrows for authoritative writes and change-stream flow.
- Use green arrows for derived availability/index updates.
Deliverables
For a user-facing result, provide at least:
- source YAML
- SVG
- PNG preview
- PDF when they need a printable page
Use the script's --guides option only while tuning. Do not deliver guide overlays unless requested.
1---2name: hld-diagram-sheet3description: >-4 Create one-page high-level design diagrams in the soft rounded architecture5 style shown by the reference: pale blueprint background, mono text,6 blue-gray cards, arrows, data stores, stream bus, small vector icons, and7 side labels.8metadata:9 version: "1.0.0"10---1112# HLD Diagram Sheet Skill1314Use this skill when the user wants a high-level architecture/design document that looks like a polished hand-laid system diagram rather than a generic flowchart.1516The output should be a single-page diagram, usually SVG first, then PNG or PDF. Use `scripts/render_hld.py` with a YAML spec. Do not use Mermaid, Graphviz, or auto-layout for the final artifact; this style depends on fixed visual placement.1718## Visual style1920Canvas:21- Default size: `1080 x 779`.22- Background: very pale blue-gray, with faint blueprint/perspective linework near the edges.23- Title: centered, uppercase, heavy sans-serif, near the top edge.2425Boxes:26- Rounded rectangles with light blue fill, blue-gray stroke, and soft shadow.27- Text is centered and set in a monospaced/typewriter face.28- Primary service boxes are medium-sized cards.29- Data stores use the same card treatment, plus a small cylinder icon.30- Derived/eventual stores can use the same card treatment but should be clearly labeled as derived/eventual.31- State-changing paths should land on the system of truth first.3233Arrows:34- Main arrows are muted blue-gray, 2 px, with triangular heads.35- Eventual/derived fan-out paths are muted green.36- Prefer orthogonal paths when a connection crosses rows.37- Put short labels near the line, not inside arrows.3839Special elements:40- Stream/change-log bus: long rounded capsule with a Kafka-style node icon on the left and a segmented pipe/cylinder on the right.41- Small icons should be vector shapes, not external image files. Use them sparingly: key, clock, route, calendar, clipboard, database, Redis stack, search, alarm, phone, bell, document, fan-out, sync, chart.42- Keep labels terse: `(SYNC)`, `CDC`, `claim`, `fan-out\n(delta)`, `GET ?range\n(1 hop)`.4344## Workflow45461. Draft the system as rows:47 - clients and gateway48 - write/read services49 - systems of truth50 - change stream51 - indexes, schedulers, workers, derived stores52 - external wake/read labels532. Create a YAML file based on `examples/calendar_booking.yaml`.543. Run:5556```bash57python scripts/render_hld.py examples/calendar_booking.yaml --out outputs/calendar_booking --format all58```59604. Open the PNG or SVG. Check for:61 - clipped text62 - crowded labels63 - arrows touching text64 - icons covering words65 - unclear source of truth vs derived storage665. Adjust `x`, `y`, `w`, and `h` in the YAML. Re-render.6768## YAML structure6970Minimum:7172```yaml73canvas:74 width: 108075 height: 77976 title: "SYSTEM HIGH-LEVEL DESIGN (HLD)"7778nodes:79 - id: api80 kind: box81 x: 32082 y: 4783 w: 59784 h: 5385 text: "API Gateway - authN->N, rate-limit, route"86 - id: service87 kind: box88 x: 42089 y: 14890 w: 20091 h: 7992 text: "Application Service"9394edges:95 - from: api.bottom96 to: service.top9798labels:99 - text: "(SYNC)"100 x: 230101 y: 260102```103104Node kinds:105- `box`106- `green_box`107- `stream`108109Edge endpoints:110- `node.top`, `node.bottom`, `node.left`, `node.right`, `node.center`111- absolute points like `[420, 510]`112113Icons can be attached globally:114115```yaml116icons:117 - name: db118 x: 306119 y: 352120 scale: 0.82121```122123Supported icon names: `devices`, `key`, `clock`, `route`, `calendar`, `calendar_pen`, `calendar_check`, `clipboard`, `map`, `db`, `redis`, `kafka`, `search`, `alarm`, `phone_bell`, `doc`, `fanout`, `sync`, `chart`, `updown`.124125## Layout rules126127Use exact positions. The renderer intentionally avoids auto-layout, because auto-layout makes this style look generic.128129Good spacing targets:130- 18-28 px between vertical rows.131- 16-28 px between cards in a row.132- 8-16 px between a label and its arrow.133- Keep stream bus centered and wide.134- Use blue arrows for authoritative writes and change-stream flow.135- Use green arrows for derived availability/index updates.136137## Deliverables138139For a user-facing result, provide at least:140- source YAML141- SVG142- PNG preview143- PDF when they need a printable page144145Use the script's `--guides` option only while tuning. Do not deliver guide overlays unless requested.