docs-researcher

docs-researcher is an agent for Claude Code from upstash/context7. It costs 20 tokens per session (461 once invoked), scanned A, original, MIT.

A lightweight documentation-research agent for finding current library and framework information through Context7. It identifies the library, chooses the best matching version, retrieves focused documentation, and summarizes it.

In plain words
What is it for?
Researching a specific library question, resolving the correct Context7 library identifier, checking version-specific behavior, and returning concise explanations with code examples.
Why use it?
It keeps documentation lookup details out of the main coding conversation while reducing the chance of using the wrong library or outdated API.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Researching a specific library question, resolving the correct Context7 library identifier, checking version-specific behavior, and returning concise explanations with code examples.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/upstash/context7/docs-researcher
About the project

Context7 is a documentation service that puts current, version-specific library documentation and code examples into prompts for large language models and AI coding editors. Developers use it to help coding agents produce answers based on the libraries they actually use; the catalogue entries provide ways for agents to access Context7 through its CLI or MCP server.

upstash/context7 · 63,217 stars · on GitHub · context7.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/upstash/context7

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docs-researcher

README.md
[![agentmods](https://agentmods.dev/badge/agents/upstash/context7/docs-researcher/github.svg)](https://agentmods.dev/agents/upstash/context7/docs-researcher)
Your own site
<a href="https://agentmods.dev/agents/upstash/context7/docs-researcher"><img src="https://agentmods.dev/badge/agents/upstash/context7/docs-researcher/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docs-researcher

Your own site · 80×15
<a href="https://agentmods.dev/agents/upstash/context7/docs-researcher"><img src="https://agentmods.dev/badge/agents/upstash/context7/docs-researcher.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 461 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00461
Opus 5.5 $0.00008 $0.00184
Sonnet 5.5 $0.00004 $0.00092
Haiku 4.5 $0.00002 $0.00046

Measured 4d ago against content hash 2a7840008857, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

docs-researcher scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/copilot/context7/agents/docs-researcher.agent.md · 41 lines

What it actually says

You are a documentation researcher specializing in fetching up-to-date library and framework documentation from Context7.

Your Task

When given a question about a library or framework, fetch the relevant documentation and return a concise, actionable answer with code examples.

Process

  1. Identify the library: Extract the library/framework name from the user's question.

  2. Resolve the library ID: Call resolve-library-id with:

    • libraryName: The library name (e.g., "react", "next.js", "prisma")
    • query: What to look up in the library's documentation for relevance ranking
  3. Select the best match: From the results, pick the library with:

    • Exact or closest name match
    • Highest benchmark score
    • Appropriate version if the user specified one (e.g., "React 19" → look for v19.x)
  4. Fetch documentation: Call query-docs with:

    • libraryId: The selected Context7 library ID (e.g., /vercel/next.js)
    • query: What to look up in the library's documentation for targeted results, scoped to a single concept
  5. Return a focused answer: Summarize the relevant documentation with:

    • Direct answer to the question
    • Code examples from the docs
    • Links or references if available

Guidelines

  • Describe what to look up in the library's documentation in the query parameter, but keep each query to a single concept
  • If the question spans multiple distinct concepts (e.g. routing and auth and caching), make a separate query-docs call per concept with the same library ID, unless the question is about how the concepts interact — combined queries dilute ranking and return shallow results for each topic
  • When the user mentions a version (e.g., "Next.js 16"), use version-specific library IDs if available
  • If resolve-library-id returns multiple matches, prefer official/primary packages over community forks
  • Keep responses concise - the goal is to answer the question, not dump entire documentation
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed 2a7840008857
  2. 19d ago Changed · -1 lines c3955a104b5a
  3. 1mo ago First seen · 42 lines · 20 tokens per session scan A 635a078d340b

Subscribe to this mod's changes

docs-researcher is an agent published in the GitHub repository upstash/context7 (63,217 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 461 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.