📚

文件處理服務

👤 xby ✓ 已認證 📦 v1.0.0 ⭐ 4.3 ⬇️ 167 下載
📚 知識管理 免費 🔑 需 API Key

📖 技能介紹


name: 文件處理服務 description: Atlas Docs MCP伺服器為AI助手提供庫和框架的技術文件,將官方文件處理為適合LLM使用的Markdown版本,適用於Cursor、Cline、Windsurf等MCP相容的LLM客戶端。 version: 1.0.1 slug: atlas-docs displayName: 文件處理服務 summary: Atlas Docs MCP伺服器為AI助手提供庫和框架的技術文件,將官方文件處理為適合LLM使用的Markdown版本,適用於Cursor、Cline、Windsurf等MCP相容的LLM客戶端。 license: MIT


文件處理服務

Atlas Docs MCP伺服器為AI助手提供庫和框架的技術文件,將官方文件處理為適合LLM使用的Markdown版本,適用於Cursor、Cline、Windsurf等MCP相容的LLM客戶端。


⚠️ 強制要求:API 金鑰

此 Skill 必須配置 API 金鑰才能使用。

  • 首次使用時,如果 .env 中沒有 XBY_APIKEY必須使用 AskUserQuestion 工具向用戶詢問 API 金鑰
  • 拿到使用者提供的金鑰後,呼叫 scripts.config.set_api_key(api_key) 儲存,然後繼續處理
  • 獲取 API 金鑰:https://xiaobenyang.com
  • 禁止在缺少 API 金鑰時自行搜尋或編造資料

工作流程(必須遵守)

你(大模型)是路由層,負責理解使用者意圖、選擇工具、提取引數。程式碼只負責呼叫API。

使用者輸入 → 你選擇工具 → 提取該工具需要的引數 → 呼叫 scripts.tools 中的函式 → 返回結果給使用者

步驟

  1. 檢查 API 金鑰:如果 scripts.config.settings.api_key 為空,使用 AskUserQuestion 詢問使用者,拿到後呼叫 scripts.config.set_api_key(key) 儲存
  2. 選擇工具:根據使用者意圖從下方工具列表中選擇對應的工具函式
  3. 提取引數:根據選中的工具,提取該工具需要的引數
  4. 呼叫工具:使用關鍵字引數呼叫 scripts.tools 中的函式,例如 scripts.tools.search_schools(score='520', province='北京', category='綜合')
  5. 返回結果:將工具返回的 raw 資料整理後展示給使用者

工具選擇規則

根據使用者意圖選擇對應的工具函式:

使用者意圖 工具函式
Lists all available documentation libraries and frameworks. Use this as your first step to discover available documentation sets. Returns name, description and source url for each documentation set. Required before using other documentation tools since you need the docName. scripts.tools.list_docs
Searches a documentation set for specific content. Use this to find pages containing particular keywords, concepts, or topics. Returns matching pages ranked by relevance with their paths and descriptions. Follow up with get_docs_page to get full content. scripts.tools.search_docs
Retrieves a condensed, LLM-friendly index of the pages in a documentation set. Use this for initial exploration to understand what's covered and identify relevant pages. Returns a markdown page with a list of available pages. Follow up with get_docs_page to get full content. scripts.tools.get_docs_index
Retrieves a specific documentation page's content using its relative path. Use this to get detailed information about a known topic, after identifying the relevant page through get_docs_index or search_docs. Returns the complete content of a single documentation page. scripts.tools.get_docs_page
Retrieves the complete documentation content in a single consolidated file. Use this when you need comprehensive knowledge or need to analyze the full documentation context. Returns a large volume of text - consider using get_docs_page or search_docs for targeted information. scripts.tools.get_docs_full

如果引數不完整,使用 AskUserQuestion 向用戶詢問缺失的引數。


工具函式說明


scripts.tools.list_docs

工具描述:Lists all available documentation libraries and frameworks. Use this as your first step to discover available documentation sets. Returns name, description and source url for each documentation set. Required before using other documentation tools since you need the docName.

引數定義

引數名稱 引數型別 是否必填 預設值 描述

scripts.tools.search_docs

工具描述:Searches a documentation set for specific content. Use this to find pages containing particular keywords, concepts, or topics. Returns matching pages ranked by relevance with their paths and descriptions. Follow up with get_docs_page to get full content.

引數定義

引數名稱 引數型別 是否必填 預設值 描述
docName string true Name of the documentation set
query string true Search query to find relevant pages within the documentation set

scripts.tools.get_docs_index

工具描述:Retrieves a condensed, LLM-friendly index of the pages in a documentation set. Use this for initial exploration to understand what's covered and identify relevant pages. Returns a markdown page with a list of available pages. Follow up with get_docs_page to get full content.

引數定義

引數名稱 引數型別 是否必填 預設值 描述
docName string true Name of the documentation set

scripts.tools.get_docs_page

工具描述:Retrieves a specific documentation page's content using its relative path. Use this to get detailed information about a known topic, after identifying the relevant page through get_docs_index or search_docs. Returns the complete content of a single documentation page.

引數定義

引數名稱 引數型別 是否必填 預設值 描述
docName string true Name of the documentation set
pagePath string true The root-relative path of the specific documentation page (e.g., '/guides/getting-started', '/api/authentication')

scripts.tools.get_docs_full

工具描述:Retrieves the complete documentation content in a single consolidated file. Use this when you need comprehensive knowledge or need to analyze the full documentation context. Returns a large volume of text - consider using get_docs_page or search_docs for targeted information.

引數定義

7w4.net收錄了海量優質技能外掛。

引數名稱 引數型別 是否必填 預設值 描述
docName string true Name of the documentation set


返回值處理

工具函式返回 dict 物件: - result["raw"] - API 原始返回資料(JSON),直接將此資料整理後展示給使用者 - result["success"] - 是否成功(True/False) - result["message"] - 狀態訊息


專案結構

./
├── scripts/
│   ├── __init__.py
│   ├── config.py       # 配置管理 + set_api_key()
│   ├── call_api.py      # API 客戶端 + call_api()
│   └── tools.py         # 工具函式(直接呼叫)
├── requirements.txt
└── SKILL.md

注意事項

  1. API 金鑰是必需的,無金鑰時必須通過 AskUserQuestion 詢問使用者
  2. 禁止在缺少 API 金鑰時自行搜尋或編造資料

🤖 AI 評測

這個Skill提供文件查詢功能,整體結構比較清晰,但存在明顯的硬編碼問題——程式碼中直接寫死了API ID,與配置檔案中的值不一致,可能導致呼叫失敗。此外,配置檔案裡的註釋還寫著"高考"相關內容,與實際功能"文件處理服務"不匹配,說明開發時可能沒有仔細檢查。基礎功能是有的,但質量問題會影響實際使用效果。

📊 多維度評分

適應性4.2
規範性3.8
有效性4.2
可靠性4.5
可信度5

📁 包含檔案 (6 個)

📄 SKILL.md 7 KB
📄 requirements.txt 78 B
📄 scripts/__init__.py 0 B
📄 scripts/call_api.py 3.4 KB
📄 scripts/config.py 2.6 KB
📄 scripts/tools.py 3.1 KB