chore: import zh skill research-report
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# WeHub 来源说明
|
||||
|
||||
- Skill 名称:`research-report`
|
||||
- 中文类目:调研报告汇总
|
||||
- 上游仓库:`Weizhena__Deep-Research-skills`
|
||||
- 上游路径:`skills/research-en/research-report/SKILL.md`
|
||||
- 上游链接:https://github.com/Weizhena/Deep-Research-skills/blob/HEAD/skills/research-en/research-report/SKILL.md
|
||||
- 本仓库为 WeHub 中文 Skill 汉化包,基于 skill 市场筛选 Top200 清单整理
|
||||
- 原作者、版权和许可证信息以上游仓库为准
|
||||
@@ -0,0 +1,93 @@
|
||||
---
|
||||
name: research-report
|
||||
user-invocable: true
|
||||
description: 将深度研究结果总结为 Markdown 报告,涵盖所有字段,跳过不确定的值。
|
||||
allowed-tools: Read, Write, Glob, Bash, AskUserQuestion
|
||||
---
|
||||
|
||||
# 研究报告 - 总结报告
|
||||
|
||||
## 触发指令
|
||||
`/research-report`
|
||||
|
||||
## 工作流程
|
||||
|
||||
### 第 1 步:定位结果目录
|
||||
在当前工作目录下查找 `*/outline.yaml`,读取 topic 和 output_dir 配置。
|
||||
|
||||
### 第 2 步:扫描可选摘要字段
|
||||
读取所有 JSON 结果,提取适合在目录中展示的字段(数值型、简短指标),例如:
|
||||
- github_stars
|
||||
- google_scholar_cites
|
||||
- swe_bench_score
|
||||
- user_scale
|
||||
- valuation
|
||||
- release_date
|
||||
|
||||
使用 AskUserQuestion 询问用户:
|
||||
- 除项目名称外,哪些字段需要显示在目录中?
|
||||
- 提供动态选项列表(基于 JSON 中的实际字段)
|
||||
|
||||
### 第 3 步:生成 Python 转换脚本
|
||||
在 `{topic}/` 目录下生成 `generate_report.py`,脚本要求:
|
||||
- 读取 output_dir 中的所有 JSON
|
||||
- 读取 fields.yaml 获取字段结构
|
||||
- 覆盖每个 JSON 中的所有字段值
|
||||
- 跳过值包含 [uncertain] 的字段
|
||||
- 跳过 uncertain 数组中列出的字段
|
||||
- 生成 Markdown 报告格式:目录(含锚点链接 + 用户选择的摘要字段)+ 详细内容(按字段类别分类)
|
||||
- 保存到 `{topic}/report.md`
|
||||
|
||||
**目录格式要求**:
|
||||
- 必须包含每一个条目
|
||||
- 每个条目展示:编号、名称(锚点链接)、用户选择的摘要字段
|
||||
- 示例:`1. [GitHub Copilot](#github-copilot) - Stars: 10k | Score: 85%`
|
||||
|
||||
#### 脚本技术要求(必须遵守)
|
||||
|
||||
**1. JSON 结构兼容性**
|
||||
支持两种 JSON 结构:
|
||||
- 扁平结构:字段直接位于顶层 `{"name": "xxx", "release_date": "xxx"}`
|
||||
- 嵌套结构:字段位于分类子字典中 `{"basic_info": {"name": "xxx"}, "technical_features": {...}}`
|
||||
|
||||
字段查找顺序:顶层 -> 分类映射键 -> 遍历所有嵌套字典
|
||||
|
||||
**2. 分类多语言映射**
|
||||
fields.yaml 的分类名称和 JSON 键名可以是任意组合(中-中、中-英、英-中、英-英)。必须建立双向映射:
|
||||
```python
|
||||
CATEGORY_MAPPING = {
|
||||
"Basic Info": ["basic_info", "Basic Info"],
|
||||
"Technical Features": ["technical_features", "technical_characteristics", "Technical Features"],
|
||||
"Performance Metrics": ["performance_metrics", "performance", "Performance Metrics"],
|
||||
"Milestone Significance": ["milestone_significance", "milestones", "Milestone Significance"],
|
||||
"Business Info": ["business_info", "commercial_info", "Business Info"],
|
||||
"Competition & Ecosystem": ["competition_ecosystem", "competition", "Competition & Ecosystem"],
|
||||
"History": ["history", "History"],
|
||||
"Market Positioning": ["market_positioning", "market", "Market Positioning"],
|
||||
}
|
||||
```
|
||||
|
||||
**3. 复杂值格式化**
|
||||
- 字典列表(如 key_events、funding_history):每个字典格式化为一行,键值对之间用 ` | ` 分隔
|
||||
- 普通列表:短列表用逗号连接,长列表换行展示
|
||||
- 嵌套字典:递归格式化,用分号或换行展示
|
||||
- 长文本字符串(超过 100 个字符):添加换行 `<br>` 或使用引用格式以提升可读性
|
||||
|
||||
**4. 额外字段收集**
|
||||
收集 JSON 中存在但 fields.yaml 中未定义的字段,归入"其他信息"类别。注意过滤:
|
||||
- 内部字段:`_source_file`、`uncertain`
|
||||
- 嵌套结构的顶层键:`basic_info`、`technical_features` 等
|
||||
- `uncertain` 数组:每个字段名单独占一行显示,不要压缩为一行
|
||||
|
||||
**5. 不确定值跳过**
|
||||
跳过条件:
|
||||
- 字段值包含 `[uncertain]` 字符串
|
||||
- 字段名位于 `uncertain` 数组中
|
||||
- 字段值为 None 或空字符串
|
||||
|
||||
### 第 4 步:执行脚本
|
||||
运行 `python {topic}/generate_report.py`
|
||||
|
||||
## 输出
|
||||
- `{topic}/generate_report.py` - 转换脚本
|
||||
- `{topic}/report.md` - 总结报告
|
||||
Reference in New Issue
Block a user