Community编程与开发github.com

claude-to-deerflow

通过 DeerFlow AI 代理平台的 HTTP API 与其交互。当用户希望向 DeerFlow 发送消息或问题以进行研究/分析、启动 DeerFlow 对话线程、检查 DeerFlow 状态或健康情况、列出 DeerFlow 中的可用模型/技能/代理、管理 DeerFlow 记忆、向 DeerFlow 线程上传文件,或将复杂的研究任务委托给 DeerFlow 时,使用此技能。当用户提到 deerflow、deer flow 或希望运行 DeerFlow 可以处理的深度研究任务时也请使用。

claude-to-deerflow 是什么?

此技能使 AI 代理能够通过其 HTTP API 与 DeerFlow 平台进行通信。DeerFlow 是一个基于 LangGraph 构建的 AI 代理平台,可协调子代理进行深度研究、代码执行、网页浏览等任务。该技能支持全面的操作,包括发送流式消息、管理对话线程、列出和切换模型/技能/代理、管理记忆状态以及上传文件。它通过两种 API 接口运行:网关 API 用于 REST 端点,LangGraph 兼容 API 用于代理线程和流式运行。该技能提供了详细的 curl 命令和辅助脚本,便于集成。支持四种上下文模式(Flash、Standard、Pro、Ultra),可控制规划深度和子代理使用,使其适用于从快速查询到多步研究任务的广泛应用场景。同时支持文件上传(PDF、PPTX、XLSX、DOCX),自动转换为 Markdown。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/bytedance/deer-flow/tree/main/skills/public/claude-to-deerflow

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

DeerFlow 技能

通过其 HTTP API 与正在运行的 DeerFlow 实例通信。DeerFlow 是一个基于 LangGraph 构建的 AI 代理平台,用于协调子代理进行研究、代码执行、网页浏览等任务。

架构

DeerFlow 在 Nginx 反向代理后面暴露了两个 API 接口:

服务直接端口通过代理用途
网关 API8001$DEERFLOW_GATEWAY_URLREST 端点和嵌入式代理运行时
LangGraph 兼容 API8001$DEERFLOW_LANGGRAPH_URL代理线程、运行、流式传输

环境变量

所有 URL 均可通过环境变量配置。在进行任何请求之前,请先读取这些环境变量。

变量默认值描述
DEERFLOW_URLhttp://localhost:2026统一代理基础 URL
DEERFLOW_GATEWAY_URL${DEERFLOW_URL}网关 API 基础(模型、技能、记忆、上传)
DEERFLOW_LANGGRAPH_URL${DEERFLOW_URL}/api/langgraphLangGraph API 基础(线程、运行)

进行 curl 调用时,请始终像这样解析 URL:

# 从环境变量中解析基础 URL(在任何 API 调用之前先执行此项)
DEERFLOW_URL="${DEERFLOW_URL:-http://localhost:2026}"
DEERFLOW_GATEWAY_URL="${DEERFLOW_GATEWAY_URL:-$DEERFLOW_URL}"
DEERFLOW_LANGGRAPH_URL="${DEERFLOW_LANGGRAPH_URL:-$DEERFLOW_URL/api/langgraph}"

可用操作

1. 健康检查

验证 DeerFlow 是否正在运行:

curl -s "$DEERFLOW_GATEWAY_URL/health"

2. 发送消息(流式传输)

这是主要操作。它创建一个线程并流式传输代理的响应。

步骤 1:创建线程

curl -s -X POST "$DEERFLOW_LANGGRAPH_URL/threads" \
  -H "Content-Type: application/json" \
  -d '{}'

响应:{"thread_id": "<uuid>", ...}

步骤 2:流式运行

curl -s -N -X POST "$DEERFLOW_LANGGRAPH_URL/threads/<thread_id>/runs/stream" \
  -H "Content-Type: application/json" \
  -d '{
    "assistant_id": "lead_agent",
    "input": {
      "messages": [
        {
          "type": "human",
          "content": [{"type": "text", "text": "YOUR MESSAGE HERE"}]
        }
      ]
    },
    "stream_mode": ["values", "messages-tuple"],
    "stream_subgraphs": true,
    "config": {
      "recursion_limit": 1000
    },
    "context": {
      "thinking_enabled": true,
      "is_plan_mode": true,
      "subagent_enabled": true,
      "thread_id": "<thread_id>"
    }
  }'

