blueprint-figure
它能做什么
这项技能绘制一张静态 SVG 图,解释系统中的一种机制。适合为课程和手册制作风格统一、干净图示的作者和教育工作者。
适用场景
- ✓当课程、README 或手册需要一张说明系统各部分如何通信或改变状态的图时。
- ✓当你有日志、规格说明或源代码,并且其中有需要展示的部件真实名称时。
- ✓当一个想法适合用序列、状态机或数据流来清楚展示时。
技能链接
https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/.claude/skills/blueprint-figure/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为这节课绘制一张图,展示请求如何从客户端经过缓存,再到数据库。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体先为图示写出一个清晰的论断,选择合适的图示类型,并使用源码中的真实名称。然后,它在浅色底板上绘制 SVG,使用固定的颜色,并检查标签是否清晰可读。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
- A lesson, README or manual needs a picture of how parts of a system talk, store data, or change state.
- You have a capture, a log, a spec or source code that gives the real names.
- The claim fits one of the nine kinds below.
When not to use
- The figure must move or respond to a slider. Use the sibling skill
motion-figure. - The subject is a physical machine explainer with depth and controls. Use the sibling skill
isometric-explainer. - The data is a chart of numbers over many points. Use a chart tool.
- You do not have real names for the parts. Get a capture or a source first.
Method
- Write the claim first. One sentence, at most 28 words, that the figure proves.
- Pick one kind from the table below. If two kinds fit, draw two figures.
- Collect the real names from the source: parties, fields, methods, codes, sequence numbers.
- Write the hue table for the figure set before you draw (see "Colour").
- Sketch the layout on the 640-unit grid. Keep content between x 20 and x 620.
- Draw the figure with a script. Start from
templates/figure.mjs. Do not edit the SVG by hand. - Run the script. It stops on a label that is too small, too wide, or outside the figure.
- Run the checks in
references/checks.md. Fix every finding. - Render the SVG to PNG and look at it at 100% and at 50% width.
- 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
- Show the real system with real names. Never draw generic boxes such as "Component A".
- Never draw stat cards, progress bars, or decorative icons.
- Make one claim per figure.
- Compare two behaviours of the subject. Never compare with an earlier build of your own project.
- Number the exchanges in a sequence in the order they happen in the capture.
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 |
- Line width is 1.2. Dashed is
5 4. Dotted is1.5 3.5with round caps. - Use one arrowhead marker per hue, with the id
<figure-id>-head-<hue>. - End each arrow 1 unit before the target border.
- Figure 0.1, the first figure of a set, shows each arrow style that the se
常见问题
它能绘制哪些类型的图?
它可以绘制九种静态图示之一,例如序列图、状态机和数据流图。
图示在印刷品和屏幕上都能看清吗?
可以。它的设计目标是在屏幕和印刷中,宽约 640 个单位时仍然清晰可读。
它能绘制动画图示吗?
不能。动画或交互式图示由另一项技能处理。
详情
作者的原始描述
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", "state machine figure", "figure for this lesson", "add a diagram to the manual".
热度
- GitHub 星标
- 76k
- 排名
- #2611
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
build-project
76k充当项目导师,每次带你完成一个实践 AI 项目阶段,提供提示和评分,但不给出完整答案。
check-understanding
76k对 AI Engineering from Scratch 课程中已完成的阶段进行小测验,让你在进入下一阶段前检查自己学到了什么。
claude-certification
76k在 AI Engineering from Scratch 课程的 Claude 认证路线中充当分步导师,提供课程、实验和练习考试。
course-guide
76k指引你找到 AI Engineering from Scratch 课程中涵盖某个主题、问题或错误的确切课程,并告诉你下一步该做什么。