fireworks-tech-graph

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Generate a production-quality technical diagram from
$ARGUMENTS
.
基于
$ARGUMENTS
生成生产级别的技术图表。

Inputs

输入

  • 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:
  1. Classify the request into a diagram type.
  2. Extract the structure: layers, nodes, edges, flows, and semantic groups.
  3. Plan the layout before drawing.
  4. Load a style reference:
    • default:
      $SKILL_DIR/references/style-1-flat-icon.md
    • load another
      style-*.md
      file only when the user explicitly requests a different look
  5. Map each concept to a consistent shape.
  6. If branded products appear, read
    $SKILL_DIR/references/icons.md
    .
  7. 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
  8. Write the SVG to disk.
  9. If PNG was requested or would materially help, export PNG when local tooling is available.
  10. Return the created file paths and clearly report whether PNG export succeeded, was skipped, or failed.
请按以下顺序执行:
  1. 将请求归类为对应的图表类型。
  2. 提取结构信息:层级、节点、连接边、数据流和语义分组。
  3. 绘图前规划布局。
  4. 加载样式参考:
    • 默认样式:
      $SKILL_DIR/references/style-1-flat-icon.md
    • 仅当用户明确要求不同外观时,才加载其他
      style-*.md
      文件
  5. 将每个概念映射为统一的形状。
  6. 如果出现品牌产品,请读取
    $SKILL_DIR/references/icons.md
  7. 确定输出路径:
    • 若用户提供了文件路径,则使用该路径
    • 否则将SVG保存到当前工作目录,并使用描述性文件名
  8. 将SVG写入磁盘。
  9. 如果用户要求PNG格式,或PNG格式能带来实际帮助,且本地工具可用时导出PNG。
  10. 返回创建的文件路径,并明确报告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
    :
    0 0 960 600
    ; use
    0 0 960 800
    for taller stacks.
  • 将服务或组件按水平或垂直层级分组。
  • 常见层级: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()
    ,
    forget()
    , and
    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:
ConceptShape
User / Humancircle or actor
LLM / Modeldouble-border rounded rectangle
Agent / Orchestratorhexagon or emphasized controller box
Short-term Memoryrounded rectangle with dashed border
Long-term Memorycylinder
Vector Storecylinder with inner rings
Graph DBclustered circular form or labeled store
Tool / Functionutility box or gear-marked rectangle
API / Gatewayhexagon
Queue / Streamhorizontal pipe
File / Documentfolded-corner rectangle
Browser / UIbrowser frame
Decisiondiamond
Process / Steprounded rectangle
External Servicecloud-like or dashed-border external node
Data / Artifactparallelogram
在所有图表中使用统一的语义:
概念形状
用户/人类圆形或角色图标
LLM/模型双边框圆角矩形
Agent/编排器六边形或突出显示的控制器框
短期记忆虚线边框圆角矩形
长期记忆圆柱体
Vector Store带内环的圆柱体
Graph DB集群圆形或带标签的存储框
工具/函数实用框或带齿轮标记的矩形
API/网关六边形
队列/流水平管道
文件/文档折角矩形
浏览器/UI浏览器框架
决策菱形
流程/步骤圆角矩形
外部服务云状或虚线边框外部节点
数据/工件平行四边形

Arrow Semantics

箭头语义

Use color and stroke to encode meaning:
Flow TypeSuggested Meaning
Blue solidprimary request or data flow
Orange solidcontrol or trigger flow
Green solidmemory read
Green dashedmemory write
Gray dashedasync or event-driven flow
Purple solidtransform, 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
    60px
    between node edges where possible.
  • 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
    viewBox="0 0 960 600"
    unless the diagram needs a taller or wider canvas.
  • Use inline
    <style>
    and system fonts only.
  • Do not use external
    @import
    font loading.
  • Put reusable markers, gradients, filters, and clip paths in
    <defs>
    .
  • Prefer
    12-14px
    labels and
    16-18px
    titles.
  • 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
    .svg
    file.
  • .png
    is an enhancement when local export tooling exists.
  • 始终交付
    .svg
    文件。
  • 当本地导出工具存在时,
    .png
    作为增强选项提供。

Export behavior

导出行为

  1. If
    rsvg-convert
    is available, use it for PNG export.
  2. 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
  1. 如果
    rsvg-convert
    可用,使用它进行PNG导出。
  2. 如果不可用:
    • 仍写入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
    C:\Users\name\Desktop\diagram.svg
    , preserve it exactly.
  • macOS:
    rsvg-convert
    is commonly provided by
    librsvg
    .
  • Linux:
    rsvg-convert
    is commonly provided by
    librsvg2-bin
    or equivalent packages.
  • 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

样式

#NameBest For
1Flat Icon (default)blogs, docs, slides
2Dark TerminalREADME, dev articles, dark presentations
3Blueprintarchitecture and engineering documentation
4Notion Cleaninternal docs, wikis, calm system diagrams
5Glassmorphismkeynotes or more polished visual storytelling
Load the matching file from
$SKILL_DIR/references/
when a style is selected.
#名称适用场景
1Flat Icon(默认)博客、文档、幻灯片
2Dark TerminalREADME、开发文章、深色主题演示文稿
3Blueprint架构和工程文档
4Notion Clean内部文档、维基、简洁系统图
5Glassmorphism主题演讲或更精致的视觉叙事
当选定样式时,从
$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输出
  • 绘图前忘记加载请求的样式参考