响应是一个 SSE 流。每个事件的格式如下:

event: <event_type>
data: <json_data>

关键事件类型:

  • metadata — 运行元数据,包括 run_id
  • values — 包含 messages 数组的完整状态快照
  • messages-tuple — 增量消息更新(AI 文本块、工具调用、工具结果)
  • end — 流结束

上下文模式(通过 context 设置):

  • Flash 模式:thinking_enabled: false, is_plan_mode: false, subagent_enabled: false
  • Standard 模式:thinking_enabled: true, is_plan_mode: false, subagent_enabled: false
  • Pro 模式:thinking_enabled: true, is_plan_mode: true, subagent_enabled: false
  • Ultra 模式:thinking_enabled: true, is_plan_mode: true, subagent_enabled: true

3. 继续对话

要发送后续消息,请重复使用步骤 2 中的同一 thread_id,并使用新消息执行另一次运行。

4. 列出模型

curl -s "$DEERFLOW_GATEWAY_URL/api/models"

返回:{"models": [{"name": "...", "provider": "...", ...}, ...]}

5. 列出技能

curl -s "$DEERFLOW_GATEWAY_URL/api/skills"

返回:{"skills": [{"name": "...", "enabled": true, ...}, ...]}

6. 启用/禁用技能

curl -s -X PUT "$DEERFLOW_GATEWAY_URL/api/skills/<skill_name>" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true}'

7. 列出代理

curl -s "$DEERFLOW_GATEWAY_URL/api/agents"

返回:{"agents": [{"name": "...", ...}, ...]}

8. 获取记忆

curl -s "$DEERFLOW_GATEWAY_URL/api/memory"

返回用户上下文、事实和对话历史摘要。

9. 向线程上传文件

curl -s -X POST "$DEERFLOW_GATEWAY_URL/api/threads/<thread_id>/uploads" \
  -F "files=@/path/to/file.pdf"

支持 PDF、PPTX、XLSX、DOCX — 自动转换为 Markdown。

10. 列出已上传的文件

curl -s "$DEERFLOW_GATEWAY_URL/api/threads/<thread_id>/uploads/list"

11. 获取线程历史

curl -s "$DEERFLOW_LANGGRAPH_URL/threads/<thread_id>/history"

12. 列出线程

curl -s -X POST "$DEERFLOW_LANGGRAPH_URL/threads/search" \
  -H "Content-Type: application/json" \
  -d '{"limit": 20, "sort_by": "updated_at", "sort_order": "desc"}'

使用脚本

要发送消息并收集完整响应,请使用辅助脚本:

bash /path/to/skills/claude-to-deerflow/scripts/chat.sh "Your question here"

有关实现,请参阅 scripts/chat.sh。该脚本将:

  1. 检查健康状态
  2. 创建一个线程
  3. 流式传输运行并收集最终的 AI 响应
  4. 打印结果

解析 SSE 输出

流返回 SSE 事件。要从 values 事件中提取最终的 AI 响应:

  • 查找最后一个 event: values 块
  • 解析其 data JSON
  • messages 数组包含所有消息;最后一个 type: "ai" 的消息即为响应
  • 该消息的 content 字段是 AI 的文本回复

错误处理

  • 如果健康检查失败,说明 DeerFlow 未运行。请告知用户需要启动它。
  • 如果流返回错误事件,提取并显示错误消息。
  • 常见问题:端口未打开、服务仍在启动、配置错误。

小贴士

  • 对于快速问题,请使用 Flash 模式(最快,无规划)。
  • 对于研究任务,请使用 Pro 或 Ultra 模式(启用规划和子代理)。
  • 您可以先上传文件,然后在消息中引用它们。
  • 线程 ID 是持久的 — 您可以稍后返回到对话中。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

academic-paper-review

Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints, or scientific publications. Supports comprehensive structured reviews covering methodology assessment, contribution evaluation, literature positioning, and constructive feedback generation. Trigger on queries involving paper URLs, uploaded PDFs, arXiv links, or requests like "review this paper", "analyze this research", "summarize this study", or "write a peer review".

bootstrap

