mcpField
R
research-outline

research-outline

github.com/julianobarbosa生产力1456 次安装2 天前更新
代码仓库

关于 research-outline

research-outline 是启动主题研究流程的 skill,会拟定研究对象和字段定义,并保存为后续深度研究与报告步骤所用的文件。

主要功能

  1. 01根据模型知识拟定研究对象
  2. 02建议研究字段定义
  3. 03通过研究 Agent 补充近期内容
  4. 04生成 outline.yaml 和 fields.yaml

适用场景

  1. 01启动结构化研究项目
  2. 02定义深度研究所需维度
  3. 03准备生成 Markdown 研究报告的输入

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/julianobarbosa/claude-code-skills --skill research-outline

安装后在 Claude Code 中输入/research-outline确认已加载。

附带文件validate_json.py

详细介绍

研究 — 初步研究

启动一个研究项目。生成 /research-deep 和 /research-report 使用的大纲(条目 + 执行配置)和字段架构(研究维度)。

触发方式

/research-outline <topic>

流程约定

此技能是由四个步骤组成的流程的入口:

/research-outline <topic>          # this skill — produces outline.yaml + fields.yaml
   ├─ /research-add-items     # optional — append more research objects
   ├─ /research-add-fields    # optional — append more research dimensions
   ├─ /research-deep          # fan-out per-item deep research → results/*.json
   └─ /research-report        # summarise results into a markdown report

输出布局:

{current_working_directory}/{topic_slug}/
  ├── outline.yaml    # items list + execution config
  └── fields.yaml     # field definitions

工作流

步骤 1 — 根据模型知识生成初始框架

根据主题,利用模型已有的知识起草:

  • 领域内的主要研究对象(条目)列表
  • 建议的研究字段框架

将草案显示为 {step1_output},然后通过 AskUserQuestion 确认:

  • 是否需要添加或删除条目?
  • 字段框架是否符合他们的学习需求?
步骤 2 — 通过网络搜索补充

通过 AskUserQuestion 询问时间范围(例如,过去 6 个月、从 2024 年至今、不限)。

此时捕获的参数:

  • {topic} — 用户的研究主题
  • {YYYY-MM-DD} — 今天的日期
  • {step1_output} — 步骤 1 的完整输出
  • {time_range} — 用户选择的时间范围

使用 Task 工具启动一个后台研究 Agent,并设置 subagent_type: general-purpose(或者使用项目中已注册的研究子 Agent)。

为何要逐字使用以下提示词模板: 子 Agent 在隔离环境中运行,无法获取对话上下文。因此,提示词必须明确包含所有参数,而细微的措辞变化(“补充”与“添加”)会微妙地改变搜索的积极程度。请将模板视为稳定的约定——替换 {xxx} 变量,其余内容保持原样,以确保不同运行的结果具有可比性。

提示词模板(替换变量,保留结构):

## Task
Research topic: {topic}
Current date: {YYYY-MM-DD}

Based on the following initial framework, supplement latest items and recommended research fields.

## Existing Framework
{step1_output}

## Goals
1. Verify if existing items are missing important objects
2. Supplement items based on missing objects
3. Continue searching for {topic} related items within {time_range} and supplement
4. Supplement new fields

## Output Requirements
Return structured results directly (do not write files):

### Supplementary Items
- item_name: Brief explanation (why it should be added)
...

### Recommended Supplementary Fields
- field_name: Field description (why this dimension is needed)
...

### Sources
- [Source1](url1)
- [Source2](url2)

示例(主题 = “AI Coding History”):

## Task
Research topic: AI Coding History
Current date: 2025-12-30

Based on the following initial framework, supplement latest items and recommended research fields.

## Existing Framework
### Items List
1. GitHub Copilot: Developed by Microsoft/GitHub, first mainstream AI coding assistant
2. Cursor: AI-first IDE, based on VSCode
...

### Field Framework
- Basic Info: name, release_date, company
- Technical Features: underlying_model, context_window
...

## Goals
1. Verify if existing items are missing important objects
2. Supplement items based on missing objects
3. Continue searching for AI Coding History related items within since 2024 and supplement
4. Supplement new fields

## Output Requirements
[as above]
步骤 3 — 询问用户是否有现有字段

通过 AskUserQuestion 询问:是否有现有的字段定义文件需要合并?如果有,使用 Read 读取,并将其合并到字段集合中。

步骤 4 — 生成大纲(两个文件)

合并 {step1_output}、子 Agent 的 {step2_output} 以及用户提供的任何字段。写入两个文件:

outline.yaml — 条目 + 执行配置:

topic: <research topic>
items:
  - name: <item>
    category: <optional>
    description: <optional>
execution:
  batch_size: <parallel agents — confirm with AskUserQuestion>
  items_per_agent: <items per agent — confirm with AskUserQuestion>
  output_dir: ./results   # default

fields.yaml — 字段定义:

field_categories:
  - category: <name>
    fields:
      - name: <field_name>
        description: <what to capture>
        detail_level: brief | moderate | detailed
        required: false   # optional; validator checks required fields are present
uncertain: []   # reserved — auto-filled during /research-deep

detail_level 的取值依次为 brief → moderate → detailed。uncertain 数组由 /research-deep 填充;此处留空。

步骤 5 — 保存并确认
  • 创建 ./{topic_slug}/
  • 保存 outline.yaml 和 fields.yaml
  • 在用户继续之前,向其展示这两个文件以供确认

后续命令

  • /research-add-items — 添加更多研究对象
  • /research-add-fields — 添加更多字段定义
  • /research-deep — 开始并行深度研究
  • /research-report — 汇总结果

注意事项

  • {topic_slug} 通常是主题的 kebab-case 标识(例如,AI Coding History → ai-coding-history)。后续技能会自动查找 */outline.yaml,因此目录名只需符合文件系统要求且保持唯一。
  • 步骤 2 中的子 Agent 提示词模板是一项约定,而不是建议。 /research-deep 和 /research-report 都假定此处生成的架构是稳定的。如果随意改写模板,下游技能可能会收到无法呈现的字段。
  • 深度阶段验证时会检查字段上的 required: true(validate_json.py)——缺少必填字段会导致验证失败。请谨慎使用;标记过多会给报告带来噪声。
  • fields.yaml 中的 uncertain 数组保留给下游使用。 此技能中不要向其中填入任何内容;/research-deep 会针对每个条目填充该数组。

评论

支持 Markdown