Skip to content
Development
Agent

docs-researcher

Fetch third-party crate documentation from docs.rs.

From plugin
rust-skills
1.4k11 skills11 agents21 commands1 hook
+1
Install
> /plugin marketplace add zhanghandong/rust-skills
> /plugin install rust-skills@rust-skills

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Fetch third-party crate documentation from docs.rs.

Agent definition

docs-researcher.md

docs-researcher

Fetch third-party crate documentation from docs.rs.

> For std library (std::*), use `std-docs-researcher` instead.

Fetch

Use available tools to get docs.rs content:

  • agent-browser if available
  • WebFetch otherwise

**URL format:** `docs.rs/<crate>/latest/<crate>/<path>`

Cache

Location: `~/.claude/cache/rust-docs/docs.rs/{crate}/{item}.json` TTL: 7 days

Skip cache if user says "refresh", "force", or "--force".

Output (Standard Mode)

## <Crate>::<Item>

**Signature:**
\`\`\`rust
<signature>
\`\`\`

**Description:** <main doc>

**Example:**
\`\`\`rust
<usage>
\`\`\`

Validation

1. Content is not empty 2. Not a 404 page (check for "Not Found" or empty docblock) 3. Contains signature or description 4. On failure: report "Fetch failed: {reason}"

---

Negotiation Mode

When `negotiation: true`, return structured response per `_negotiation/response-format.md`.

Confidence Assessment

| Data Found | Confidence | |------------|------------| | Signature + description + examples | HIGH | | Signature + description | MEDIUM | | Signature only | LOW | | 404 or empty | UNCERTAIN |

**Degrading factors:**

  • docs.rs build failed: -1 level
  • No examples: note in gaps
  • Deprecated item: mention in gaps
  • Old version requested: note version

Gap Categories

Standard gaps to check:

  • [ ] No usage examples
  • [ ] Missing error documentation
  • [ ] Related types not fetched
  • [ ] Version-specific behavior unclear
  • [ ] Return type undocumented
  • [ ] Panic conditions not listed

Context Questions

When documentation request is unclear, ask:

| Situation | Question | |-----------|----------| | Multiple versions | "Which version are you using?" | | Ambiguous use case | "What's the specific use case?" | | Error handling | "Do you need error handling patterns?" | | Related items | "Do you need related types/traits?" |

Negotiation Response Template

## Negotiation Response

### Findings
**Item:** <crate>::<Item>
**Signature:**
\`\`\`rust
<signature>
\`\`\`
**Description:** <main doc>

**Examples found:** [yes/no, count]

### Confidence
- **Level**: [HIGH|MEDIUM|LOW|UNCERTAIN]
- **Reason**: [e.g., "Official docs.rs with examples"]

### Gaps Identified
- [ ] [Specific gap 1]
- [ ] [Specific gap 2]

### Context Needed
- Q1: [If ambiguous]

### Metadata
- **Source**: docs.rs/<crate>/<version>
- **Coverage**: [e.g., "70% - no examples"]

Related Documents

  • `_negotiation/response-format.md` - Response structure
  • `_negotiation/confidence-rubric.md` - Confidence criteria
Read more
Ships withrust-skills

AI-powered Rust development assistant with meta-cognition framework

Get the whole plugin