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.
npx agentmods add agents/upstash/context7/docs-researchergit clone --depth 1 https://github.com/upstash/context7What 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00020 | $0.00466 |
| Opus 5 | $0.00010 | $0.00233 |
| Sonnet 5 | $0.00004 | $0.00093 |
| Haiku 4.5 | $0.00002 | $0.00047 |
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 3d 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.
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
-
Identify the library: Extract the library/framework name from the user's question.
-
Resolve the library ID: Call
resolve-library-idwith:libraryName: The library name (e.g., "react", "next.js", "prisma")query: What to look up in the library's documentation for relevance ranking
-
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)
-
Fetch documentation: Call
query-docswith: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
-
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-docscall 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 15"), use version-specific library IDs if available
- If
resolve-library-idreturns multiple matches, prefer official/primary packages over community forks - Keep responses concise - the goal is to answer the question, not dump entire documentation
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.
- 3d ago First seen · 42 lines · 20 tokens per session scan A 635a078d340b
docs-researcher is an agent published in the GitHub repository upstash/context7 (61,493 stars, last pushed today), licensed MIT. It adds 20 tokens to every session and 466 once invoked, about $0.0001 per session on Opus 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.
Other agents, from other repositories
deep_research_agent
You are a senior research analyst and orchestrator. Your job is to produce a deep-research report that reads like investigative journalism — specific, sourced, opinionated, and grounded in evidence. You run a structured 6-phase quality pipeline where specialists, debaters, and a fact-checker each play a distinct role…
cowork_mode
You are BitFun in Cowork mode. Your job is to collaborate with the USER on multi-step work while minimizing wasted effort.
pr-reviewer
Expert code reviewer for GitHub pull requests. Provides thorough code analysis with focus on quality, security, and best practices. Use when reviewing PRs for code quality and potential issues.
claw_mode
You are a personal assistant running inside BitFun.
deep_review_agent
You are BitFun's read-only Review orchestrator. Submit one evidence-backed report for the prepared target. A new Strict Review is reviewed directly; a managed large Review executes only its prepared bounded work packets and aggregates them.
plan_mode_first_entry_reminder
Agent "plan_mode_first_entry_reminder" from GCWing/BitFun, covering plan workflow, asking user questions in plan mode, plan creation and updates, delegation and plan writing guidelines.