Blueprint figure

From ngophatneknha/ai-engineering-hub · View interactive version

Blueprint figure is an AI agent skill from the GitHub repository ngophatneknha/ai-engineering-hub. Draws static SVG figures for lessons, READMEs and manuals in the AI Engineering from Scratch look: paper panel, blueprint accent, nine figure kinds, fixed hue meanings, eight arrow styles, and checks for legibility and markup. Trigger phrases: "draw a figure", "blueprint figure", "sequence figure",

How to use this skill

Skill file

Blueprint Figure

This skill draws one static SVG figure that explains one mechanism of a real system. The figure uses the real names from the system: ids, field names, method names, status codes and sequence numbers. It sits on a light paper panel and uses a small set of hues with fixed meanings. It stays readable at 640 units wide on screen and in print. Claude, Cursor, Codex, OpenClaw, Hermes, or any agent that reads SKILL.md can use it. The sibling skill course-style holds the full course tokens. This skill copies the tokens it needs, so it works alone.

When to use

When not to use

Method

  1. Write the claim first. One sentence, at most 28 words, that the figure proves.
  2. Pick one kind from the table below. If two kinds fit, draw two figures.
  3. Collect the real names from the source: parties, fields, methods, codes, sequence numbers.
  4. Write the hue table for the figure set before you draw (see "Colour").
  5. Sketch the layout on the 640-unit grid. Keep content between x 20 and x 620.
  6. Draw the figure with a script. Start from templates/figure.mjs. Do not edit the SVG by hand.
  7. Run the script. It stops on a label that is too small, too wide, or outside the figure.
  8. Run the checks in references/checks.md. Fix every finding.
  9. Render the SVG to PNG and look at it at 100% and at 50% width.
  10. Write the caption: the bold claim, how to read the figure, then the source.

The nine kinds

| Kind | Use it for |

|---|---|

| sequence | parties on lifelines, time running down, numbered exchanges |

| structure | the anatomy of one record, object, or schema |

| flow | stages that data passes through, with who writes and who reads |

| comparison | two answers to one question, side by side |

| timeline | tracks over a numbered axis such as commit sequence or time |

| tree | ownership, containment, or delegation |

| state | a state machine with its transitions |

| decision | where something fails and what each outcome means |

| layers | a stack of layers with the parts each one owns |

Layout numbers for each kind are in references/kinds.md.

What a figure shows

Colour

Ten hues: grey, blue, teal, violet, green, amber, plum, olive, indigo, rose. Each hue has an ink and a fill token. A hue means the same thing in every figure of one set.

Four meanings are fixed:

| Hue | Fixed meaning |

|---|---|

| rose | failure: errors, crashes, aborts, lost work |

| grey | outside the subject: the host, the operator, out of scope |

| amber | lifecycle: tasks, phases, state machines |

| teal | durable state: storage and committed records |

Assign the other six hues once per set and write the table in the page or the manual front matter.

Write every colour as var(--m-<token>, <light hex>), for example var(--m-rose-ink, #b0344d). The host page supplies dark values. A README shows the light hex. All light and dark values are in references/grammar.md.

Arrows

| Style | Means |

|---|---|

| solid ink | a call or request |

| dashed ink | a reply |

| solid teal | a durable write |

| dashed amber | a state change |

| solid plum | a model call or compute |

| dashed olive | an effect outside the system |

| dotted indigo | a stream or an event |

| dashed rose | a failure |

Borders

Legibility rules

Technical rules

The caption

Put the caption in the page around the SVG. Do not put it inside the SVG.

  1. Start with the claim in bold: one sentence, at most 28 words, ending with a period.
  2. Say how to read the figure, such as "Read top to bottom."
  3. Name the source, such as the capture file.

In a manual, declare the figure in a fenced block:

id: fig-4-1

kind: state

title: the task lifecycle

claim: A task ends in one of four terminal states and never leaves one.

caption: Read left to right. Dashed borders are interrupted states. From capture/out/task-states.txt.

In a lesson or README, put the SVG in an image tag or inline, then the caption as a paragraph under it.

Keep source and output together

Check before you finish

Files

Inside the AI Engineering from Scratch repo, also see manuals/_shared/figkit.js (the full kit), manuals/_shared/templates/ (one script per kind), and scripts/audit_manuals.js (the figure lint).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.