yuque-personal-stale-detector
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStale Detector — Yuque Knowledge Base Freshness Check
陈旧文档检测器 — 语雀知识库新鲜度检查
Scan your Yuque knowledge bases to detect documents that haven't been updated for a long time and may contain outdated information, helping you maintain a healthy and accurate knowledge base.
扫描您的语雀知识库,检测长期未更新、可能包含过时信息的文档,帮助您维护健康、准确的知识库。
When to Use
适用场景
- User wants to find outdated documents in their knowledge base
- User says "检查一下哪些文档过期了", "find stale docs", "我的知识库有哪些需要更新"
- User wants to do periodic knowledge base maintenance
- User says "帮我做个知识库健康检查", "哪些文档很久没更新了"
- 用户想要查找知识库中的过时文档
- 用户输入「检查一下哪些文档过期了」、「find stale docs」、「我的知识库有哪些需要更新」
- 用户想要定期进行知识库维护
- 用户输入「帮我做个知识库健康检查」、「哪些文档很久没更新了」
Required MCP Tools
所需MCP工具
All tools are from the server:
yuque-mcp- — List personal knowledge bases
yuque_list_repos - — Get the table of contents with document metadata
yuque_get_repo_toc - — Read document content to check for staleness signals
yuque_get_doc
所有工具均来自 服务:
yuque-mcp- — 列出个人知识库
yuque_list_repos - — 获取带有文档元数据的目录
yuque_get_repo_toc - — 读取文档内容以检查陈旧信号
yuque_get_doc
Workflow
工作流程
Step 1: Select Knowledge Base
步骤 1:选择知识库
If the user specifies a repo, use it directly. Otherwise, list available repos:
Tool: yuque_list_repos
Parameters:
type: "user"Let the user pick which repo(s) to scan, or scan all if requested.
如果用户指定了知识库,直接使用。否则列出可用的知识库:
Tool: yuque_list_repos
Parameters:
type: "user"让用户选择要扫描的知识库,若用户要求则扫描全部。
Step 2: Get Document List with Metadata
步骤 2:获取带元数据的文档列表
For each repo, get the table of contents:
Tool: yuque_get_repo_toc
Parameters:
repo_id: "<namespace>"Extract from each document entry:
- — Document title
title - — Document identifier
slug - — Last update timestamp
updated_at - — Creation timestamp
created_at
针对每个知识库,获取其目录:
Tool: yuque_get_repo_toc
Parameters:
repo_id: "<namespace>"从每个文档条目提取:
- — 文档标题
title - — 文档标识符
slug - — 最后更新时间戳
updated_at - — 创建时间戳
created_at
Step 3: Classify Documents by Freshness
步骤 3:按新鲜度对文档分类
Calculate the age of each document (days since last update) and classify:
| Category | Age | Emoji |
|---|---|---|
| 🟢 新鲜 (Fresh) | < 90 days | Recently updated, likely current |
| 🟡 老化 (Aging) | 90-180 days | May need review |
| 🟠 陈旧 (Stale) | 180-365 days | Likely needs update |
| 🔴 过期 (Expired) | > 365 days | High risk of outdated content |
计算每篇文档的存在时长(距离最后更新的天数)并分类:
| 分类 | 时长 | 表情符号 |
|---|---|---|
| 🟢 新鲜 (Fresh) | < 90 天 | 近期更新,内容大概率有效 |
| 🟡 老化 (Aging) | 90-180 天 | 可能需要复核 |
| 🟠 陈旧 (Stale) | 180-365 天 | 大概率需要更新 |
| 🔴 过期 (Expired) | > 365 天 | 内容过时风险极高 |
Step 4: Deep Scan Suspicious Documents (Optional)
步骤 4:深度扫描可疑文档(可选)
For documents classified as 🟠 or 🔴, optionally read their content to check for additional staleness signals:
Tool: yuque_get_doc
Parameters:
repo_id: "<namespace>"
doc_id: "<slug>"Look for:
- Version references — Mentions of specific software versions that may be outdated
- Date references — Hardcoded dates like "2023年计划", "Q1 目标"
- Broken patterns — References to tools, APIs, or processes that may have changed
- Temporal language — "目前", "最近", "即将" that imply time-sensitive content
Limit deep scanning to 5-10 documents to avoid excessive API calls.
对于被归类为 🟠 或 🔴 的文档,可选择读取其内容以检查更多陈旧信号:
Tool: yuque_get_doc
Parameters:
repo_id: "<namespace>"
doc_id: "<slug>"查找以下内容:
- 版本引用 — 提及可能已过时的特定软件版本
- 日期引用 — 硬编码日期,例如「2023年计划」、「Q1 目标」
- 失效模式 — 对可能已变更的工具、API或流程的引用
- 时间相关表述 — 「目前」、「最近」、「即将」等暗示内容具有时效性的表述
将深度扫描限制在5-10篇文档,避免过多API调用。
Step 5: Generate Report
步骤 5:生成报告
markdown
undefinedmarkdown
undefined🔍 知识库健康检查报告
🔍 知识库健康检查报告
📚 扫描范围
📚 扫描范围
- 知识库:「知识库名称」
- 文档总数:X 篇
- 扫描时间:YYYY-MM-DD
- 知识库:「知识库名称」
- 文档总数:X 篇
- 扫描时间:YYYY-MM-DD
📊 整体健康度
📊 整体健康度
| 状态 | 数量 | 占比 |
|---|---|---|
| 🟢 新鲜(<90天) | X 篇 | XX% |
| 🟡 老化(90-180天) | X 篇 | XX% |
| 🟠 陈旧(180-365天) | X 篇 | XX% |
| 🔴 过期(>365天) | X 篇 | XX% |
健康评分:X/10
| 状态 | 数量 | 占比 |
|---|---|---|
| 🟢 新鲜(<90天) | X 篇 | XX% |
| 🟡 老化(90-180天) | X 篇 | XX% |
| 🟠 陈旧(180-365天) | X 篇 | XX% |
| 🔴 过期(>365天) | X 篇 | XX% |
健康评分:X/10
🔴 需要立即关注(过期文档)
🔴 需要立即关注(过期文档)
| # | 文档标题 | 最后更新 | 已过天数 | 风险说明 |
|---|---|---|---|---|
| 1 | 标题 | YYYY-MM-DD | X 天 | [如:包含版本号引用] |
| 2 | 标题 | YYYY-MM-DD | X 天 | [如:含有时间敏感内容] |
| # | 文档标题 | 最后更新 | 已过天数 | 风险说明 |
|---|---|---|---|---|
| 1 | 标题 | YYYY-MM-DD | X 天 | [如:包含版本号引用] |
| 2 | 标题 | YYYY-MM-DD | X 天 | [如:含有时间敏感内容] |
🟠 建议检查(陈旧文档)
🟠 建议检查(陈旧文档)
| # | 文档标题 | 最后更新 | 已过天数 |
|---|---|---|---|
| 1 | 标题 | YYYY-MM-DD | X 天 |
| 2 | 标题 | YYYY-MM-DD | X 天 |
| # | 文档标题 | 最后更新 | 已过天数 |
|---|---|---|---|
| 1 | 标题 | YYYY-MM-DD | X 天 |
| 2 | 标题 | YYYY-MM-DD | X 天 |
🟡 可以关注(老化文档)
🟡 可以关注(老化文档)
[列出文档标题和更新时间,简要列表即可]
[列出文档标题和更新时间,简要列表即可]
💡 维护建议
💡 维护建议
- 优先处理:[具体建议,如"XX 文档引用了 v2.x 版本,当前已是 v4.x"]
- 批量更新:[如"XX 板块的 X 篇文档都超过半年未更新,建议集中审查"]
- 考虑归档:[如"XX 文档可能已不再适用,建议归档或标记为历史文档"]
- 定期检查:建议每 [月/季度] 运行一次过期检测,保持知识库健康
- 优先处理:[具体建议,如"XX 文档引用了 v2.x 版本,当前已是 v4.x"]
- 批量更新:[如"XX 板块的 X 篇文档都超过半年未更新,建议集中审查"]
- 考虑归档:[如"XX 文档可能已不再适用,建议归档或标记为历史文档"]
- 定期检查:建议每 [月/季度] 运行一次过期检测,保持知识库健康
📈 趋势观察
📈 趋势观察
- 最活跃板块:[哪个板块更新最频繁]
- 最冷门板块:[哪个板块最久没动过]
- 更新模式:[如"大部分更新集中在工作日","XX 板块有周期性更新"]
undefined- 最活跃板块:[哪个板块更新最频繁]
- 最冷门板块:[哪个板块最久没动过]
- 更新模式:[如"大部分更新集中在工作日","XX 板块有周期性更新"]
undefinedGuidelines
使用准则
- Always answer in the same language the user used (Chinese or English)
- Be helpful, not alarming — old documents aren't necessarily bad (some content is evergreen)
- Distinguish between time-sensitive content (API docs, process guides) and evergreen content (principles, tutorials)
- Provide actionable suggestions — don't just list stale docs, suggest what to do about them
- When deep scanning, highlight specific outdated references (version numbers, dates, deprecated tools)
- This skill scans personal repos — for team repos, use the corresponding skill in the plugin
yuque-group
- 始终使用与用户相同的语言回复(中文或英文)
- 提供有用的信息,而非引发恐慌——旧文档不一定不好(部分内容是常青的)
- 区分时效性内容(API文档、流程指南)和常青内容(原则、教程)
- 提供可落地的建议——不要只列出陈旧文档,还要给出处理建议
- 深度扫描时,高亮显示具体的过时引用(版本号、日期、已弃用的工具)
- 本技能仅扫描个人知识库——如需扫描团队知识库,请使用 插件中的对应技能
yuque-group
Error Handling
错误处理
| Situation | Action |
|---|---|
| Ask user for the exact repo name or ID |
| Inform user the knowledge base appears to be empty |
| Note the document may have been deleted (itself a finding!) |
| Tell user they may lack permission to access this doc |
| API timeout | Retry once, then inform user of connectivity issue |
| All documents are fresh | Congratulate the user on maintaining a healthy knowledge base! |
| Knowledge base has >100 docs | Use metadata-only analysis (skip deep scan), offer to deep scan specific sections |
| 场景 | 处理方式 |
|---|---|
| 询问用户确切的知识库名称或ID |
| 告知用户该知识库看起来是空的 |
| 注明该文档可能已被删除(这本身也是一项发现!) |
| 告知用户他们可能没有权限访问该文档 |
| API超时 | 重试一次,之后告知用户连接存在问题 |
| 所有文档都是新鲜的 | 恭喜用户维护了一个健康的知识库! |
| 知识库文档超过100篇 | 仅使用元数据分析(跳过深度扫描),主动提供特定板块的深度扫描服务 |