【转载】【开源】利用claude code agent框架一步一步实现deep research!很强大很简单的skills

本文为转载内容,保留原帖观点与结构;如有侵权请联系我处理。

过去我在linuxdo写了一些agent相关文章:

不少人有反馈,那么我继续写哈! 介绍一个我自己最喜欢的新方法,我认为这个方法才是真正的Agent智能体,我就是用它搞新项目的:

利用claude code 作为agent框架:

利用claude code agent框架一步一步实现deep research!利用好很强大很简单的skills

###下面我一步一步展示怎样搞出来

什么是agent框架?为什么CC可能才是最佳agent框架?

例如下面就是crewAI agent框架的介绍,核心就是这些,思考一下,CC全部都有,而且更强大10倍,所以几个月前我就利用CC搞数据分析,完全很好用:

CC搞数据分析:GitHub – liangdabiao/claude-data-analysis-ultra-main: 让小白都可以一键进行数据分析,搞互联网的,搞电商的,搞各种各样的,那么其实就会用到 互联网的数据分析, 例如互联网会关心 拉新,留存,促活,推荐,转化,A/B test, 用户分析 等等很多有用的数据分析。 命令就是“/do-more”.

CC开发的核心:

subagent, commands, skills 这些就是开发CC智能体的核心,都是写markdown就可以。

简约不简单,非常强大,难以置信,开发它好像搞外星人一样,或者说人造人一样。

下面我一步一步介绍实现deep research,因为deep research就是agent框架第一应用,对比一下各个框架实现这个deep research,就知道哪个框架才是真厉害。

deep-research.md

---
description: 对指定主题执行完整的深度研究流程,从问题细化到最终报告生成
argument-hint: [研究主题或问题]
allowed-tools: Task, WebSearch, WebFetch, mcp__web_reader__webReader, Read, Write, TodoWrite
---

# Deep Research

Execute comprehensive deep research on the given topic using the 7-phase research methodology and Graph of Thoughts framework.

## Topic

$ARGUMENTS

## Research Workflow

This command will execute the following steps:

### Step 1: Question Refinement
Use the **question-refiner** skill to ask clarifying questions and generate a structured research prompt.

### Step 2: Research Planning
Break down the research topic into 3-7 subtopics and create a detailed execution plan.

### Step 3: Multi-Agent Research
Deploy multiple parallel research agents to gather information from different sources:
- Web Research Agents (3-5 agents): Current information, trends, news
- Academic/Technical Agent (1-2 agents): Research papers, technical specifications
- Cross-Reference Agent (1 agent): Fact-checking and verification

命令告诉AI怎样workflow,怎样调用tools,skills。

多个skills commands是命令步骤,而skills是每一个步骤的具体逻辑,例如:Research planning with Graph-of-Thoughts 逻辑。如下,我把deep research的理论和具体细节都写成markdown skill。AI会参考来工作。

name: research-executor

description: 执行完整的 7 阶段深度研究流程。接收结构化研究任务,自动部署多个并行研究智能体,生成带完整引用的综合研究报告。当用户有结构化的研究提示词时使用此技能。


claude-code-deep-research/
├── .claude/
│   ├── skills/                    # Skills definitions
│   │   ├── question-refiner/      # Question refinement skill
│   │   │   ├── skill.json
│   │   │   ├── instructions.md
│   │   │   └── examples.md
│   │   ├── research-executor/     # Main research execution skill
│   │   │   ├── skill.json
│   │   │   ├── instructions.md
│   │   │   └── examples.md
│   │   ├── got-controller/        # Graph of Thoughts controller
│   │   │   ├── skill.json
│   │   │   ├── instructions.md
│   │   │   └── examples.md
│   │   ├── citation-validator/    # Citation validation skill
│   │   │   ├── skill.json
│   │   │   ├── instructions.md
│   │   │   └── examples.md
│   │   └── synthesizer/           # Research synthesis skill
│   │       ├── skill.json
│   │       ├── instructions.md
│   │       └── examples.md
│   └── commands/                  # User-facing commands
│       ├── deep-research/         # Main deep research command
│       ├── refine-question/       # Question refinement command
│       ├── plan-research/         # Research planning command
│       ├── validate-citations/    # Citation validation command
│       └── synthesize-findings/   # Synthesis command

如果你的任务很复杂,那么就需要做多个AI员工,分工合作完成,那就是subagent。我这里不要,因为多个subagent就会带来沟通成本。一个agent就不需要上下文的处理。

运行起来

CC运行起来太简单,就是你自己做的command命令:

这里就是 :

/deep-research Michael Jackson 在中国的流行

就这样就可以全自动化完成工作了,下面展示过程:

AI遇到不清晰,它会问清楚你的需求。 AI自己执行多个并行task任务,每一个任务运行多个tools,这么神奇,我告诉你,你什么都不需要做,这些都是AI自己自由发挥的。 AI自己想上网就上网,它自带了search, fetch 等功能,也自己会用playwright mcp等等上网百度谷歌:

这些都是AI自己搞的,不是我教它的,所以这才是智能,这才是Agent,过去那些框架这么傻,我才不用。

deep research最后成果

看,巨大的报告:

结论

我这里是用deep research 作为例子,其实所有agent开发都可以直接用claude code,例如我做的全自动数据分析也是:

对比那些crewAI, langgraph, dify, autogen,反正我觉得CC才是真的agent。

开源地址:

核心技术要点:


- **Graph of Thoughts (GoT)** Framework - Intelligent research path management with graph-based reasoning

- **7-Phase Deep Research Process** - Structured methodology for quality research

- **Multi-Agent Architecture** - Parallel research agents with specialized roles

- **Citation Validation System** - A-E source quality ratings with chain-of-verification

📌 转载信息
转载时间: 2025/12/26 08:35:49

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注