yuque-personal-stale-detector
8
总安装量
2
周安装量
#35862
全站排名
安装命令
npx skills add https://github.com/yuque/yuque-plugin --skill yuque-personal-stale-detector
Agent 安装分布
codex
2
claude-code
2
Skill 文档
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 “帮æå个ç¥è¯åºå¥åº·æ£æ¥”, “åªäºææ¡£å¾ä¹ æ²¡æ´æ°äº”
Required MCP Tools
All tools are from the yuque-mcp server:
yuque_list_reposâ List personal knowledge basesyuque_get_repo_tocâ Get the table of contents with document metadatayuque_get_docâ Read document content to check for staleness signals
Workflow
Step 1: Select Knowledge Base
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.
Step 2: Get Document List with Metadata
For each repo, get the table of contents:
Tool: yuque_get_repo_toc
Parameters:
repo_id: "<namespace>"
Extract from each document entry:
titleâ Document titleslugâ Document identifierupdated_atâ Last update timestampcreated_atâ Creation timestamp
Step 3: Classify Documents by Freshness
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 |
Step 4: Deep Scan Suspicious Documents (Optional)
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.
Step 5: Generate Report
## ð ç¥è¯åºå¥åº·æ£æ¥æ¥å
### ð æ«æèå´
- **ç¥è¯åº**ï¼ãç¥è¯åºåç§°ã
- **ææ¡£æ»æ°**ï¼X ç¯
- **æ«ææ¶é´**ï¼YYYY-MM-DD
---
### ð æ´ä½å¥åº·åº¦
| ç¶æ | æ°é | å æ¯ |
|------|------|------|
| ð¢ æ°é²ï¼<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. **ä¼å
å¤ç**ï¼[å
·ä½å»ºè®®ï¼å¦"XX ææ¡£å¼ç¨äº v2.x çæ¬ï¼å½åå·²æ¯ v4.x"]
2. **æ¹éæ´æ°**ï¼[å¦"XX æ¿åç X ç¯ææ¡£é½è¶
è¿åå¹´æªæ´æ°ï¼å»ºè®®éä¸å®¡æ¥"]
3. **èè彿¡£**ï¼[å¦"XX ææ¡£å¯è½å·²ä¸åéç¨ï¼å»ºè®®å½æ¡£ææ 记为åå²ææ¡£"]
4. **å®ææ£æ¥**ï¼å»ºè®®æ¯ [æ/å£åº¦] è¿è¡ä¸æ¬¡è¿ææ£æµï¼ä¿æç¥è¯åºå¥åº·
---
### ð è¶å¿è§å¯
- **ææ´»è·æ¿å**ï¼[åªä¸ªæ¿åæ´æ°æé¢ç¹]
- **æå·é¨æ¿å**ï¼[åªä¸ªæ¿åæä¹
没å¨è¿]
- **æ´æ°æ¨¡å¼**ï¼[å¦"大é¨åæ´æ°éä¸å¨å·¥ä½æ¥"ï¼"XX æ¿åæå¨ææ§æ´æ°"]
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-groupplugin
Error Handling
| Situation | Action |
|---|---|
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 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 |