ClawSkills logoClawSkills

Research

对主题进行彻底的互动式或深度异步研究,生成并维护包含发现、来源和摘要的结构化 markdown 文档。

介绍

# Research Skill

## Description(描述) 对某个主题进行开放式研究,构建一个持续更新的 Markdown 文档。对话是临时的;文档才是核心。

## Trigger(触发条件) 当用户想要以下情况时激活: - 研究某个主题、想法或问题 - 在开始构建之前探索某些事物 - 调查选项、模式或方法 - 创建一份“研究文档”或“调查” - 对复杂的主题运行深度异步研究

## Research Directory(研究目录) 每个研究主题都有自己的文件夹: ``` ~/.openclaw/workspace/research/<topic-slug>/ ├── prompt.md # Original research question/prompt ├── research.md # Main findings (Parallel output or interactive notes) ├── research.pdf # PDF export (when generated) └── ... # Any other related files (data, images, etc.) ```

---

## Two Research Modes(两种研究模式)

### 1. Interactive Research (default)(交互式研究,默认) 适用于在对话中共同探索的主题。你需要搜索、综合,并实时更新文档。

### 2. Deep Research (async)(深度研究,异步) 适用于需要全面调查的复杂主题。通过 `parallel-research` CLI 使用 Parallel AI API。耗时几分钟到几小时,返回详细的 Markdown 报告。

**When to use deep research:(何时使用深度研究:)** - 市场分析、竞争格局 - 需要大量收集资料的技术深潜 - 受益于并行探索的多层面问题 - 当用户说“deep research(深度研究)”或希望获得全面覆盖时

---

## Interactive Research Workflow(交互式研究工作流)

### 1. Initialize Research(初始化研究)

1. **Create the research folder(创建研究文件夹)** 在 `~/.openclaw/workspace/research/<topic-slug>/`

2. **Create prompt.md(创建 prompt.md)** 包含原始问题: ```markdown # <Topic Title>

> <The core question or curiosity>

**Started:** <date> ```

3. **Create research.md(创建 research.md)** 包含工作结构: ```markdown # <Topic Title>

**Status:** Active Research **Started:** <date> **Last Updated:** <date>

---

## Open Questions - <initial questions to explore>

## Findings <!-- Populated as we research -->

## Options / Approaches <!-- If comparing solutions -->

## Resources <!-- Links, references, sources -->

## Next Steps <!-- What to explore next, or "graduate to project" --> ```

4. **Confirm with user(与用户确认)** - 显示文件夹已创建,并询问首先探索什么。

### 2. Research Loop(研究循环)

对于每次交流:

1. **Do the research(进行研究)** - 网络搜索、获取文档、探索代码 2. **Update the document(更新文档)** - 添加发现、移动已回答的问题、添加来源 3. **Show progress(显示进度)** - 说明添加了什么内容(不要重复所有内容) 4. **Prompt next direction(引导下一步方向)** - 以问题或建议结束

**Key behaviors:(关键行为:)** - 更新现有部分而不是创建新部分 - 发现使用要点;总结使用散文 - 注明不确定性(“seems like(看起来像)”、“according to X(根据 X)”、“unverified(未证实)”) - 尽可能链接到来源

### 3. Synthesis Checkpoints(综合检查点)

每进行 5-10 次交流,提议: - 撰写一份“Current Understanding(当前理解)”总结 - 删减冗余的发现 - 如果结构笨重则重新组织 - 检查盲点

### 4. Completion(完成)

当研究完成时,更新 `research.md` 中的状态:

- **“Status: Complete(状态:完成)”** — 完成,保留在原处作为参考 - **“Status: Ongoing(状态:进行中)”** — 活跃文档,将随时间更新

**If the research is specifically for building a project:(如果研究专门是为了构建项目:)** - 升级到 `~/specs/<project-name>.md` 作为项目规范 - 或者直接根据发现创建项目 - 更新状态为 **“Status: Graduated → ~/specs/...(状态:已升级至 ~/specs/...)”**

大多数研究仅仅是研究 — 它不需要成为规范。只有当你真的要基于它构建某些东西时才进行升级。

---

## Deep Research Workflow(深度研究工作流)

### 1. Start Deep Research(启动深度研究)

```bash parallel-research create "Your research question" --processor ultra --wait ```

**Processor options:(处理器选项:)** - `lite`, `base`, `core`, `pro`, `ultra`(默认), `ultra2x`, `ultra4x`, `ultra8x` - 添加 `-fast` 后缀以速度优先于深度:`ultra-fast`, `pro-fast` 等。

