
Context7 Research
- 5 installs
- 5 repo stars
- Updated August 5, 2026
- bjornmelin/dev-skills
context7-research is a skill that does deep library and API documentation research using the Context7 MCP tools.
About
context7-research performs deep library, dependency, framework, and API documentation research using the Context7 MCP tools. A developer uses it to get up-to-date docs, version-specific API reference, migration guidance, or to verify code against official documentation. It resolves a library ID, queries docs within a strict 3-call budget, and flags gaps as UNVERIFIED.
- Deep library, framework, and API documentation research using Context7 MCP tools only
- Follows resolve-library-id then query-docs with a hard budget of 3 query-docs calls per request
- Labels missing or ambiguous docs as UNVERIFIED and asks for the smallest clarification
Context7 Research by the numbers
- 5 all-time installs (skills.sh)
- Ranked #1,218 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
context7-research capabilities & compatibility
- Capabilities
- context7 research · docs lookup · api reference · code verification
- Works with
- vercel
- Use cases
- research · documentation
What context7-research says it does
Use Context7 as the source of truth for library/framework documentation during implementation, reviews, and debugging.
Use at most **3** `mcp__context7__query-docs` calls per user request.
If docs are missing/ambiguous, label the gap as `UNVERIFIED` and ask for the smallest clarification needed.
npx skills add https://github.com/bjornmelin/dev-skills --skill context7-researchAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 5 |
|---|---|
| repo stars | ★ 5 |
| Last updated | August 5, 2026 |
| Repository | bjornmelin/dev-skills ↗ |
What it does
Research version-specific library and API docs via Context7 to verify code against official sources.
Who is it for?
Getting up-to-date, version-specific library docs and verifying code against official documentation.
Skip if: General web research not backed by official library documentation.
When should I use this skill?
You need up-to-date docs, version-specific API reference, migration guidance, or to verify code against official documentation.
What you get
Doc-backed answers with the Context7 libraryId used and gaps labeled UNVERIFIED.
- doc-backed recommendation
- doc example or snippet
- assumptions/gaps list
By the numbers
- hard limit of 3 query-docs calls per request
- 5-point library-match selection rubric
Files
Context7 Research
Use Context7 as the source of truth for library/framework documentation during implementation, reviews, and debugging.
Workflow (MUST FOLLOW)
1. Extract:
libraryName: product/package/framework name (e.g.,next.js,zod,supabase)objective: what you need to do (e.g., “configure SSR auth”, “migrate v3->v4”, “use hook X”)version: only if the user specifies one or you can infer it from repo context (otherwise default to “latest”).
2. If the user already provided a Context7 library ID in /org/project (or /org/project/version) format, skip resolution. 3. Otherwise call mcp__context7__resolve-library-id with:
libraryName: extracted namequery: the full user objective (not just a keyword)
4. Select the best match using this rubric:
- Exact/closest name match
- Highest source reputation
- Highest snippet coverage (prefer more snippets when reputation is similar)
- Highest benchmark score
- Versions available that match the requested version (if any)
5. Call mcp__context7__query-docs with the selected libraryId and a tight query (see Query Budget). 6. Synthesize an answer:
- Include the
libraryIdused (and version if applicable) - Quote or paraphrase only what’s needed; prefer code examples
- If docs are missing/ambiguous, label the gap as
UNVERIFIEDand ask for the smallest clarification needed.
Query Budget (HARD LIMIT)
Use at most 3 mcp__context7__query-docs calls per user request. Plan the queries up-front:
- Query 1 (overview): “Explain the concept and where it lives in the docs; include minimal example.”
- Query 2 (API details): “Exact function/class/method signatures and usage examples for the user’s task.”
- Query 3 (edge cases): “Pitfalls, errors, version differences, and recommended patterns.”
If you can’t cover everything within 3 calls, ask the user to narrow scope (or pick the highest-impact subquestion).
Output (DEFAULT SHAPE)
- Start with the recommended approach (1–5 bullets).
- Include at least one doc-backed example/snippet when the question is about code.
- End with “Assumptions / Gaps” if anything is uncertain (
UNVERIFIED) or version-dependent.
Resources
- Playbook:
references/playbook.md - Troubleshooting:
references/troubleshooting.md - Design + scoring (maintainers):
references/design-spec.md - Report template:
assets/report-template.md - Generate a new report file:
python3 scripts/new_report.py --out ./context7-research.md --library-name "<name>" --question "<objective>"
Context7 Research Report
Date: {{date}}
Question
{{question}}
Library
- Name: {{libraryName}}
- Context7 ID: {{libraryId}}
Findings
- [ ] Summary of the recommended approach
- [ ] Key API signatures / calls (doc-backed)
- [ ] Code examples
- [ ] Edge cases / pitfalls
Sources
Paste the “Source: …” lines from Context7 outputs that back the findings.
Assumptions / Gaps
- {{gaps}}
context7-research: Design Spec
Goal
Provide a repeatable, high-signal workflow for deep library/framework/API documentation research using only Context7 MCP tools.
Constraints
- Allowed tools:
mcp__context7__resolve-library-id,mcp__context7__query-docs. - Platform call budget: ≤3
query-docscalls per user request. - Prefer primary documentation via Context7 sources; label uncertainty as
UNVERIFIED.
Architecture
Workflow (canonical)
1. Extract libraryName, user objective, and version constraints (if any). 2. Resolve library ID (unless user provided /org/project[/version]). 3. Select best match (name match → reputation → coverage → benchmark → version fit). 4. Spend a 3-query budget (overview → API details → edge cases). 5. Synthesize answer + include libraryId used + assumptions/gaps.
Version selection heuristic
- If user specifies a version, prefer a
libraryIdwith that/versionsuffix (or pick a library result that lists that version). - Otherwise default to “latest” documentation.
- If repo context implies a version (e.g.,
package.json), mention it explicitly and treat as a constraint.
Failure modes to handle explicitly
- No libraries found → refine
libraryNameand objective; try a more general product name; otherwise returnUNVERIFIED. - Multiple similar libraries (framework vs client SDK vs docs site) → pick the most authoritative docs site; ask a minimal clarification only if selection materially changes the answer.
- Docs returned but irrelevant → tighten query to a specific function/class/module; if still irrelevant, state
UNVERIFIED.
Files
SKILL.md: minimal workflow + hard rules.references/playbook.md: selection rubric + query templates + “how to spend the 3 calls”.references/troubleshooting.md: failure handling and recovery.assets/report-template.md: reusable research report skeleton.scripts/new_report.py: fills the report template placeholders into a new file.
Decision framework (must be ≥9.0/10)
Weights: Solution leverage 35% · Application value 30% · Maintenance 25% · Adaptability 10%
Decision: Context7 MCP-only (no Exa/web in skill)
- Leverage 9.8 · Value 9.4 · Maint 9.6 · Adapt 9.0 → 9.55
- Rationale: maximizes authoritative docs while keeping the skill small and consistent; avoids multi-tool complexity.
Decision: Fixed 3-query budget strategy
- Leverage 9.5 · Value 9.2 · Maint 9.4 · Adapt 9.0 → 9.33
- Rationale: matches platform constraints; mitigated by query templates and “narrow scope” fallback.
Decision: Include optional report template + generator script
- Leverage 9.2 · Value 9.1 · Maint 9.2 · Adapt 9.0 → 9.15
- Rationale: improves repeatability and reduces cognitive load; script is local-only, tiny, and low maintenance.
Context7 Research Playbook
Selection rubric (resolve results)
Prefer libraries in this order:
1. Canonical docs site for the library/framework (usually highest snippet coverage) 2. Official repo for the library (often has versions listed) 3. Other sources (only if the above are missing)
Tie-breakers (in order):
- Closest name match to the intended library
- Source reputation (High > Medium > Low)
- Higher snippet coverage
- Higher benchmark score
- Versions that match the requested version (if applicable)
Spend the 3-call budget
Write the three queries before calling query-docs.
Query 1: Overview + where-to-look
Goal: orient quickly and pick the right conceptual entry point.
Template:
- “Explain the concept, the recommended pattern, and where it is documented. Include the smallest working example.”
Query 2: API reference for the user’s objective
Goal: exact signatures, required options, and usage examples.
Template:
- “Show exact signatures and usage examples for {task}. Include TypeScript examples if relevant.”
Query 3: Edge cases + errors + version differences
Goal: avoid footguns and mismatches.
Template:
- “List common pitfalls, errors, and version differences for {task}. Include recommended best practices.”
Query-writing rules
- Use the user’s full objective; avoid single-keyword prompts.
- Ask for one thing per query (concept OR API details OR pitfalls).
- Name specific symbols (functions/classes/hooks) when possible.
- If results are too broad, narrow with: module name, runtime (node/browser), framework layer (server/client), and version.
Output checklist
Include:
- The chosen
libraryId(and version suffix if used) - The key doc-backed recommendation(s)
- At least one code snippet when the task is code-related
- “Assumptions / Gaps” and
UNVERIFIEDfor anything not supported by docs
Troubleshooting
No libraries found
- Try a broader
libraryName(product name instead of package name, or vice versa). - Ensure the
queryincludes the real task (not just a keyword). - If still no results: state
UNVERIFIEDand ask for the official repo/docs URL or the exact package name.
Too many matches / ambiguous results
Common ambiguity patterns:
- Framework docs vs SDK vs integration packages
- Multiple major versions (v1/v2) documented separately
Resolution:
- Prefer the official docs site entry with higher reputation/coverage.
- If the choice changes the answer materially, ask one clarifying question.
Docs returned but irrelevant
- Narrow the query to specific symbols (function/class/method names).
- Add constraints: runtime (node/browser), framework layer (server/client), and version.
- If still irrelevant within budget: report
UNVERIFIEDand ask for a narrower target.
Version mismatch
- If user provided a version, use
/org/project/versionIDs when available. - If repo context implies a version, call it out explicitly and treat it as a constraint.
#!/usr/bin/env python3
import argparse
from datetime import datetime, timezone
from pathlib import Path
def now_iso() -> str:
return datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
def read_template() -> str:
template_path = Path(__file__).resolve().parent.parent / "assets" / "report-template.md"
return template_path.read_text(encoding="utf-8")
def render(template: str, *, library_name: str, library_id: str, question: str, gaps: str) -> str:
return (
template.replace("{{date}}", now_iso())
.replace("{{libraryName}}", library_name)
.replace("{{libraryId}}", library_id)
.replace("{{question}}", question)
.replace("{{gaps}}", gaps)
)
def main() -> int:
parser = argparse.ArgumentParser(description="Generate a Context7 research report skeleton.")
parser.add_argument("--out", required=True, help="Output markdown file path")
parser.add_argument("--library-name", required=True, help="Library name (human-readable)")
parser.add_argument("--library-id", default="UNRESOLVED", help="Context7 library ID (/org/project[/version])")
parser.add_argument("--question", required=True, help="The research question/objective")
parser.add_argument("--gaps", default="UNVERIFIED: not researched yet", help="Initial gaps/assumptions")
args = parser.parse_args()
out_path = Path(args.out)
out_path.parent.mkdir(parents=True, exist_ok=True)
content = render(
read_template(),
library_name=args.library_name,
library_id=args.library_id,
question=args.question,
gaps=args.gaps,
)
out_path.write_text(content, encoding="utf-8")
return 0
if __name__ == "__main__":
raise SystemExit(main())
Related skills
FAQ
How many doc queries does it allow?
A hard limit of 3 mcp__context7__query-docs calls per user request, planned up front.
What if docs are missing?
It labels the gap as UNVERIFIED and asks for the smallest clarification needed.