Skill Overview
This skill is used to conduct deep research on technical topics and output professional research report documents.
| Capability | Description |
|---|---|
| Content Extraction | Extract core information from URLs and documents |
| Deep Research | Search online to supplement background, comparisons, and the latest developments |
| Report Generation | By default, generate both Markdown and Word versions |
| Diagram Generation | Generate technical infographics for core concepts |
| Word Formatting | Automatically handle styles such as table of contents, bold headings, and solid table lines |
Trigger Rules
Use this skill when the user message contains the following keywords:
- research, deep research, research report
- help me research, help me analyze
- research this, take a look at this
Output Specifications
Each research task must provide both:
- Markdown version: used for Obsidian knowledge base accumulation and bidirectional linking
- Word version: used for formal reporting and external sharing, and must be processed through script formatting
Directory Structure
Create an independent folder for each research topic to keep things tidy:
{output_dir}/
├── Ralph-Loop/ # 主题文件夹(英文短横线命名)
│ ├── images/ # 该主题的信息图
│ │ ├── architecture.png
│ │ └── comparison.png
│ ├── Ralph-Loop调研报告.md # Markdown 报告
│ └── Ralph-Loop调研报告.docx # Word 报告
├── MCP-Protocol/
│ ├── images/
│ ├── MCP-Protocol调研报告.md
│ └── MCP-Protocol调研报告.docx
└── ...
Naming conventions:
- Folder name: English, words connected with hyphens, e.g.
Ralph-Loop、MCP-Protocol - Report files:
{主题名}调研报告.mdand{主题名}调研报告.docx - Image directory: a separate
images/directory under each topic folder
Research Process
Step 1: Create the topic directory
Create an independent folder based on the research topic:
mkdir -p "{output_dir}/{主题名}/images"
Step 2: Content Acquisition
- If the user provides a URL, use webfetch to retrieve the content
- Extract core concepts, technical principles, and key information
- Identify points that require deeper research
Step 3: Deep Research
Use the Task tool to search online and supplement:
- Technical background and development history
- Competitor comparisons and differentiation
- Community discussions and real-world cases
- GitHub repositories and open-source implementations
- Latest developments and trends
Step 4: Diagram Generation
Use preset style scripts to generate unified hand-drawn style infographics.
Image Generation Trigger Rules
| Content Type | Whether to Generate Image | Diagram Type | Description |
|---|---|---|---|
| Core architecture/principle | Required | arch | System structure, tech stack, module composition |
| Process/steps | Required | flow | Workflow, execution order, operation steps |
| A vs B comparison | Required | compare | Comparison of two solutions/technologies |
| 3 or more elements | Recommended | concept | Core concepts, composed of multiple aspects |
| Plain text tables | Not required | - | Just use a Markdown table |
| Code example | Not needed | - | Just use a code block |
Preset style templates
All illustrations use a unified hand-drawn visualization style to maintain series consistency:
| Type | Command parameters | Color scheme | Layout |
|---|---|---|---|
| Architecture diagram | -t arch |
Tech blue #4A90D9 | Layered/modular |
| Flowchart | -t flow |
Blue + green + orange | Top to bottom |
| Comparison diagram | -t compare |
Blue vs orange | Left-right split columns |
| Concept diagram | -t concept |
Blue-purple gradient | Center-radiating |
Generation command
Use the research_image.py script to generate:
# 架构图
python .opencode/skills/image-service/scripts/research_image.py \
-t arch \
-n "Ralph Loop 核心架构" \
-c "展示 Prompt、Agent、Stop Hook、Files 四个模块的循环关系" \
-o "{output_dir}/{主题名}/images/architecture.png"
# 流程图
python .opencode/skills/image-service/scripts/research_image.py \
-t flow \
-n "Stop Hook 工作流程" \
-c "Agent尝试退出、Hook触发、检查条件、允许或阻止退出的完整流程" \
-o "{output_dir}/{主题名}/images/flow.png"
# 对比图
python .opencode/skills/image-service/scripts/research_image.py \
-t compare \
-n "ReAct vs Ralph Loop" \
-c "左侧ReAct依赖自我评估停止,右侧Ralph使用外部Hook控制" \
-o "{output_dir}/{主题名}/images/comparison.png"
# 概念图
python .opencode/skills/image-service/scripts/research_image.py \
-t concept \
-n "状态持久化要素" \
-c "中心是Agent,周围是progress.txt、prd.json、Git历史、代码文件" \
-o "{output_dir}/{主题名}/images/concept.png"
Image naming conventions
| Diagram type | File name |
|---|---|
| Architecture diagram | architecture.png or {具体名称}_arch.png |
| Flowchart | flow.png or {具体名称}_flow.png |
| Comparison diagram | comparison.png or {A}_vs_{B}.png |
| Concept diagram | concept.png or {具体名称}_concept.png |
Step 5: Report writing
Write a Markdown report according to the standard template and save it in the topic folder:
{output_dir}/{主题名}/{主题名}调研报告.md
Reference images in the report using relative paths:

