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: Create one-page high-level design diagrams in the soft rounded architecture style shown by the reference: pale blueprint background, mono text, blue-gray cards, arrows, data stores, stream bus, small vector icons, and side labels.4---56# HLD Diagram Sheet Skill78Use 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.910The 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.1112## Visual style1314Canvas:15- Default size: `1080 x 779`.16- Background: very pale blue-gray, with faint blueprint/perspective linework near the edges.17- Title: centered, uppercase, heavy sans-serif, near the top edge.1819Boxes:20- Rounded rectangles with light blue fill, blue-gray stroke, and soft shadow.21- Text is centered and set in a monospaced/typewriter face.22- Primary service boxes are medium-sized cards.23- Data stores use the same card treatment, plus a small cylinder icon.24- Derived/eventual stores can use the same card treatment but should be clearly labeled as derived/eventual.25- State-changing paths should land on the system of truth first.2627Arrows:28- Main arrows are muted blue-gray, 2 px, with triangular heads.29- Eventual/derived fan-out paths are muted green.30- Prefer orthogonal paths when a connection crosses rows.31- Put short labels near the line, not inside arrows.3233Special elements:34- Stream/change-log bus: long rounded capsule with a Kafka-style node icon on the left and a segmented pipe/cylinder on the right.35- 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.36- Keep labels terse: `(SYNC)`, `CDC`, `claim`, `fan-out\n(delta)`, `GET ?range\n(1 hop)`.3738## Workflow39401. Draft the system as rows:41 - clients and gateway42 - write/read services43 - systems of truth44 - change stream45 - indexes, schedulers, workers, derived stores46 - external wake/read labels472. Create a YAML file based on `examples/calendar_booking.yaml`.483. Run:4950```bash51python scripts/render_hld.py examples/calendar_booking.yaml --out outputs/calendar_booking --format all52```53544. Open the PNG or SVG. Check for:55 - clipped text56 - crowded labels57 - arrows touching text58 - icons covering words59 - unclear source of truth vs derived storage605. Adjust `x`, `y`, `w`, and `h` in the YAML. Re-render.6162## YAML structure6364Minimum:6566```yaml67canvas:68 width: 108069 height: 77970 title: "SYSTEM HIGH-LEVEL DESIGN (HLD)"7172nodes:73 - id: api74 kind: box75 x: 32076 y: 4777 w: 59778 h: 5379 text: "API Gateway - authN->N, rate-limit, route"80 - id: service81 kind: box82 x: 42083 y: 14884 w: 20085 h: 7986 text: "Application Service"8788edges:89 - from: api.bottom90 to: service.top9192labels:93 - text: "(SYNC)"94 x: 23095 y: 26096```9798Node kinds:99- `box`100- `green_box`101- `stream`102103Edge endpoints:104- `node.top`, `node.bottom`, `node.left`, `node.right`, `node.center`105- absolute points like `[420, 510]`106107Icons can be attached globally:108109```yaml110icons:111 - name: db112 x: 306113 y: 352114 scale: 0.82115```116117Supported 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`.118119## Layout rules120121Use exact positions. The renderer intentionally avoids auto-layout, because auto-layout makes this style look generic.122123Good spacing targets:124- 18-28 px between vertical rows.125- 16-28 px between cards in a row.126- 8-16 px between a label and its arrow.127- Keep stream bus centered and wide.128- Use blue arrows for authoritative writes and change-stream flow.129- Use green arrows for derived availability/index updates.130131## Deliverables132133For a user-facing result, provide at least:134- source YAML135- SVG136- PNG preview137- PDF when they need a printable page138139Use the script's `--guides` option only while tuning. Do not deliver guide overlays unless requested.