research-to-diagram
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseResearch to Diagram
Research to Diagram
深度调研主题并自动生成知识关系图谱PDF。从研究到可视化的一站式工具。
Conduct in-depth research on topics and automatically generate knowledge relationship graph PDFs. A one-stop tool from research to visualization.
Description
Description
这个 Skill 接收用户提供的研究主题,自动进行深度网络调研、信息收集、知识整理、结构设计,最终生成专业的可视化关系图谱PDF。与 不同,本 Skill 专注于主动研究和知识挖掘,而非被动的数据转换。
structure-to-pdfThis Skill receives research topics provided by users, automatically performs in-depth web research, information collection, knowledge organization, structure design, and finally generates professional visualized relationship graph PDFs. Different from , this Skill focuses on active research and knowledge mining rather than passive data conversion.
structure-to-pdf核心特性
Core Features
- 自动调研:使用 WebSearch 进行多轮深度调研
- 智能整理:自动提取、分类、结构化信息
- 专业设计:根据主题特点选择最佳可视化方案
- 多种输出:支持 Graphviz、PlantUML、Mermaid 等工具
- 高质量PDF:生成矢量图形,可无限缩放
- Automated Research: Conduct multi-round in-depth research using WebSearch
- Intelligent Organization: Automatically extract, classify, and structure information
- Professional Design: Select the optimal visualization scheme based on topic characteristics
- Multiple Outputs: Support tools like Graphviz, PlantUML, Mermaid
- High-Quality PDF: Generate vector graphics that can be infinitely scaled
Trigger Conditions
Trigger Conditions
当用户想要:
- 研究某个复杂主题的知识结构(如"红楼梦人物关系")
- 生成人物关系图、概念图谱、知识图谱
- 理解某个领域的组织架构、技术架构
- 可视化复杂的关系网络
- 需要从零开始研究并可视化某个主题
关键词:
- "调研...并做图"
- "研究...的关系"
- "深度分析...并可视化"
- "生成...知识图谱"
- "画...关系图"(无现成数据)
When users want to:
- Research the knowledge structure of a complex topic (e.g., "A Dream of Red Mansions character relationships")
- Generate character relationship diagrams, concept maps, knowledge graphs
- Understand the organizational structure or technical architecture of a certain field
- Visualize complex relationship networks
- Need to research and visualize a topic from scratch
Keywords:
- "Research...and diagram"
- "Study the relationships of..."
- "In-depth analysis...and visualization"
- "Generate...knowledge graph"
- "Draw...relationship diagram" (no existing data)
Workflow
Workflow
1. 任务规划(TodoWrite)
1. Task Planning (TodoWrite)
- 深度调研主题和相关知识
- 设计图谱结构和层次
- 创建可视化图表
- 生成PDF文档- Conduct in-depth research on the topic and related knowledge
- Design the graph structure and hierarchy
- Create visual diagrams
- Generate PDF documents2. 深度调研阶段
2. In-Depth Research Phase
- 多轮 WebSearch:从不同角度收集信息
- 主题概述和背景
- 核心要素和人物/概念
- 关系和联系
- 层次和分类
- 信息源记录:保存所有参考资料链接
- 知识提取:识别关键实体和关系
- Multi-round WebSearch: Collect information from different perspectives
- Topic overview and background
- Core elements and characters/concepts
- Relationships and connections
- Hierarchies and classifications
- Information Source Recording: Save links to all reference materials
- Knowledge Extraction: Identify key entities and relationships
3. 结构设计阶段
3. Structure Design Phase
根据主题类型选择最佳结构:
人物关系图:
- 家族谱系:多层次树状结构
- 社会网络:网状关系图
- 组织架构:层次化布局
概念图谱:
- 知识分类:树状或思维导图
- 概念关系:有向图
- 流程图:线性或分支流程
技术架构:
- 系统组件:模块化布局
- 依赖关系:层次或网络图
- 数据流向:流程图
Select the optimal structure based on topic type:
Character Relationship Diagrams:
- Family pedigree: Multi-level tree structure
- Social network: Network relationship diagram
- Organizational structure: Hierarchical layout
Concept Maps:
- Knowledge classification: Tree or mind map
- Concept relationships: Directed graph
- Flowchart: Linear or branching process
Technical Architecture:
- System components: Modular layout
- Dependency relationships: Hierarchical or network diagram
- Data flow: Flowchart
4. 可视化实现
4. Visualization Implementation
优先使用 Graphviz (DOT 语言):
dot
digraph G {
// 全局样式
graph [rankdir=TB bgcolor="#fdfdf5" fontname="Arial Unicode MS"]
node [shape=box style="rounded,filled" fillcolor="#e8f4f8"]
edge [fontname="Arial Unicode MS"]
// 使用 subgraph cluster 分组
subgraph cluster_group1 {
label="分组名称"
node1 [label="节点1"]
node2 [label="节点2"]
}
// 定义关系
node1 -> node2 [label="关系类型" color=red]
}备选工具:
- PlantUML:UML 图、时序图
- Mermaid:简单流程图、时序图
Priority use of Graphviz (DOT language):
dot
digraph G {
// 全局样式
graph [rankdir=TB bgcolor="#fdfdf5" fontname="Arial Unicode MS"]
node [shape=box style="rounded,filled" fillcolor="#e8f4f8"]
edge [fontname="Arial Unicode MS"]
// 使用 subgraph cluster 分组
subgraph cluster_group1 {
label="分组名称"
node1 [label="节点1"]
node2 [label="节点2"]
}
// 定义关系
node1 -> node2 [label="关系类型" color=red]
}Alternative Tools:
- PlantUML: UML diagrams, sequence diagrams
- Mermaid: Simple flowcharts, sequence diagrams
5. PDF 生成
5. PDF Generation
bash
dot -Tpdf diagram.dot -o output.pdfbash
dot -Tpdf diagram.dot -o output.pdf6. 文档整理
6. Document Organization
可选生成说明文档,包含:
- 研究主题概述
- 图谱说明
- 参考资料来源(Sources)
- 使用说明
Optionally generate explanatory documents including:
- Research topic overview
- Graph explanation
- Reference sources (Sources)
- Usage instructions
设计原则
Design Principles
视觉设计
Visual Design
- 颜色编码:使用不同颜色区分类别
- 形状区分:不同类型实体用不同形状
- 层次清晰:使用 subgraph cluster 分组
- 关系标注:边的颜色、样式、标签表达关系类型
- 中文支持:使用 "Arial Unicode MS" 或系统中文字体
- Color Coding: Use different colors to distinguish categories
- Shape Differentiation: Use different shapes for different types of entities
- Clear Hierarchy: Use subgraph cluster for grouping
- Relationship Annotation: Use edge color, style, and labels to express relationship types
- Chinese Support: Use "Arial Unicode MS" or system Chinese fonts
信息层次
Information Hierarchy
- 标题层:主标题
- 分组层:主要类别/家族
- 实体层:具体人物/概念
- 关系层:连接和标注
- 图例层:说明符号含义
- Title Layer: Main title
- Grouping Layer: Main categories/families
- Entity Layer: Specific characters/concepts
- Relationship Layer: Connections and annotations
- Legend Layer: Explain symbol meanings
布局策略
Layout Strategies
- rankdir=TB:自上而下(家族树、组织架构)
- rankdir=LR:从左到右(流程图、时间线)
- rankdir=BT:自下而上(依赖图)
- splines=ortho:正交边(清晰的组织图)
- splines=curved:曲线边(美观的关系网)
- rankdir=TB: Top to bottom (family trees, organizational structures)
- rankdir=LR: Left to right (flowcharts, timelines)
- rankdir=BT: Bottom to top (dependency diagrams)
- splines=ortho: Orthogonal edges (clear organizational diagrams)
- splines=curved: Curved edges (aesthetic relationship networks)
输出文件
Output Files
默认保存位置: 或用户指定目录
~/Downloads/生成文件:
- - Graphviz 源文件
<topic>_relations.dot - - 最终PDF图谱
<topic>_relations.pdf - - 参考资料(可选)
<topic>_sources.md
Default save location: or user-specified directory
~/Downloads/Generated files:
- - Graphviz source file
<topic>_relations.dot - - Final PDF graph
<topic>_relations.pdf - - Reference materials (optional)
<topic>_sources.md
使用示例
Usage Examples
示例 1:文学作品人物关系
Example 1: Literary Work Character Relationships
用户:深度调查《三国演义》里人物之间的关系,然后做个结构图 PDFSkill 执行:
- 调研三国主要人物、阵营、关系
- 设计:魏蜀吴三大阵营 + 人物层次 + 联盟/对抗关系
- 使用 Graphviz 创建多层次关系图
- 生成 PDF
User: Conduct in-depth research on the relationships between characters in "Romance of the Three Kingdoms" and create a structure diagram PDFSkill Execution:
- Research main characters, camps, and relationships in the Three Kingdoms period
- Design: Three major camps (Wei, Shu, Wu) + character hierarchy + alliance/opposition relationships
- Create a multi-level relationship diagram using Graphviz
- Generate PDF
示例 2:技术概念图谱
Example 2: Technical Concept Map
用户:研究 Kubernetes 架构并生成可视化图谱Skill 执行:
- 调研 K8s 核心组件、架构层次
- 设计:控制平面/数据平面/插件生态
- 生成技术架构图
- 输出 PDF
User: Research Kubernetes architecture and generate a visualized graphSkill Execution:
- Research K8s core components and architecture hierarchy
- Design: Control plane/data plane/plugin ecosystem
- Generate technical architecture diagram
- Output PDF
示例 3:历史事件关系
Example 3: Historical Event Relationships
用户:分析二战主要国家和联盟关系,做成图表Skill 执行:
- 调研参战国家、阵营、关键时间节点
- 设计:轴心国/同盟国/中立国关系网
- 生成带时间线的关系图
- 输出 PDF
User: Analyze the relationships between major countries and alliances in World War II and create a chartSkill Execution:
- Research participating countries, camps, and key time nodes
- Design: Axis powers/Allied powers/neutral countries relationship network
- Generate a relationship diagram with timeline
- Output PDF
与 structure-to-pdf 的区别
Differences from structure-to-pdf
| 特性 | research-to-diagram | structure-to-pdf |
|---|---|---|
| 输入 | 仅主题/研究问题 | 现成的结构化数据 |
| 调研 | ✅ 自动深度调研 | ❌ 无需调研 |
| 知识整理 | ✅ 自动提取和结构化 | ❌ 直接使用用户数据 |
| 应用场景 | 知识探索、研究可视化 | 快速数据转换 |
| 时间 | 较长(需调研) | 快速 |
何时使用本 Skill:
- ✅ 没有现成数据,需要从零研究
- ✅ 想要深度了解某个主题的知识结构
- ✅ 需要权威来源支持的可视化
何时使用 structure-to-pdf:
- ✅ 已有结构化数据
- ✅ 需要快速转换为图表
- ✅ 数据格式简单清晰
| Feature | research-to-diagram | structure-to-pdf |
|---|---|---|
| Input | Only topic/research question | Existing structured data |
| Research | ✅ Automated in-depth research | ❌ No research needed |
| Knowledge Organization | ✅ Automatic extraction and structuring | ❌ Directly use user data |
| Application Scenarios | Knowledge exploration, research visualization | Quick data conversion |
| Time | Longer (requires research) | Fast |
When to Use This Skill:
- ✅ No existing data, need to research from scratch
- ✅ Want to deeply understand the knowledge structure of a topic
- ✅ Need visualization supported by authoritative sources
When to Use structure-to-pdf:
- ✅ Have existing structured data
- ✅ Need quick conversion to charts
- ✅ Data format is simple and clear
依赖工具
Dependent Tools
必需:
- Graphviz: (macOS)
brew install graphviz - WebSearch: Claude Code 内置
可选:
- PlantUML:
brew install plantuml - Mermaid CLI:
npm install -g @mermaid-js/mermaid-cli
Required:
- Graphviz: (macOS)
brew install graphviz - WebSearch: Built into Claude Code
Optional:
- PlantUML:
brew install plantuml - Mermaid CLI:
npm install -g @mermaid-js/mermaid-cli
配置选项
Configuration Options
用户可以通过参数自定义:
- : 指定可视化工具 (graphviz/plantuml/mermaid)
--tool - : 指定布局方向 (TB/LR/BT/RL)
--layout - : 指定输出目录
--output - : 调研深度 (quick/medium/deep)
--depth - : 是否生成参考资料文档
--sources
Users can customize via parameters:
- : Specify visualization tool (graphviz/plantuml/mermaid)
--tool - : Specify layout direction (TB/LR/BT/RL)
--layout - : Specify output directory
--output - : Research depth (quick/medium/deep)
--depth - : Whether to generate reference materials document
--sources
最佳实践
Best Practices
- 明确主题范围:主题越具体,图谱越清晰
- 合理分组:使用 cluster 将相关实体分组
- 控制复杂度:单个图谱不超过 50 个节点
- 渐进细化:先生成总览图,再深入细节
- 颜色一致:同类实体使用相同配色
- 标注来源:在 PDF 底部或单独文档标注参考资料
- Clear Topic Scope: The more specific the topic, the clearer the graph
- Reasonable Grouping: Use clusters to group related entities
- Control Complexity: No more than 50 nodes in a single graph
- Progressive Refinement: Generate an overview first, then dive into details
- Consistent Colors: Use the same color scheme for similar entities
- Cite Sources: Label reference materials at the bottom of the PDF or in a separate document
常见图谱类型模板
Common Graph Type Templates
人物关系图模板
Character Relationship Diagram Template
dot
- 家族/组织用 cluster 分组
- 人物用 box/ellipse,重要人物用特殊形状
- 血缘关系用实线,婚姻用红色,其他用虚线
- 添加图例说明符号含义dot
- Use cluster for family/organization grouping
- Use box/ellipse for characters, special shapes for important characters
- Use solid lines for blood relationships, red lines for marriage, dashed lines for others
- Add legends to explain symbol meanings概念图谱模板
Concept Map Template
dot
- 顶层概念在上方
- 子概念逐层展开
- is-a 关系用实线,has-a 用虚线
- 使用颜色区分不同类别dot
- Top-level concepts at the top
- Sub-concepts expanded layer by layer
- Use solid lines for is-a relationships, dashed lines for has-a relationships
- Use colors to distinguish different categories技术架构图模板
Technical Architecture Diagram Template
dot
- 分层架构用 rankdir=TB
- 组件用矩形,服务用圆角矩形
- 依赖关系用箭头
- 关键路径用粗线或特殊颜色dot
- Use rankdir=TB for layered architecture
- Use rectangles for components, rounded rectangles for services
- Use arrows for dependency relationships
- Use thick lines or special colors for critical paths故障排除
Troubleshooting
中文显示乱码:
dot
graph [fontname="Arial Unicode MS"]
node [fontname="Arial Unicode MS"]
edge [fontname="Arial Unicode MS"]图谱过于复杂:
- 使用 合并相同边
concentrate=true - 分割成多个子图
- 使用不同的 rankdir
布局不理想:
- 调整 和
ranksepnodesep - 使用 强制节点同层
rank=same - 尝试不同的 设置
splines
Chinese Display Garbled Characters:
dot
graph [fontname="Arial Unicode MS"]
node [fontname="Arial Unicode MS"]
edge [fontname="Arial Unicode MS"]Overly Complex Graph:
- Use to merge identical edges
concentrate=true - Split into multiple subgraphs
- Use different rankdir settings
Ideal Layout Not Achieved:
- Adjust and
ranksepnodesep - Use to force nodes to be on the same layer
rank=same - Try different settings
splines
版本历史
Version History
- v1.0 (2026-01-02): 初始版本
- 基于《红楼梦》人物关系图谱项目总结
- 支持 Graphviz 自动生成
- 集成 WebSearch 深度调研
- TodoWrite 任务管理
- v1.0 (2026-01-02): Initial version
- Summarized based on the "A Dream of Red Mansions" character relationship graph project
- Support automatic generation with Graphviz
- Integrated WebSearch for in-depth research
- TodoWrite for task management