yuque-personal-stale-detector

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Stale 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
yuque-mcp
server:
  • yuque_list_repos
    — List personal knowledge bases
  • yuque_get_repo_toc
    — Get the table of contents with document metadata
  • yuque_get_doc
    — Read document content to check for staleness signals
所有工具均来自
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:
  • title
    — Document title
  • slug
    — Document identifier
  • updated_at
    — Last update timestamp
  • created_at
    — Creation timestamp
针对每个知识库,获取其目录:
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:
CategoryAgeEmoji
🟢 新鲜 (Fresh)< 90 daysRecently updated, likely current
🟡 老化 (Aging)90-180 daysMay need review
🟠 陈旧 (Stale)180-365 daysLikely needs update
🔴 过期 (Expired)> 365 daysHigh 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
undefined
markdown
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-DDX 天[如:包含版本号引用]
2标题YYYY-MM-DDX 天[如:含有时间敏感内容]
#文档标题最后更新已过天数风险说明
1标题YYYY-MM-DDX 天[如:包含版本号引用]
2标题YYYY-MM-DDX 天[如:含有时间敏感内容]

🟠 建议检查(陈旧文档)

🟠 建议检查(陈旧文档)

#文档标题最后更新已过天数
1标题YYYY-MM-DDX 天
2标题YYYY-MM-DDX 天
#文档标题最后更新已过天数
1标题YYYY-MM-DDX 天
2标题YYYY-MM-DDX 天

🟡 可以关注(老化文档)

🟡 可以关注(老化文档)

[列出文档标题和更新时间,简要列表即可]

[列出文档标题和更新时间,简要列表即可]

💡 维护建议

💡 维护建议

  1. 优先处理:[具体建议,如"XX 文档引用了 v2.x 版本,当前已是 v4.x"]
  2. 批量更新:[如"XX 板块的 X 篇文档都超过半年未更新,建议集中审查"]
  3. 考虑归档:[如"XX 文档可能已不再适用,建议归档或标记为历史文档"]
  4. 定期检查:建议每 [月/季度] 运行一次过期检测,保持知识库健康

  1. 优先处理:[具体建议,如"XX 文档引用了 v2.x 版本,当前已是 v4.x"]
  2. 批量更新:[如"XX 板块的 X 篇文档都超过半年未更新,建议集中审查"]
  3. 考虑归档:[如"XX 文档可能已不再适用,建议归档或标记为历史文档"]
  4. 定期检查:建议每 [月/季度] 运行一次过期检测,保持知识库健康

📈 趋势观察

📈 趋势观察

  • 最活跃板块:[哪个板块更新最频繁]
  • 最冷门板块:[哪个板块最久没动过]
  • 更新模式:[如"大部分更新集中在工作日","XX 板块有周期性更新"]
undefined
  • 最活跃板块:[哪个板块更新最频繁]
  • 最冷门板块:[哪个板块最久没动过]
  • 更新模式:[如"大部分更新集中在工作日","XX 板块有周期性更新"]
undefined

Guidelines

使用准则

  • 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
    yuque-group
    plugin
  • 始终使用与用户相同的语言回复(中文或英文)
  • 提供有用的信息,而非引发恐慌——旧文档不一定不好(部分内容是常青的)
  • 区分时效性内容(API文档、流程指南)和常青内容(原则、教程)
  • 提供可落地的建议——不要只列出陈旧文档,还要给出处理建议
  • 深度扫描时,高亮显示具体的过时引用(版本号、日期、已弃用的工具)
  • 本技能仅扫描个人知识库——如需扫描团队知识库,请使用
    yuque-group
    插件中的对应技能

Error Handling

错误处理

SituationAction
yuque_list_repos
returns empty
Ask user for the exact repo name or ID
yuque_get_repo_toc
returns empty
Inform user the knowledge base appears to be empty
yuque_get_doc
fails (404)
Note the document may have been deleted (itself a finding!)
yuque_get_doc
fails (403)
Tell user they may lack permission to access this doc
API timeoutRetry once, then inform user of connectivity issue
All documents are freshCongratulate the user on maintaining a healthy knowledge base!
Knowledge base has >100 docsUse metadata-only analysis (skip deep scan), offer to deep scan specific sections
场景处理方式
yuque_list_repos
返回空结果
询问用户确切的知识库名称或ID
yuque_get_repo_toc
返回空结果
告知用户该知识库看起来是空的
yuque_get_doc
调用失败(404)
注明该文档可能已被删除(这本身也是一项发现!)
yuque_get_doc
调用失败(403)
告知用户他们可能没有权限访问该文档
API超时重试一次,之后告知用户连接存在问题
所有文档都是新鲜的恭喜用户维护了一个健康的知识库!
知识库文档超过100篇仅使用元数据分析(跳过深度扫描),主动提供特定板块的深度扫描服务