---
name: external-context
description: 调用并行的 document-specialist 代理以进行外部 Web 搜索和文档查找
argument-hint: <搜索查询或主题>
level: 4
---

# External Context Skill

为某个查询获取外部文档、参考资料和上下文。将问题拆解为 2-5 个维度，并并行启动 document-specialist Claude 代理。

## Usage

```
/oh-my-claudecode:external-context <topic or question>
```

### Examples

```
/oh-my-claudecode:external-context What are the best practices for JWT token rotation in Node.js?
/oh-my-claudecode:external-context Compare Prisma vs Drizzle ORM for PostgreSQL
/oh-my-claudecode:external-context Latest React Server Components patterns and conventions
```

## Protocol

### Step 1: Facet Decomposition

给定一个查询，将其拆解为 2-5 个相互独立的搜索维度：

```markdown
## Search Decomposition

**查询：** <original query>

### 维度 1：<facet-name>
- **搜索重点：** 要搜索的内容
- **来源：** 官方文档、GitHub、博客等。

### 维度 2：<facet-name>
...
```

### Step 2: Parallel Agent Invocation

通过 Task 工具并行触发各个独立维度：

```
Task(subagent_type="oh-my-claudecode:document-specialist", model="sonnet", prompt="Search for: <facet 1 description>. Use WebSearch and WebFetch to find official documentation and examples. Cite all sources with URLs.")

Task(subagent_type="oh-my-claudecode:document-specialist", model="sonnet", prompt="Search for: <facet 2 description>. Use WebSearch and WebFetch to find official documentation and examples. Cite all sources with URLs.")
```

最多可并行启动 5 个 document-specialist 代理。

### Step 3: Synthesis Output Format

按以下格式展示综合结果：

```markdown
## 外部上下文：<query>

### 关键发现
1. **<finding>** - 来源：[title](url)
2. **<finding>** - 来源：[title](url)

### 详细结果

#### 维度 1：<name>
<汇总后的发现，附带引用>

#### 维度 2：<name>
<汇总后的发现，附带引用>

### Sources
- [Source 1](url)
- [Source 2](url)
```

## Configuration

- 最多可并行启动 5 个 document-specialist 代理
- 不支持 magic keyword trigger，仅可显式调用
