docs: translate all SKILL.md files to English

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jilinchen
2025-12-31 11:48:37 +08:00
co-authored by Claude Opus 4.5
parent 11a51a8d79
commit 92b47e006e
3 changed files with 216 additions and 216 deletions
+92 -92
View File
@@ -1,143 +1,143 @@
--- ---
allowed-tools: Read, Write, Glob, WebSearch, Task, AskUserQuestion allowed-tools: Read, Write, Glob, WebSearch, Task, AskUserQuestion
description: 对目标话题进行初步调研,生成调研outline。用于学术调研、benchmark调研、技术选型等场景。 description: Conduct preliminary research on a topic and generate research outline. For academic research, benchmark research, technology selection, etc.
--- ---
# Research Skill - 初步调研 # Research Skill - Preliminary Research
## 触发方式 ## Trigger
`/research <topic>` `/research <topic>`
## 执行流程 ## Workflow
### Step 1: 模型内部知识生成初步框架 ### Step 1: Generate Initial Framework from Model Knowledge
基于topic,利用模型已有知识生成: Based on topic, use model's existing knowledge to generate:
- 该领域的主要研究对象/items列表 - Main research objects/items list in this domain
- 建议的调研字段框架 - Suggested research field framework
输出{step1_output},使用AskUserQuestion确认: Output {step1_output}, use AskUserQuestion to confirm:
- items列表是否需要增减? - Need to add/remove items?
- 字段框架是否满足需求? - Does field framework meet requirements?
### Step 2: Web Search补充 ### Step 2: Web Search Supplement
使用AskUserQuestion询问时间范围(如:最近6个月、2024年至今、不限)。 Use AskUserQuestion to ask for time range (e.g., last 6 months, since 2024, unlimited).
**参数获取** **Parameter Retrieval**:
- `{topic}`: 用户输入的调研话题 - `{topic}`: User input research topic
- `{YYYY-MM-DD}`: 当前日期 - `{YYYY-MM-DD}`: Current date
- `{step1_output}`: Step 1生成的完整输出内容 - `{step1_output}`: Complete output from Step 1
- `{time_range}`: 用户指定的时间范围 - `{time_range}`: User specified time range
**硬约束**:以下prompt必须严格复述,仅替换{xxx}中的变量,禁止改写结构或措辞。 **Hard Constraint**: The following prompt must be strictly reproduced, only replacing variables in {xxx}, do not modify structure or wording.
启动1个web-search-agent(后台),**Prompt模板** Launch 1 web-search-agent (background), **Prompt Template**:
```python ```python
prompt = f"""## 任务 prompt = f"""## Task
调研话题: {topic} Research topic: {topic}
当前日期: {YYYY-MM-DD} Current date: {YYYY-MM-DD}
基于以下初步框架,补充最新items和推荐调研字段。 Based on the following initial framework, supplement latest items and recommended research fields.
## 已有框架 ## Existing Framework
{step1_output} {step1_output}
## 目标 ## Goals
1. 验证已有items是否遗漏重要对象 1. Verify if existing items are missing important objects
2. 根据遗漏对象进行补充items 2. Supplement items based on missing objects
3. 继续搜索{topic}相关且{time_range}内的items并补充 3. Continue searching for {topic} related items within {time_range} and supplement
4. 补充新fields 4. Supplement new fields
## 输出要求 ## Output Requirements
直接返回结构化结果(不写文件): Return structured results directly (do not write files):
### 补充Items ### Supplementary Items
- item_name: 简要说明(为什么应该加入) - item_name: Brief explanation (why it should be added)
... ...
### 推荐补充字段 ### Recommended Supplementary Fields
- field_name: 字段描述(为什么需要这个维度) - field_name: Field description (why this dimension is needed)
... ...
### 信息来源 ### Sources
- [来源1](url1) - [Source1](url1)
- [来源2](url2) - [Source2](url2)
""" """
``` ```
**One-shot示例**(假设调研AI Coding发展史): **One-shot Example** (assuming researching AI Coding History):
``` ```
## 任务 ## Task
调研话题: AI Coding 发展史 Research topic: AI Coding History
当前日期: 2025-12-30 Current date: 2025-12-30
基于以下初步框架,补充最新items和推荐调研字段。 Based on the following initial framework, supplement latest items and recommended research fields.
## 已有框架 ## Existing Framework
### Items列表 ### Items List
1. GitHub Copilot: Microsoft/GitHub开发,首个主流AI编程助手 1. GitHub Copilot: Developed by Microsoft/GitHub, first mainstream AI coding assistant
2. Cursor: AI-first IDE,基于VSCode 2. Cursor: AI-first IDE, based on VSCode
... ...
### 字段框架 ### Field Framework
- 基本信息: name, release_date, company - Basic Info: name, release_date, company
- 技术特性: underlying_model, context_window - Technical Features: underlying_model, context_window
... ...
## 目标 ## Goals
1. 验证已有items是否遗漏重要对象 1. Verify if existing items are missing important objects
2. 根据遗漏对象进行补充items 2. Supplement items based on missing objects
3. 继续搜索AI Coding 发展史相关且2024年至今内的items并补充 3. Continue searching for AI Coding History related items within since 2024 and supplement
4. 补充新fields 4. Supplement new fields
## 输出要求 ## Output Requirements
直接返回结构化结果(不写文件): Return structured results directly (do not write files):
### 补充Items ### Supplementary Items
- item_name: 简要说明(为什么应该加入) - item_name: Brief explanation (why it should be added)
... ...
### 推荐补充字段 ### Recommended Supplementary Fields
- field_name: 字段描述(为什么需要这个维度) - field_name: Field description (why this dimension is needed)
... ...
### 信息来源 ### Sources
- [来源1](url1) - [Source1](url1)
- [来源2](url2) - [Source2](url2)
``` ```
### Step 3: 询问用户已有字段 ### Step 3: Ask User for Existing Fields
使用AskUserQuestion询问用户是否有已定义的字段文件,如有则读取并合并。 Use AskUserQuestion to ask if user has existing field definition file, if so read and merge.
### Step 4: 生成Outline(分离文件) ### Step 4: Generate Outline (Separate Files)
合并{step1_output}{step2_output}和用户已有字段,生成两个文件: Merge {step1_output}, {step2_output} and user's existing fields, generate two files:
**outline.yaml**items + 配置): **outline.yaml** (items + config):
- topic: 调研主题 - topic: Research topic
- items: 调研对象列表 - items: Research objects list
- execution: - execution:
- batch_size: 并行agent数量(需AskUserQuestion确认) - batch_size: Number of parallel agents (confirm with AskUserQuestion)
- items_per_agent: 每个agent调研项目数(需AskUserQuestion确认) - items_per_agent: Items per agent (confirm with AskUserQuestion)
- output_dir: 结果输出目录(默认./results - output_dir: Results output directory (default: ./results)
**fields.yaml**(字段定义): **fields.yaml** (field definitions):
- 字段分类和定义 - Field categories and definitions
- 每个字段的namedescriptiondetail_level - Each field's name, description, detail_level
- detail_level分层:极简 → 简要 → 详细 - detail_level hierarchy: brief -> moderate -> detailed
- uncertain: 不确定字段列表(保留字段,deep阶段自动填充) - uncertain: Uncertain fields list (reserved field, auto-filled in deep phase)
### Step 5: 输出并确认 ### Step 5: Output and Confirm
- 创建目录: `./{topic_slug}/` - Create directory: `./{topic_slug}/`
- 保存: `outline.yaml` `fields.yaml` - Save: `outline.yaml` and `fields.yaml`
- 展示给用户确认 - Show to user for confirmation
## 输出路径 ## Output Path
``` ```
{当前工作目录}/{topic_slug}/ {current_working_directory}/{topic_slug}/
├── outline.yaml # items列表 + execution配置 ├── outline.yaml # items list + execution config
└── fields.yaml # 字段定义 └── fields.yaml # field definitions
``` ```
## 后续命令 ## Follow-up Commands
- `/research-add-items` - 补充items - `/research-add-items` - Supplement items
- `/research-add-fields` - 补充字段 - `/research-add-fields` - Supplement fields
- `/research-deep` - 开始深度调研 - `/research-deep` - Start deep research
+64 -64
View File
@@ -1,98 +1,98 @@
--- ---
description: 读取调研outline,为每个item启动独立agent进行深度调研。禁用task output description: Read research outline, launch independent agent for each item for deep research. Disable task output.
allowed-tools: Bash, Read, Write, Glob, WebSearch, Task allowed-tools: Bash, Read, Write, Glob, WebSearch, Task
--- ---
# Research Deep - 深度调研 # Research Deep - Deep Research
## 触发方式 ## Trigger
`/research-deep` `/research-deep`
## 执行流程 ## Workflow
### Step 1: 自动定位Outline ### Step 1: Auto-locate Outline
在当前工作目录查找 `*/outline.yaml` 文件,读取items列表、execution配置(含items_per_agent)。 Find `*/outline.yaml` file in current working directory, read items list, execution config (including items_per_agent).
### Step 2: 断点续传检查 ### Step 2: Resume Check
- 检查output_dir下已完成的JSON文件 - Check completed JSON files in output_dir
- 跳过已完成的items - Skip completed items
### Step 3: 分批执行 ### Step 3: Batch Execution
- batch_size分批(完成一批需要得到用户同意才可进行下一批) - Batch by batch_size (need user approval before next batch)
- 每个agent负责items_per_agent个项目 - Each agent handles items_per_agent items
- 启动web-search-agent(后台并行,禁用task output - Launch web-search-agent (background parallel, disable task output)
**参数获取** **Parameter Retrieval**:
- `{topic}`: outline.yaml中的topic字段 - `{topic}`: topic field from outline.yaml
- `{item_name}`: itemname字段 - `{item_name}`: item's name field
- `{item_related_info}`: item的完整yaml内容(name + category + description等) - `{item_related_info}`: item's complete yaml content (name + category + description etc.)
- `{output_dir}`: outline.yaml中execution.output_dir(默认./results - `{output_dir}`: execution.output_dir from outline.yaml (default: ./results)
- `{fields_path}`: {topic}/fields.yaml的绝对路径 - `{fields_path}`: absolute path to {topic}/fields.yaml
- `{output_path}`: {output_dir}/{item_name}.json的绝对路径 - `{output_path}`: absolute path to {output_dir}/{item_name}.json
**硬约束**:以下prompt必须严格复述,仅替换{xxx}中的变量,禁止改写结构或措辞。 **Hard Constraint**: The following prompt must be strictly reproduced, only replacing variables in {xxx}, do not modify structure or wording.
**Prompt模板** **Prompt Template**:
```python ```python
prompt = f"""## 任务 prompt = f"""## Task
调研 {item_related_info},输出结构化JSON {output_path} Research {item_related_info}, output structured JSON to {output_path}
## 字段定义 ## Field Definitions
读取 {fields_path} 获取所有字段定义 Read {fields_path} to get all field definitions
## 输出要求 ## Output Requirements
1. 按fields.yaml定义的字段输出JSON 1. Output JSON according to fields defined in fields.yaml
2. 不确定的字段值标注[不确定] 2. Mark uncertain field values with [uncertain]
3. JSON末尾添加uncertain数组,列出所有不确定的字段名 3. Add uncertain array at the end of JSON, listing all uncertain field names
4. 所有字段值必须使用中文输出(调研过程可用英文,但最终JSON值为中文) 4. All field values must be in Chinese (research can be in English, but final JSON values in Chinese)
## 输出路径 ## Output Path
{output_path} {output_path}
## 验证 ## Validation
完成JSON输出后,运行验证脚本确保字段完整覆盖: After completing JSON output, run validation script to ensure complete field coverage:
python ~/.claude/commands/research/validate_json.py -f {fields_path} -j {output_path} python ~/.claude/commands/research/validate_json.py -f {fields_path} -j {output_path}
验证通过后才算完成任务。 Task is complete only after validation passes.
""" """
``` ```
**One-shot示例**(假设调研GitHub Copilot): **One-shot Example** (assuming researching GitHub Copilot):
``` ```
## 任务 ## Task
调研 name: GitHub Copilot Research name: GitHub Copilot
category: 国际产品 category: International Product
description: Microsoft/GitHub开发,首个主流AI编程助手,市场份额约40%,输出结构化JSON /home/weizhena/AIcoding/aicoding-history/results/GitHub_Copilot.json description: Developed by Microsoft/GitHub, first mainstream AI coding assistant, ~40% market share, output structured JSON to /home/weizhena/AIcoding/aicoding-history/results/GitHub_Copilot.json
## 字段定义 ## Field Definitions
读取 /home/weizhena/AIcoding/aicoding-history/fields.yaml 获取所有字段定义 Read /home/weizhena/AIcoding/aicoding-history/fields.yaml to get all field definitions
## 输出要求 ## Output Requirements
1. 按fields.yaml定义的字段输出JSON 1. Output JSON according to fields defined in fields.yaml
2. 不确定的字段值标注[不确定] 2. Mark uncertain field values with [uncertain]
3. JSON末尾添加uncertain数组,列出所有不确定的字段名 3. Add uncertain array at the end of JSON, listing all uncertain field names
4. 所有字段值必须使用中文输出(调研过程可用英文,但最终JSON值为中文) 4. All field values must be in Chinese (research can be in English, but final JSON values in Chinese)
## 输出路径 ## Output Path
/home/weizhena/AIcoding/aicoding-history/results/GitHub_Copilot.json /home/weizhena/AIcoding/aicoding-history/results/GitHub_Copilot.json
## 验证 ## Validation
完成JSON输出后,运行验证脚本确保字段完整覆盖: After completing JSON output, run validation script to ensure complete field coverage:
python ~/.claude/commands/research/validate_json.py -f /home/weizhena/AIcoding/aicoding-history/fields.yaml -j /home/weizhena/AIcoding/aicoding-history/results/GitHub_Copilot.json python ~/.claude/commands/research/validate_json.py -f /home/weizhena/AIcoding/aicoding-history/fields.yaml -j /home/weizhena/AIcoding/aicoding-history/results/GitHub_Copilot.json
验证通过后才算完成任务。 Task is complete only after validation passes.
``` ```
### Step 4: 等待与监控 ### Step 4: Wait and Monitor
- 等待当前批次完成 - Wait for current batch to complete
- 启动下一批 - Launch next batch
- 显示进度 - Display progress
### Step 5: 汇总报告 ### Step 5: Summary Report
全部完成后输出: After all complete, output:
- 完成数量 - Completion count
- 失败/不确定标记的items - Failed/uncertain marked items
- 输出目录 - Output directory
## Agent配置 ## Agent Config
- 后台执行: 是 - Background execution: Yes
- Task Output: 禁用(agent完成时有明确输出文件) - Task Output: Disabled (agent has explicit output file when complete)
- 断点续传: 是 - Resume support: Yes
+60 -60
View File
@@ -1,20 +1,20 @@
--- ---
description: 将deep调研结果汇总为markdown报告,覆盖所有字段,跳过不确定值。 description: Summarize deep research results into markdown report, cover all fields, skip uncertain values.
allowed-tools: Read, Write, Glob, Bash allowed-tools: Read, Write, Glob, Bash
--- ---
# Research Report - 汇总报告 # Research Report - Summary Report
## 触发方式 ## Trigger
`/research-report` `/research-report`
## 执行流程 ## Workflow
### Step 1: 定位结果目录 ### Step 1: Locate Results Directory
在当前工作目录查找 `*/outline.yaml`,读取topic和output_dir配置。 Find `*/outline.yaml` in current working directory, read topic and output_dir config.
### Step 2: 扫描可选摘要字段 ### Step 2: Scan Optional Summary Fields
读取所有JSON结果,提取适合在目录中显示的字段(数值型、简短指标),例如: Read all JSON results, extract fields suitable for TOC display (numeric, short metrics), e.g.:
- github_stars - github_stars
- google_scholar_cites - google_scholar_cites
- swe_bench_score - swe_bench_score
@@ -22,70 +22,70 @@ allowed-tools: Read, Write, Glob, Bash
- valuation - valuation
- release_date - release_date
使用AskUserQuestion询问用户: Use AskUserQuestion to ask user:
- 目录中除了item名称外,还需要显示哪些字段? - Which fields to display in TOC besides item name?
- 提供动态选项列表(基于实际JSON中存在的字段) - Provide dynamic options list (based on actual fields in JSON)
### Step 3: 生成Python转换脚本 ### Step 3: Generate Python Conversion Script
`{topic}/` 目录下生成 `generate_report.py`,脚本要求: Generate `generate_report.py` in `{topic}/` directory, script requirements:
- 读取output_dir下所有JSON - Read all JSON from output_dir
- 读取fields.yaml获取字段结构 - Read fields.yaml to get field structure
- 覆盖每个JSON的所有字段值 - Cover all field values from each JSON
- 跳过值包含[不确定]的字段 - Skip fields with values containing [uncertain]
- 跳过uncertain数组中列出的字段 - Skip fields listed in uncertain array
- 生成markdown报告格式:目录(带锚点跳转+用户选择的摘要字段)+ 详细内容(按字段分类) - Generate markdown report format: Table of contents (with anchor links + user-selected summary fields) + Detailed content (by field category)
- 保存到 `{topic}/report.md` - Save to `{topic}/report.md`
**目录格式要求** **TOC Format Requirements**:
- 必须包含每一个item - Must include every item
- 每个item显示:序号、名称(锚点链接)、用户选择的摘要字段 - Each item displays: number, name (anchor link), user-selected summary fields
- 示例:`1. [GitHub Copilot](#github-copilot) - Stars: 10k | Score: 85%` - Example: `1. [GitHub Copilot](#github-copilot) - Stars: 10k | Score: 85%`
#### 脚本技术要点(必须遵循) #### Script Technical Requirements (Must Follow)
**1. JSON结构兼容** **1. JSON Structure Compatibility**
支持两种JSON结构: Support two JSON structures:
- 扁平结构:字段直接在顶层 `{"name": "xxx", "release_date": "xxx"}` - Flat structure: Fields directly at top level `{"name": "xxx", "release_date": "xxx"}`
- 嵌套结构:字段在categorydict `{"basic_info": {"name": "xxx"}, "technical_features": {...}}` - Nested structure: Fields in category sub-dict `{"basic_info": {"name": "xxx"}, "technical_features": {...}}`
字段查找顺序:顶层 -> category映射key -> 遍历所有嵌套dict Field lookup order: Top level -> category mapping key -> Traverse all nested dicts
**2. Category多语言映射** **2. Category Multi-language Mapping**
fields.yamlcategory名与JSONkey可能是任意组合(中中、中英、英中、英英)。必须建立双向映射: fields.yaml category names and JSON keys can be any combination (CN-CN, CN-EN, EN-CN, EN-EN). Must establish bidirectional mapping:
```python ```python
CATEGORY_MAPPING = { CATEGORY_MAPPING = {
"基本信息": ["basic_info", "基本信息"], "Basic Info": ["basic_info", "Basic Info"],
"技术特性": ["technical_features", "technical_characteristics", "技术特性"], "Technical Features": ["technical_features", "technical_characteristics", "Technical Features"],
"性能指标": ["performance_metrics", "performance", "性能指标"], "Performance Metrics": ["performance_metrics", "performance", "Performance Metrics"],
"里程碑意义": ["milestone_significance", "milestones", "里程碑意义"], "Milestone Significance": ["milestone_significance", "milestones", "Milestone Significance"],
"商业信息": ["business_info", "commercial_info", "商业信息"], "Business Info": ["business_info", "commercial_info", "Business Info"],
"竞争与生态": ["competition_ecosystem", "competition", "竞争与生态"], "Competition & Ecosystem": ["competition_ecosystem", "competition", "Competition & Ecosystem"],
"历史沿革": ["history", "历史沿革"], "History": ["history", "History"],
"市场定位": ["market_positioning", "market", "市场定位"], "Market Positioning": ["market_positioning", "market", "Market Positioning"],
} }
``` ```
**3. 复杂值格式化** **3. Complex Value Formatting**
- list of dicts(如key_events, funding_history):每个dict格式化为一行,用` | `分隔kv - list of dicts (e.g., key_events, funding_history): Format each dict as one line, separate kv with ` | `
- 普通list:短列表用逗号连接,长列表换行显示 - Normal list: Short lists joined with comma, long lists displayed with line breaks
- 嵌套dict:递归格式化,用分号或换行显示 - Nested dict: Recursive formatting, display with semicolon or line breaks
- 长文本字符串(超过100字符):添加换行符`<br>`或使用blockquote格式,提高可读性 - Long text strings (over 100 chars): Add line breaks `<br>` or use blockquote format for readability
**4. 额外字段收集** **4. Extra Fields Collection**
收集JSON中有但fields.yaml中没定义的字段,放入"其他信息"分类。注意过滤: Collect fields that exist in JSON but not defined in fields.yaml, put in "Other Info" category. Note to filter:
- 内部字段:`_source_file`, `uncertain` - Internal fields: `_source_file`, `uncertain`
- 嵌套结构顶级key`basic_info`, `technical_features` - Nested structure top-level keys: `basic_info`, `technical_features` etc.
- `uncertain_fields`列表:需要逐行显示每个字段名,不要压缩成一行 - `uncertain_fields` list: Display each field name on separate line, don't compress into one line
**5. 不确定值跳过** **5. Uncertain Value Skipping**
跳过条件: Skip conditions:
- 字段值包含`[不确定]`字符串 - Field value contains `[uncertain]` string
- 字段名在`uncertain`数组中 - Field name is in `uncertain` array
- 字段值为None或空字符串 - Field value is None or empty string
### Step 4: 执行脚本 ### Step 4: Execute Script
运行 `python {topic}/generate_report.py` Run `python {topic}/generate_report.py`
## 输出 ## Output
- `{topic}/generate_report.py` - 转换脚本 - `{topic}/generate_report.py` - Conversion script
- `{topic}/report.md` - 汇总报告 - `{topic}/report.md` - Summary report