**Options:(选项:)** - `-w, --wait` — 等待完成并显示结果 - `-p, --processor` — 选择处理器层级 - `-j, --json` — 原始 JSON 输出

### 2. Schedule Auto-Check (OpenClaw)(安排自动检查)

创建任务后,设置一个 cron 作业来检查结果并将其交付回用户。使用 `deleteAfterRun: true` 以便它自动清理。

**⚠️ CRITICAL: Always calculate `atMs` correctly!(关键:务必正确计算 `atMs`!)**

```bash # Get current timestamp in ms and add 15 minutes (900000 ms) date +%s%3N # Current time in epoch ms # Example: 1770087600000 + 900000 = 1770088500000 ```

**Always verify the scheduled time is in the future and has the correct year:(始终验证计划时间在未来并且年份正确:)** ```bash date -d @$((1770088500000/1000)) # Should show a time ~15 min from now, correct year ```

```json { "action": "add", "job": { "name": "Check research: <topic>", "schedule": {"kind": "at", "atMs": <VERIFY: must be current epoch ms + delay>}, "sessionTarget": "isolated", "payload": { "kind": "agentTurn", "message": "Check research task <run_id>. Run: parallel-research result <run_id>. If complete, summarize key findings. If still running, reschedule another check in 10 min.", "deliver": true, "channel": "<source channel, e.g. telegram>", "to": "<source chat/topic, e.g. -1001234567890:topic:123>" }, "deleteAfterRun": true } } ```

**Key points:(要点:)** - 使用带有 `action: "add"` 的 `cron` 工具 - **ALWAYS verify `atMs` is correct(务必验证 `atMs` 正确)** — 运行 `date -d @$((atMs/1000))` 确认年份和时间 - `atMs` 应该大约在现在之后的 10-15 分钟(ultra 处理器)或 5 分钟左右(fast 处理器) - `deleteAfterRun: true` 在成功完成后删除作业 - 交付回请求研究的同一频道/主题 - 如果仍在运行,cron 作业可以创建另一个检查 - `PARALLEL_API_KEY` 可作为环境变量使用 — 无需将其内联

### 3. Manual Check (if needed)(手动检查,如需要)

```bash parallel-research status <run_id> parallel-research result <run_id> ```

### 4. Save to Research Folder(保存到研究文件夹)

创建研究文件夹并保存结果: ``` ~/.openclaw/workspace/research/<topic-slug>/ ├── prompt.md # Original question + run metadata ├── research.md # Full Parallel output ```

**prompt.md(prompt.md)** 应包含: ```markdown # <Topic Title>

> <Original research question>

**Run ID:** <run_id> **Processor:** <processor> **Started:** <date> **Completed:** <date> ```

**research.md** 包含完整的 Parallel 输出以及任何后续说明。

---

## PDF Export(PDF 导出)

使用 `export-pdf` 脚本将研究文档转换为 PDF:

```bash export-pdf ~/.openclaw/workspace/research/<topic-slug>/research.md # Creates: ~/.openclaw/workspace/research/<topic-slug>/research.pdf ```

或者指定自定义输出路径: ```bash export-pdf research.md ~/Desktop/output.pdf ```

**Note:(注意:)** 表格呈现为堆叠行(PyMuPDF 限制)。对于研究文档来说是可以接受的。

---

## Commands(命令)

- **“new research: <topic>”** - 开始交互式研究文档 - **“deep research: <topic>”** - 开始异步深度研究 - **“show doc”** / **“show research”** - 显示当前研究文件 - **“summarize”** - 综合检查点 - **“graduate”** - 将研究推进到下一阶段 - **“archive”** - 标记为完成的参考 - **“export pdf”** - 导出为 PDF - **“check research”** - 检查待处理的深度研究任务状态

---

## Document Principles(文档原则)

- **Atomic findings(原子化发现)** — 每个要点一个见解 - **Link everything(链接所有内容)** — 来源、文档、代码库 - **Capture context(捕获上下文)** — 我们为什么要看这个? - **Note confidence(注明置信度)** — 不确定时使用限定词 - **Date important findings(为重要发现标注日期)** — 特别是对于快速发展的主题

---

## Setup(设置)

请参阅 `SETUP.md` 进行首次安装: - `parallel-research` CLI - PDF 导出工具(pandoc, PyMuPDF)

更多产品