smithery.ai

context7-search

Retrieve real-time technical documentation and code snippets from third-party libraries using the Context7 V2 API.

First seen Apr 9, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,259 B
  • docs SUMMARY.md 137 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Skill: Context7 Documentation Expert

This skill gives you access to the Context7 API to fetch up-to-date documentation, API references, and code examples. Use this to avoid hallucinations about library versions or API signatures.

When to Use

  1. Unknown Libraries: When you need to use a library you are not familiar with.
  2. Version Verification: To check if a specific API exists in the latest version of a library (e.g., Next.js App Router vs Pages Router).
  3. Debugging: To find official solutions for error messages related to external dependencies.

Workflow (Strict Two-Step Process)

Step 1: Search for Library ID

You MUST search first to resolve the correct libraryId required by the API. Do not guess the ID.

  • Command:

./scripts/context7tool.sh search "<libraryname>"

  • Action:

- Parse the JSON response. - Locate the id field (e.g., /vercel/next.js, /shadcn-ui/ui). - Select the most relevant ID.

Step 2: Retrieve Context

Use the libraryId found in Step 1 to fetch specific documentation.

  • Command:

./scripts/context7tool.sh context "<libraryid>" "<specifictechnicalquestion>"

  • Example:

./scripts/context7_tool.sh context "/vercel/next.js" "how to use server actions with form validation"

Output Guidelines

  1. Synthesize, Don't Dump: The tool returns raw JSON containing code_snippets and content. Do not output the raw JSON to the user.
  2. Code First: Prioritize extracting and adapting the code snippets to solve the user's problem.
  3. Citation: Explicitly mention that the solution is based on "Context7 documentation".

Troubleshooting & Requirements

  • Dependencies: Requires curl and jq installed on the system.
  • Proxy/SSL: The script is pre-configured to handle local proxy SSL issues (-k --proxy-insecure).
  • Errors:

- If the search returns an empty list, ask the user to verify the library name. - If you receive a "validation error", ensure you are using the correct libraryId from Step 1, not just the name.