fireworks-tech-graph
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGenerate a production-quality technical diagram from .
$ARGUMENTS基于生成生产级别的技术图表。
$ARGUMENTSInputs
输入
- Required: diagram description, system/process structure, or comparison axes
- Optional: output path, requested style, PNG export requirement, brand/product names
If the prompt is too vague to identify nodes and edges, ask for the missing structure before drawing.
- 必填项:图表描述、系统/流程结构或对比维度
- 可选项:输出路径、指定样式、PNG导出需求、品牌/产品名称
如果提示过于模糊,无法识别节点和连接关系,请在绘图前询问缺失的结构信息。
Workflow
工作流程
Follow this order:
- Classify the request into a diagram type.
- Extract the structure: layers, nodes, edges, flows, and semantic groups.
- Plan the layout before drawing.
- Load a style reference:
- default:
$SKILL_DIR/references/style-1-flat-icon.md - load another file only when the user explicitly requests a different look
style-*.md
- default:
- Map each concept to a consistent shape.
- If branded products appear, read .
$SKILL_DIR/references/icons.md - Resolve the output path:
- use the user-provided file path when present
- otherwise save the SVG in the current working directory with a descriptive filename
- Write the SVG to disk.
- If PNG was requested or would materially help, export PNG when local tooling is available.
- Return the created file paths and clearly report whether PNG export succeeded, was skipped, or failed.
请按以下顺序执行:
- 将请求归类为对应的图表类型。
- 提取结构信息:层级、节点、连接边、数据流和语义分组。
- 绘图前规划布局。
- 加载样式参考:
- 默认样式:
$SKILL_DIR/references/style-1-flat-icon.md - 仅当用户明确要求不同外观时,才加载其他文件
style-*.md
- 默认样式:
- 将每个概念映射为统一的形状。
- 如果出现品牌产品,请读取。
$SKILL_DIR/references/icons.md - 确定输出路径:
- 若用户提供了文件路径,则使用该路径
- 否则将SVG保存到当前工作目录,并使用描述性文件名
- 将SVG写入磁盘。
- 如果用户要求PNG格式,或PNG格式能带来实际帮助,且本地工具可用时导出PNG。
- 返回创建的文件路径,并明确报告PNG导出是成功、跳过还是失败。
Output Contract
输出约定
Always return:
- the SVG path
- the requested or inferred diagram type
- the style reference used
- PNG export status
If only SVG was produced, say so explicitly.
必须返回以下内容:
- SVG文件路径
- 请求或推断出的图表类型
- 使用的样式参考
- PNG导出状态
如果仅生成了SVG,请明确说明。
Diagram Types
图表类型
Architecture Diagram
架构图
- Group services or components into horizontal or vertical layers.
- Common layers: Client → Gateway → Services → Data/Storage.
- Use dashed containers to group related components.
- Default :
viewBox; use0 0 960 600for taller stacks.0 0 960 800
- 将服务或组件按水平或垂直层级分组。
- 常见层级:Client → Gateway → Services → Data/Storage。
- 使用虚线容器对相关组件进行分组。
- 默认:
viewBox;对于更高的层级结构,使用0 0 960 600。0 0 960 800
Data Flow Diagram
数据流图
- Emphasize what data moves where.
- Label every important arrow with the data type.
- Use thicker arrows for the primary data path.
- Use dashed arrows for triggers or control flow.
- 重点突出数据流向。
- 为每个重要箭头标注数据类型。
- 主数据路径使用粗箭头。
- 触发或控制流使用虚线箭头。
Flowchart / Process Flow
流程图/流程框图
- Prefer top-to-bottom unless the flow is clearly wider than tall.
- Use diamonds for decisions, rounded rectangles for processes, and parallelograms for I/O.
- Keep node labels short; move extra detail into sub-labels.
- Snap to a readable grid.
- 优先采用从上到下的布局,除非流程明显宽于高。
- 决策使用菱形,流程步骤使用圆角矩形,输入/输出使用平行四边形。
- 节点标签保持简短;额外细节放在子标签中。
- 对齐到易读的网格。
Agent Architecture Diagram
Agent架构图
- Consider these layers: Input, Agent Core, Memory, Tools, Output.
- Use loop arrows where reasoning or tool use iterates.
- Visually separate short-term and long-term memory.
- 考虑以下层级:Input、Agent Core、Memory、Tools、Output。
- 在推理或工具调用循环的位置使用循环箭头。
- 在视觉上区分短期记忆和长期记忆。
Memory Architecture Diagram
内存架构图
- Separate read and write paths.
- Show tiers such as Working Memory, Short-term, Long-term, External Store.
- Label operations like ,
store(),retrieve(), andforget().consolidate()
- 区分读取和写入路径。
- 展示层级,如Working Memory、Short-term、Long-term、External Store。
- 标注操作,如、
store()、retrieve()和forget()。consolidate()
Sequence Diagram
时序图
- Participants use vertical lifelines.
- Messages are horizontal arrows arranged top-to-bottom in time order.
- Use activation boxes or frames when the sequence has phases, loops, or alternatives.
- 参与者使用垂直生命线。
- 消息使用水平箭头,按时间顺序从上到下排列。
- 当序列包含阶段、循环或分支时,使用激活框或框架。
Comparison / Feature Matrix
对比/功能矩阵
- Columns are systems; rows are attributes.
- Use alternating row fills for readability.
- If the comparison grows beyond 5 columns, split it into multiple diagrams.
- 列代表系统;行代表属性。
- 使用交替行填充色提升可读性。
- 如果对比超过5列,将其拆分为多个图表。
Timeline / Gantt
时间线/甘特图
- X-axis is time; Y-axis is phase, task, or milestone owner.
- Use bars for durations and diamonds or dots for milestones.
- X轴代表时间;Y轴代表阶段、任务或里程碑负责人。
- 使用条形表示持续时间,菱形或圆点表示里程碑。
Mind Map / Concept Map
思维导图/概念图
- Place the main concept at the center.
- First-level branches should be balanced around the center.
- Prefer curved branches instead of rigid straight spokes.
- 主概念放在中心位置。
- 一级分支围绕中心均衡分布。
- 优先使用弯曲分支,而非僵硬的直辐条。
Shape Vocabulary
形状语义
Use consistent semantics across diagrams:
| Concept | Shape |
|---|---|
| User / Human | circle or actor |
| LLM / Model | double-border rounded rectangle |
| Agent / Orchestrator | hexagon or emphasized controller box |
| Short-term Memory | rounded rectangle with dashed border |
| Long-term Memory | cylinder |
| Vector Store | cylinder with inner rings |
| Graph DB | clustered circular form or labeled store |
| Tool / Function | utility box or gear-marked rectangle |
| API / Gateway | hexagon |
| Queue / Stream | horizontal pipe |
| File / Document | folded-corner rectangle |
| Browser / UI | browser frame |
| Decision | diamond |
| Process / Step | rounded rectangle |
| External Service | cloud-like or dashed-border external node |
| Data / Artifact | parallelogram |
在所有图表中使用统一的语义:
| 概念 | 形状 |
|---|---|
| 用户/人类 | 圆形或角色图标 |
| LLM/模型 | 双边框圆角矩形 |
| Agent/编排器 | 六边形或突出显示的控制器框 |
| 短期记忆 | 虚线边框圆角矩形 |
| 长期记忆 | 圆柱体 |
| Vector Store | 带内环的圆柱体 |
| Graph DB | 集群圆形或带标签的存储框 |
| 工具/函数 | 实用框或带齿轮标记的矩形 |
| API/网关 | 六边形 |
| 队列/流 | 水平管道 |
| 文件/文档 | 折角矩形 |
| 浏览器/UI | 浏览器框架 |
| 决策 | 菱形 |
| 流程/步骤 | 圆角矩形 |
| 外部服务 | 云状或虚线边框外部节点 |
| 数据/工件 | 平行四边形 |
Arrow Semantics
箭头语义
Use color and stroke to encode meaning:
| Flow Type | Suggested Meaning |
|---|---|
| Blue solid | primary request or data flow |
| Orange solid | control or trigger flow |
| Green solid | memory read |
| Green dashed | memory write |
| Gray dashed | async or event-driven flow |
| Purple solid | transform, embedding, or loopback |
When a diagram uses 2 or more arrow meanings, add a legend.
使用颜色和线条样式编码含义:
| 流类型 | 建议含义 |
|---|---|
| 蓝色实线 | 主要请求或数据流 |
| 橙色实线 | 控制或触发流 |
| 绿色实线 | 内存读取 |
| 绿色虚线 | 内存写入 |
| 灰色虚线 | 异步或事件驱动流 |
| 紫色实线 | 转换、嵌入或循环返回 |
当图表使用2种及以上箭头含义时,需添加图例。
Layout Rules
布局规则
- Keep related nodes aligned to a simple grid.
- Keep at least between node edges where possible.
60px - Avoid routing arrows through nodes.
- The most important node should have the strongest visual emphasis.
- Keep arrow labels short and legible.
- Group related nodes with lightly tinted or dashed containers instead of cluttering labels.
- 将相关节点对齐到简洁的网格。
- 尽可能保持节点边缘之间至少的间距。
60px - 避免箭头穿过节点。
- 最重要的节点应具有最强的视觉突出效果。
- 箭头标签保持简短易读。
- 使用浅色填充或虚线容器对相关节点进行分组,而非添加过多标签造成混乱。
SVG Technical Rules
SVG技术规范
- Default to unless the diagram needs a taller or wider canvas.
viewBox="0 0 960 600" - Use inline and system fonts only.
<style> - Do not use external font loading.
@import - Put reusable markers, gradients, filters, and clip paths in .
<defs> - Prefer labels and
12-14pxtitles.16-18px - Use marker arrows for directed edges.
- Use curved cubic paths for feedback loops and non-linear returns.
- 默认使用,除非图表需要更高或更宽的画布。
viewBox="0 0 960 600" - 仅使用内联和系统字体。
<style> - 不使用外部加载字体。
@import - 将可复用的标记、渐变、滤镜和裁剪路径放在中。
<defs> - 优先使用的标签和
12-14px的标题。16-18px - 有向边使用标记箭头。
- 反馈循环和非线性返回使用三次贝塞尔曲线路径。
Platform & Export
平台与导出
Required deliverable
必交付内容
- Always deliver an file.
.svg - is an enhancement when local export tooling exists.
.png
- 始终交付文件。
.svg - 当本地导出工具存在时,作为增强选项提供。
.png
Export behavior
导出行为
- If is available, use it for PNG export.
rsvg-convert - If it is not available:
- still write the SVG
- report that PNG export was skipped because the converter is unavailable
- tell the user what command to check next based on their platform
- 如果可用,使用它进行PNG导出。
rsvg-convert - 如果不可用:
- 仍写入SVG文件
- 报告因转换器不可用而跳过PNG导出
- 根据用户平台告知下一步应检查的命令
Dependency checks
依赖检查
- In bash-like shells:
command -v rsvg-convert - In PowerShell:
Get-Command rsvg-convert
- 在类bash shell中:
command -v rsvg-convert - 在PowerShell中:
Get-Command rsvg-convert
Platform notes
平台说明
- Windows: prefer PowerShell checks and quote paths that contain spaces. If the user gives a Windows path such as , preserve it exactly.
C:\Users\name\Desktop\diagram.svg - macOS: is commonly provided by
rsvg-convert.librsvg - Linux: is commonly provided by
rsvg-convertor equivalent packages.librsvg2-bin
- Windows:优先使用PowerShell检查,并对包含空格的路径添加引号。如果用户提供Windows路径(如),请完全保留该路径。
C:\Users\name\Desktop\diagram.svg - macOS:通常由
rsvg-convert提供。librsvg - Linux:通常由
rsvg-convert或等效包提供。librsvg2-bin
Path handling
路径处理
- Use the user-provided output path when present.
- If no path is given, save in the current working directory.
- Do not rewrite a Windows path into POSIX form unless the user asked for that.
- Quote file paths with spaces when invoking export commands.
- 若用户提供了输出路径,则使用该路径。
- 如果未提供路径,保存到当前工作目录。
- 除非用户要求,否则不要将Windows路径转换为POSIX格式。
- 调用导出命令时,对包含空格的文件路径添加引号。
Failure handling
错误处理
- If export fails, keep the SVG and report the exact output path.
- If only SVG was produced, say so explicitly instead of implying a full export succeeded.
- Do not invent download URLs or package-manager instructions you cannot verify from local context.
- 如果导出失败,保留SVG文件并报告确切的输出路径。
- 如果仅生成了SVG,请明确说明,不要暗示完整导出成功。
- 不要编造无法从本地上下文验证的下载URL或包管理器指令。
Final Checklist
最终检查清单
- Main structure is readable at a glance
- Arrow semantics are consistent and labeled when needed
- Requested style reference was actually loaded
- SVG exists at the reported path
- 核心结构一目了然
- 箭头语义一致,必要时已标注
- 已加载请求的样式参考
- SVG文件存在于报告的路径中
Styles
样式
| # | Name | Best For |
|---|---|---|
| 1 | Flat Icon (default) | blogs, docs, slides |
| 2 | Dark Terminal | README, dev articles, dark presentations |
| 3 | Blueprint | architecture and engineering documentation |
| 4 | Notion Clean | internal docs, wikis, calm system diagrams |
| 5 | Glassmorphism | keynotes or more polished visual storytelling |
Load the matching file from when a style is selected.
$SKILL_DIR/references/| # | 名称 | 适用场景 |
|---|---|---|
| 1 | Flat Icon(默认) | 博客、文档、幻灯片 |
| 2 | Dark Terminal | README、开发文章、深色主题演示文稿 |
| 3 | Blueprint | 架构和工程文档 |
| 4 | Notion Clean | 内部文档、维基、简洁系统图 |
| 5 | Glassmorphism | 主题演讲或更精致的视觉叙事 |
当选定样式时,从加载匹配的文件。
$SKILL_DIR/references/AI / Agent Common Patterns
AI/Agent常见模式
Internalize these recurring structures:
- RAG Pipeline: Query → Embed → Vector Search → Retrieve → LLM → Response
- Agentic RAG: query plus planner/tool loop before synthesis
- Agentic Search: Query → Planner → Tools → Synthesizer → Response
- Memory Layer: Input → Memory Manager → Store/Retrieve → Context
- Multi-Agent: Orchestrator → Sub-agents → Aggregator → Output
- Tool Call Flow: LLM → Tool Selector → Execution → Result Parser → back to LLM
牢记以下常见结构:
- RAG Pipeline: Query → Embed → Vector Search → Retrieve → LLM → 响应
- Agentic RAG: 查询加上规划器/工具循环,然后进行合成
- Agentic Search: Query → Planner → Tools → Synthesizer → 响应
- Memory Layer: Input → Memory Manager → Store/Retrieve → 上下文
- Multi-Agent: Orchestrator → Sub-agents → Aggregator → 输出
- Tool Call Flow: LLM → Tool Selector → Execution → Result Parser → 返回LLM
Common Mistakes
常见错误
- Arrow paths crossing through nodes
- Too many arrow colors with no legend
- Unlabeled important arrows
- No grouping in complex diagrams
- Text overflow inside nodes
- Reporting PNG output when only SVG exists
- Forgetting to load the requested style reference before drawing
- 箭头路径穿过节点
- 使用过多箭头颜色但未添加图例
- 重要箭头未标注
- 复杂图表未进行分组
- 节点内文本溢出
- 仅生成SVG却报告PNG输出
- 绘图前忘记加载请求的样式参考