Translate skill docs (article-deep-summary, llm-summary-review, keyword-cleanup-review) from English to Chinese

This commit is contained in:
wdm
2026-03-30 23:14:22 +08:00
parent 5b8df317ef
commit ca86705646
3 changed files with 158 additions and 158 deletions
+60 -60
View File
@@ -1,33 +1,33 @@
---
name: article-deep-summary
description: Generate a deep structured knowledge note from a single extracted article. Use when the user wants to deeply summarize, distill, or create a knowledge note from an article's full plain_text content stored in an *.extracted.json file.
description: 从单篇提取的文章中生成深度结构化知识笔记。当用户需要对存储在 *.extracted.json 文件中的文章 plain_text 内容进行深度摘要、提炼或创建知识笔记时使用。
---
# Article Deep Summary
# 文章深度摘要
Use this skill when the user has an extracted article file and wants to generate a deep knowledge note — not a brief summary card, but a structured distillation with core conclusion, arguments, methods, details, and reusable insights.
当用户拥有已提取的文章文件并希望生成深度知识笔记时使用此技能——不是简短的摘要卡片,而是包含核心结论、论点、方法、细节和可复用洞见的结构化提炼。
This skill is **not** for validating or repairing existing summaries (use `llm-summary-review` for that), nor for keyword index cleanup (use `keyword-cleanup-review` for that).
此技能**不适用于**验证或修复已有摘要(请使用 `llm-summary-review`),也不适用于关键词索引清理(请使用 `keyword-cleanup-review`)。
## What This Skill Does
## 功能说明
- Reads an extracted article JSON containing `plain_text`
- Calls the LLM with the dedicated article-summary prompt
- Validates the LLM output against the `ArticleSummaryResult` schema
- Renders a structured Markdown knowledge note in Chinese
- 读取包含 `plain_text` 的已提取文章 JSON 文件
- 使用专用的文章摘要提示词调用 LLM
- 根据 `ArticleSummaryResult` 模式验证 LLM 输出
- 渲染结构化的中文 Markdown 知识笔记
## Inputs
## 输入
Typical files:
典型文件:
- Extracted article JSON: `outputs/freshrss/rerun/<run_id>/extracted/item-XX.extracted.json` (single-item) or a batch file with a `results` array
- Prompt template: `outputs/prompts/article-summary-prompt.txt`
- 已提取的文章 JSON:`outputs/freshrss/rerun/<run_id>/extracted/item-XX.extracted.json`(单篇)或包含 `results` 数组的批量文件
- 提示词模板:`outputs/prompts/article-summary-prompt.txt`
## Workflow
## 工作流程
1. Identify the target extracted file and the item IDs to summarize.
1. 确定目标提取文件和需要摘要的条目 ID。
2. Run the article-summary workflow via CLI:
2. 通过 CLI 运行文章摘要工作流:
```bash
python -m summary_mcp.workflows.article_summary \
@@ -36,47 +36,47 @@ python -m summary_mcp.workflows.article_summary \
--output-dir <output_dir>
```
Or call the MCP tool `generate_article_summaries` with:
或调用 MCP 工具 `generate_article_summaries`,参数如下:
- `extracted_path`: path to the extracted JSON file
- `selected_ids`: array of item ID strings (pass empty array to summarize all)
- `output_dir`: (optional) directory for Markdown output
- `extracted_path`:已提取的 JSON 文件路径
- `selected_ids`:条目 ID 字符串数组(传入空数组可摘要全部条目)
- `output_dir`:(可选)Markdown 输出目录
3. The workflow internally:
- Resolves LLM settings (`ARTICLE_SUMMARY_*` env vars, falling back to `LLM_*`)
- Calls `run_loop_payload` with the article-summary prompt and validator
- Retries up to 2 times on validation failure
3. 工作流内部流程:
- 解析 LLM 配置(`ARTICLE_SUMMARY_*` 环境变量,未设置时回退到 `LLM_*`)
- 使用文章摘要提示词和验证器调用 `run_loop_payload`
- 验证失败时最多重试 2 次
4. Check the output Markdown files in the specified output directory.
4. 在指定的输出目录中检查生成的 Markdown 文件。
## Output Schema
## 输出模式
The LLM returns a JSON matching `ArticleSummaryResult`:
LLM 返回匹配 `ArticleSummaryResult` 的 JSON:
| Field | Type | Description |
| 字段 | 类型 | 说明 |
|---|---|---|
| `title` | string | Article title |
| `url` | HttpUrl | Article URL |
| `core_conclusion` | string | Author's core conclusion, 1-2 sentences |
| `main_argument` | string | Main argument or thesis, can be multi-sentence |
| `key_methods` | string[] | Key methods, mechanisms, or techniques |
| `important_details` | string[] | Noteworthy details, data points, or cases |
| `reusable_insights` | string[] | Reusable insights transferable to other contexts |
| `keywords` | string[] | Specific entities — tool names, frameworks, methods |
| `topics` | string[] | Higher-level topic labels |
| `category` | enum | One of: `资讯` `方法论` `工具实践` `观点评论` |
| `worth_keeping` | bool | Whether the article is worth long-term retention |
| `reason` | string | One-sentence justification for retention |
| `title` | string | 文章标题 |
| `url` | HttpUrl | 文章 URL |
| `core_conclusion` | string | 作者核心结论,1-2 句话 |
| `main_argument` | string | 主要论点或论题,可为多句 |
| `key_methods` | string[] | 关键方法、机制或技术 |
| `important_details` | string[] | 值得注意的细节、数据点或案例 |
| `reusable_insights` | string[] | 可迁移到其他场景的可复用洞见 |
| `keywords` | string[] | 具体实体——工具名称、框架、方法 |
| `topics` | string[] | 更高层次的主题标签 |
| `category` | enum | 取值之一:`资讯` `方法论` `工具实践` `观点评论` |
| `worth_keeping` | bool | 该文章是否值得长期保留 |
| `reason` | string | 一句话说明保留理由 |
Constraints enforced by the validator:
验证器强制约束:
- `keywords` and `topics` must not overlap
- `keywords` focuses on concrete entities; `topics` focuses on abstract themes
- `category` must be one of the four allowed values
- `keywords` 和 `topics` 不得重叠
- `keywords` 聚焦具体实体;`topics` 聚焦抽象主题
- `category` 必须为四个允许值之一
## Markdown Output
## Markdown 输出
Each article produces one `.md` file with sections:
每篇文章生成一个 `.md` 文件,包含以下章节:
- 核心结论
- 主要论点
@@ -86,28 +86,28 @@ Each article produces one `.md` file with sections:
- 关键词
- 主题
## LLM Configuration
## LLM 配置
Dedicated environment variables (fallback to main `LLM_*` if unset):
专用环境变量(未设置时回退到主 `LLM_*` 变量):
- `ARTICLE_SUMMARY_LLM_API_URL`
- `ARTICLE_SUMMARY_LLM_API_KEY`
- `ARTICLE_SUMMARY_LLM_MODEL`
## Repository Implementation
## 代码实现
Relevant code:
相关代码:
- Workflow: `src/summary_mcp/workflows/article_summary.py`
- Validator: `src/summary_mcp/validators/article_summary.py`
- Data model: `src/summary_mcp/models/article_summary_result.py`
- Prompt: `outputs/prompts/article-summary-prompt.txt`
- MCP tool: `generate_article_summaries` in `src/summary_mcp/server.py`
- 工作流:`src/summary_mcp/workflows/article_summary.py`
- 验证器:`src/summary_mcp/validators/article_summary.py`
- 数据模型:`src/summary_mcp/models/article_summary_result.py`
- 提示词:`outputs/prompts/article-summary-prompt.txt`
- MCP 工具:`generate_article_summaries`,位于 `src/summary_mcp/server.py`
## When To Stop
## 何时停止
Stop when one of these is true:
满足以下条件之一时停止:
- Markdown knowledge notes have been generated for all requested items
- The workflow reports repeated validation failures and the user should decide how to proceed
- The user asks to inspect intermediate results manually
- 所有请求条目的 Markdown 知识笔记已生成
- 工作流报告反复验证失败,应由用户决定后续操作
- 用户要求手动检查中间结果