smart-search
Search personal Yuque knowledge bases with natural-language queries and synthesize answers with source links. Use when the user wants to find information in their own documents; trigger phrases include “搜一下我的文档”, “我的知识库里有没有...”, “搜索我的语雀/知识库”, and “search my Yuque”.
- License 许可
- MIT
- 最近更新
- 2026-10-04
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- smart-search
- license
- MIT
- metadata
- { "author": "yuque", "version": "2.0" }
- description
- Search personal Yuque knowledge bases with natural-language queries and synthesize answers with source links. Use when the user wants to find information in their own documents; trigger phrases include “搜一下我的文档”, “我的知识库里有没有...”, “搜索我的语雀/知识库”, and “search my Yuque”.
- compatibility
- Requires the yuque-mcp MCP server connected with a personal Yuque token
03 SKILL.md 正文
Smart Search — Yuque Personal Knowledge Base Search & Q&A
Search across your personal Yuque knowledge bases using natural language, read relevant documents, and synthesize a clear answer with references.
When to Use
- User asks a question that might be answered by their personal Yuque docs
- User wants to find specific information in their own knowledge base
- User says "搜一下我的文档", "search my Yuque", "我的知识库里有没有..."
Required MCP Tools
All tools are from the yuque-mcp server:
yuque_search— Search documents by keywordyuque_get_doc— Read full document content by slug/id
Workflow
Step 1: Extract Search Keywords
From the user's natural language query, extract 1-3 concise Chinese keywords. Yuque search works best with short, specific terms.
Examples:
- "我的部署流程文档在哪?" → keywords:
部署流程 - "How do I handle error logging?" → keywords:
错误日志or日志处理 - "我之前写的技术评审笔记" → keywords:
技术评审
Step 2: Search Documents
Call yuque_search with the extracted keywords:
Tool: yuque_search
Parameters:
query: "<keywords>"
type: "doc"
If the search returns no results:
- Try alternative keywords (synonyms, broader terms)
- Try splitting compound terms (e.g., "部署流程" → "部署" or "流程")
- If still no results, tell the user honestly: "在你的语雀知识库中未找到相关文档,建议尝试其他关键词或确认文档是否存在。"
Step 3: Filter and Rank Results
From the search results, select the top 3-5 most relevant documents based on:
- Title relevance to the query
- Document update time (prefer recent)
- Repository context (focus on user's personal repos)
Step 4: Read Document Content
For each selected document, fetch the full content:
Tool: yuque_get_doc
Parameters:
repo_id: "<namespace>" # e.g., "username/my-notes" (from search result's book.namespace)
doc_id: "<slug>" # e.g., "api" (from search result's target.slug)
Note: The search result contains nested data. Extract these key fields:
target.slug→ use asdoc_idtarget.book.namespace→ use asrepo_idtarget.title→ document titletarget.updated_at→ last update time
Read up to 3 documents. If the first document fully answers the question, you may skip the rest.
Step 5: Synthesize and Respond
Compose the answer in the following format:
## 回答
[直接回答用户的问题,2-4 句话,简洁明了]
## 关键要点
- **要点 1**:[从文档中提取的关键信息]
- **要点 2**:[从文档中提取的关键信息]
- **要点 3**:[从文档中提取的关键信息]
## 参考文档
1. [文档标题](文档链接) — 来自「知识库名称」,更新于 YYYY-MM-DD
2. [文档标题](文档链接) — 来自「知识库名称」,更新于 YYYY-MM-DD
Guidelines
- Always answer in the same language the user used (Chinese or English)
- Quote specific content from documents when relevant — use
>blockquotes - If documents contain conflicting information, note the discrepancy and mention which doc is more recent
- If the answer is only partially found, say what you found and what's missing
- Never fabricate information not present in the documents
- Include document links so the user can read the full source
- This skill searches the knowledge bases accessible to the configured Yuque token
Error Handling
| Situation | Action |
|---|---|
yuque_search returns empty |
Try alternative keywords, then inform user |
yuque_get_doc fails (404) |
Skip this doc, note it may have been deleted |
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 |
| Too many results | Focus on top 3 by relevance, mention there are more results available |
04 同仓库更多 Skills
style-extract
Analyze Yuque documents to extract vocabulary, sentence, and tone patterns into a reusable writing-style profile. Use when the user wants to understand or reproduce their voice or keep documents consistent; trigger phrases include “分析一下我的写作风格”, “用我的风格写一篇...”, “帮我生成一个风格画像”, “extract my writing style”, and “write like me”.
stale-detector
Scan a Yuque knowledge base for stale or outdated documents and recommend updates or archiving. Use when the user is cleaning up, maintaining, or periodically reviewing a knowledge base; trigger phrases include “帮我检查哪些文档过期了”, “知识库体检”, and “find stale docs”.
smart-summary
Summarize a Yuque document or knowledge base at one-line, key-point, or detailed granularity. Use when the user wants a quick overview of a document or repo; trigger phrases include “帮我总结一下这篇文档”, “这个知识库讲了什么”, and “summarize this doc”.
reading-digest
Extract core insights, golden quotes, and action items from articles, then create structured Yuque reading notes. Use when the user wants key takeaways or a personal reading-notes base; trigger phrases include “帮我做阅读笔记”, “读书笔记”, and “extract key points from this article”.
note-refine
Polish rough Yuque notes into structured, readable documents while preserving their meaning. Use when the user wants to clean up a draft, improve layout, or turn fragments into a document; trigger phrases include “帮我整理一下这篇笔记”, “把这个文档排版优化一下”, and “polish my notes”.
knowledge-connect
Analyze Yuque documents to uncover related topics, complementary notes, and cross-reference opportunities. Use when the user wants connections or a knowledge graph; trigger phrases include “帮我找找文档之间的关联”, “哪些笔记是相关的”, “这篇文档和哪些笔记有关”, “connect my notes”, and “find related documents”.