Step 6: Word export
# 进入主题目录
cd "{output_dir}/{主题名}"
# 生成 Word(--resource-path=. 确保图片正确引用)
# 注意:不要使用 --toc 参数,因为 Markdown 中已有手写目录
pandoc "{主题名}调研报告.md" -o "{主题名}调研报告.docx" --resource-path=.
# 格式化 Word
python ../../../.opencode/skills/deep-research/scripts/format_docx.py "{主题名}调研报告.docx"
Writing principles
The core value of a research report: in-depth research, reducing the team's cost of absorbing information, and providing expert-level recommendations.
- Thorough understanding: no superficial understanding or large-scale copying; must digest and absorb it, then express it in your own words
- Show thinking: have judgment and recommendations, rather than merely stating the current state
- Support with details: conclusions are supported by process and details, not empty talk
- Clear logic: paragraphs, structure, and numbering
- Illustration notes: core concepts must be accompanied by infographics
- Remove AI flavor:
- Do not use special symbols such as 「」 or " "
- Do not use excessive emphasis symbols and emoji
- Write naturally and fluently, like a professional document written by a human
- Avoid clichés such as "first, second, in conclusion"
Report template
---
date: YYYY-MM-DD
type: 调研报告
领域: {技术领域}
tags: [调研, {主题关键词}]
---
# XX调研报告
> 调研日期:YYYY年M月D日
---
## 目录
- 一、简介
- 二、启示
- 三、核心介绍
- 3.1 XXX
- 3.2 XXX
- 四、附录
- 4.1 详细文档
- 4.2 参考资料
---
## 一、简介
(快速说明调研内容,简短重点)
是什么,主要用来做什么,属于什么类别。有哪些能力,有什么特点。和竞品相比,有哪些区别,主打什么。
1. 要点一
2. 要点二
3. 要点三
---
## 二、启示
(调研内容带来的启示、值得学习借鉴之处、与现有产品如何结合、是否值得推荐)
1. 启示一
2. 启示二
3. 启示三
---
## 三、核心介绍
(正文部分,详细说明调研内容的原理/搭建/操作/使用过程,含信息图及流程说明)
### 3.1 XXX

上图展示了...(图解说明,让读者看图就能理解)
详细内容...
### 3.2 XXX
详细内容...
---
## 四、附录
### 4.1 详细文档
(更详细的配置/操作过程)
### 4.2 参考资料
**官方文档**
- 文档名称: https://xxx
**开源实现**
- 项目名称: https://github.com/xxx
**社区讨论**
- 讨论来源: https://xxx
Script description
format_docx.py
Word document formatting script, with functions including:
- Centered title, black font (remove pandoc's default blue)
- Replace "Table of Contents" with the Chinese "目录"
- Separate page for the table of contents
- Automatically insert a page break before level-1 headings (Introduction, Insights, etc.)
- Keep tables intact without breaking across pages
- Keep code blocks intact without breaking
- Center the date line
Usage:
python .opencode/skills/deep-research/scripts/format_docx.py "输入.docx" ["输出.docx"]
Complete research example
User input:
Research Ralph Loop
Execution flow:
# 1. 创建主题目录
mkdir -p "{output_dir}/Ralph-Loop/images"
# 2. 获取内容(如有 URL)
webfetch https://example.com/article
# 3. 深度调研(使用 Task 工具联网搜索)
# 4. 生成信息图
python .opencode/skills/image-service/scripts/text_to_image.py "技术架构图..." --output "{output_dir}/Ralph-Loop/images/architecture.png"
# 5. 撰写报告
# 写入 {output_dir}/Ralph-Loop/Ralph-Loop调研报告.md
# 6. 导出 Word(不使用 --toc,Markdown 已有手写目录)
cd "{output_dir}/Ralph-Loop"
pandoc "Ralph-Loop调研报告.md" -o "Ralph-Loop调研报告.docx" --resource-path=.
python ../../../.opencode/skills/deep-research/scripts/format_docx.py "Ralph-Loop调研报告.docx"
Output files:
{output_dir}/Ralph-Loop/
├── images/
│ ├── architecture.png
│ └── comparison.png
├── Ralph-Loop调研报告.md
└── Ralph-Loop调研报告.docx
Dependencies
- pandoc: Markdown to Word
- python-docx: Word formatting
- image-service skill: generate infographics