docs-researcher
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDocumentation Researcher Skill
Documentation Researcher Skill
Mode 1: Initialize (init
)
init模式1:初始化(init
)
initWhen argument is :
init- Run the initialization script:
bash
undefined
node ${CLAUDE_PLUGIN_ROOT}/scripts/init.js .
2. Check if `CLAUDE.md` exists (at project root):
- If exists: Read it and append the knowledge base section if not already present
- If not exists: Create it with the knowledge base section
**Append/create this section in CLAUDE.md:**
```markdown当参数为时:
init- 运行初始化脚本:
bash
undefined
node ${CLAUDE_PLUGIN_ROOT}/scripts/init.js .
2. 检查项目根目录下是否存在`CLAUDE.md`文件:
- 若存在:读取该文件,若知识库章节尚未存在则追加该章节
- 若不存在:创建该文件并添加知识库章节
**在CLAUDE.md中追加/创建以下章节:**
```markdownKnowledge Base
知识库
This project uses for documentation.
.claude/skills/project-knowledge-base/Before coding unfamiliar patterns:
- Load the skill to see available references
project-knowledge-base - If topic not covered, use
/docs-researcher <technology> <topic> for <context>
Always consult the knowledge base when clarification is needed.
**Example:**User: /docs-researcher init
Actions:
- Bash(node ${CLAUDE_PLUGIN_ROOT}/scripts/init.js .)
- Read CLAUDE.md (if exists, at project root)
- Write updated CLAUDE.md with knowledge base section Response: Report what was created/updated
undefined本项目使用目录存储文档。
.claude/skills/project-knowledge-base/在编写不熟悉的代码模式之前:
- 加载skill以查看可用参考资料
project-knowledge-base - 若主题未被覆盖,使用命令
/docs-researcher <技术> <主题> for <上下文>
需要澄清时请务必查阅知识库。
**示例:**用户:/docs-researcher init
操作:
- Bash(node ${CLAUDE_PLUGIN_ROOT}/scripts/init.js .)
- 读取CLAUDE.md(若存在,位于项目根目录)
- 写入更新后的CLAUDE.md,包含知识库章节 响应:报告已创建/更新的内容
undefinedMode 2: Research
模式2:研究
When argument is a research request (not "init"), invoke the agent.
docs-researcherTask(
subagent_type: "docs-researcher",
description: "Research documentation",
prompt: "{user's research request}"
)Agent will:
- Search the web for documentation
- Fetch and extract relevant content
- Save to
.claude/skills/project-knowledge-base/references/ - Update the SKILL.md index
Example:
User: /docs-researcher TanStack Router beforeLoad for authentication guards
Action: Task(subagent_type: "docs-researcher", prompt: "TanStack Router beforeLoad for authentication guards")
Response: Agent's research results当参数为研究请求(非"init")时,调用 agent。
docs-researcherTask(
subagent_type: "docs-researcher",
description: "Research documentation",
prompt: "{user's research request}"
)Agent将执行以下操作:
- 搜索网络获取文档
- 获取并提取相关内容
- 保存至目录
.claude/skills/project-knowledge-base/references/ - 更新SKILL.md索引
示例:
用户:/docs-researcher TanStack Router beforeLoad for authentication guards
操作:Task(subagent_type: "docs-researcher", prompt: "TanStack Router beforeLoad for authentication guards")
响应:Agent的研究结果