关于 docs-search
AI Maestro 套件中的文档搜索技能,可检索代码库已索引的自动生成文档,帮助开发者在实现前核对 API、定义和代码模式。
主要功能
- 01语义搜索文档
- 02精确关键词匹配
- 03按类型查找文档
- 04获取完整文档内容
- 05索引全部或变更文件
适用场景
- 01编码前核对函数签名
- 02查找类或接口文档
- 03查询 API 和代码注释模式
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ davila7/ claude-code-templates --skill docs-search安装后在 Claude Code 中输入/docs-search确认已加载。
详细介绍
AI Maestro 文档搜索
搜索代码库自动生成的文档,查找函数签名、类定义、API 文档和代码注释。编写代码前,先确认正确的模式。属于 AI Maestro 套件。
先决条件
需要在本地运行 AI Maestro,并已为文档建立索引。
# Install doc tools
git clone https://github.com/23blocks-OS/ai-maestro-plugins.git
cd ai-maestro-plugins && ./install-doc-tools.sh
核心行为
在实现任何代码更改之前,先搜索文档:
Receive instruction -> Search docs -> Then implement
命令
搜索
| 命令 | 描述 |
|---|---|
docs-search.sh <query> | 语义文档搜索 |
docs-search.sh --keyword <term> | 精确关键词匹配 |
docs-find-by-type.sh <type> | 按类型查找(函数、类、模块) |
docs-get.sh <doc-id> | 获取完整文档内容 |
索引
| 命令 | 描述 |
|---|---|
docs-index.sh [path] | 从项目创建完整索引 |
docs-index-delta.sh [path] | 增量索引(仅包含新增或修改的文件) |
docs-list.sh | 列出所有已索引的文档 |
docs-stats.sh | 索引统计信息 |
文档类型
| 类型 | 来源 |
|---|---|
function | JSDoc、RDoc、文档字符串 |
class | 类级注释 |
module | 模块/命名空间注释 |
interface | TypeScript 接口 |
component | React/Vue 组件注释 |
readme | README 文件 |
guide | docs/ 文件夹内容 |
使用示例
# Semantic search
docs-search.sh "authentication flow"
# Keyword search for specific identifier
docs-search.sh --keyword "UserController"
# Find all class documentation
docs-find-by-type.sh class
# Get full document details
docs-get.sh doc-abc123
# Index your codebase (first time)
docs-index.sh /path/to/project
# Update index after changes
docs-index-delta.sh
完整的 AI Maestro 体验
此技能属于 AI Maestro 平台,该平台为 AI Agent 编排提供 6 项技能:消息传递、记忆、文档、图谱、规划和 Agent 管理。
评论
支持 Markdown