Generate a personalized SOUL.md through a warm, adaptive onboarding conversation. Trigger when the user wants to create, set up, or initialize their AI partner's identity — e.g., "create my SOUL.md", "bootstrap my agent", "set up my AI partner", "define who you are", "let's do onboarding", "personalize this AI", "make you mine", or when a SOUL.md is missing. Also trigger for updates: "update my SOUL.md", "change my AI's personality", "tweak the soul".

bytedance/academic-paper-review

Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints, or scientific publications. Supports comprehensive structured reviews covering methodology assessment, contribution evaluation, literature positioning, and constructive feedback generation. Trigger on queries involving paper URLs, uploaded PDFs, arXiv links, or requests like "review this paper", "analyze this research", "summarize this study", or "write a peer review".

bytedance/chart-visualization

This skill should be used when the user wants to visualize data. It intelligently selects the most suitable chart type from 26 available options, extracts parameters based on detailed specifications, and generates a chart image using a JavaScript script.

bytedance/claude-to-deerflow

Interact with DeerFlow AI agent platform via its HTTP API. Use this skill when the user wants to send messages or questions to DeerFlow for research/analysis, start a DeerFlow conversation thread, check DeerFlow status or health, list available models/skills/agents in DeerFlow, manage DeerFlow memory, upload files to DeerFlow threads, or delegate complex research tasks to DeerFlow. Also use when the user mentions deerflow, deer flow, or wants to run a deep research task that DeerFlow can handle.

bytedance/consulting-analysis

Use this skill when the user requests to generate, create, or write professional research reports including but not limited to market analysis, consumer insights, brand analysis, financial analysis, industry research, competitive intelligence, investment due diligence, or any consulting-grade analytical report. This skill operates in two phases — (1) generating a structured analysis framework with chapter skeleton, data query requirements, and analysis logic, and (2) after data collection by other skills, producing the final consulting-grade report with structured narratives, embedded charts, and strategic insights.

bytedance/data-analysis

Use this skill when the user uploads Excel (.xlsx/.xls) or CSV files and wants to perform data analysis, generate statistics, create summaries, pivot tables, SQL queries, or any form of structured data exploration. Supports multi-sheet Excel workbooks, aggregation, filtering, joins, and exporting results to CSV/JSON/Markdown.

bytedance/deep-research

Use this skill instead of WebSearch for ANY question requiring web research. Trigger on queries like "what is X", "explain X", "compare X and Y", "research X", or before content generation tasks. Provides systematic multi-angle research methodology instead of single superficial searches. Use this proactively when the user's question needs online information.

bytedance/find-skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

bytedance/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

bytedance/github-deep-research

Conduct multi-round deep research on any GitHub Repo. Use when users request comprehensive analysis, timeline reconstruction, competitive analysis, or in-depth investigation of GitHub. Produces structured markdown reports with executive summaries, chronological timelines, metrics analysis, and Mermaid diagrams. Triggers on Github repository URL or open source projects.

bytedance/image-generation

Use this skill when the user requests to generate, create, imagine, or visualize images including characters, scenes, products, or any visual content. Supports structured prompts and reference images for guided generation.

bytedance/podcast-generation

Use this skill when the user requests to generate, create, or produce podcasts from text content. Converts written content into a two-host conversational podcast audio format with natural dialogue.

bytedance/ppt-generation

Use this skill when the user requests to generate, create, or make presentations (PPT/PPTX). Creates visually rich slides by generating images for each slide and composing them into a PowerPoint file.

bytedance/skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

bytedance/surprise-me

Create a delightful, unexpected "wow" experience for the user by dynamically discovering and creatively combining other enabled skills. Triggers when the user says "surprise me" or any request expressing a desire for an unexpected creative showcase. Also triggers when the user is bored, wants inspiration, or asks for "something interesting".

bytedance/vercel-deploy

Deploy applications and websites to Vercel. Use this skill when the user requests deployment actions such as "Deploy my app", "Deploy this to production", "Create a preview deployment", "Deploy and give me the link", or "Push this live". No authentication required - returns preview URL and claimable deployment link.

bytedance/video-generation

Use this skill when the user requests to generate, create, or imagine videos. Supports structured prompts and reference image for guided generation.

bytedance/web-design-guidelines

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

chart-visualization

This skill should be used when the user wants to visualize data. It intelligently selects the most suitable chart type from 26 available options, extracts parameters based on detailed specifications, and generates a chart image using a JavaScript script.

相关技能