context7-enhanced

Enhanced Context7 queries with curated registry and version detection. Use when fetching library documentation, especially when working with specific package versions.

📖 中文导读:Enhanced Context7 queries with curated registry and version detection. Use when fetching library documentation, especially when working with specific package versions. 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: context7-enhanced description: Enhanced Context7 queries with curated registry and version detection. Use when fetching library documentation, especially when working with specific package versions.

Context7 Enhanced

This skill provides enhanced Context7 documentation lookup with:

  • Curated library registry (200+ libraries)
  • Automatic version detection from project files
  • Quality metrics for library selection

When to Use

Use this skill when:

  • Looking up documentation for libraries/frameworks
  • Needing version-specific documentation
  • Working with a project that has dependency files (pyproject.toml, package.json, etc.)

Workflow

1. Check for Project Context

First, check if .claude/context7-project.json exists in the project:

cat .claude/context7-project.json 2>/dev/null || echo "Not found"
  • If found: Use detected versions for queries
  • If not found: Suggest running /context7-detect to generate it

2. Registry Lookup

Use the CLI to look up library information:

# Find a library by name
npx @gofullthrottle/context7-registry query <library-name>

# Find by package name in specific ecosystem
npx @gofullthrottle/context7-registry query <package-name> --ecosystem pypi
npx @gofullthrottle/context7-registry query <package-name> --ecosystem npm

This will return:

  • Context7 ID for the library
  • Whether version-specific docs are supported
  • Quality metrics (snippets, trust score)

3. Query Context7 MCP

With the resolved Context7 ID, query the MCP server:

mcp__context7__get-library-docs("<context7-id>", topic="<user-topic>")

For version-specific documentation (if supported):

mcp__context7__get-library-docs("<context7-id>@<version>", topic="<user-topic>")

Quick Reference: Common Library IDs

Library Context7 ID Version Docs
React /facebook/react Yes
Next.js /vercel/next.js Yes
FastAPI /tiangolo/fastapi Yes
Tailwind CSS /tailwindlabs/tailwindcss Yes
Claude SDK (Python) /anthropics/anthropic-sdk-python Yes
Claude SDK (TypeScript) /anthropics/anthropic-sdk-typescript Yes
MCP SDK (Python) /modelcontextprotocol/python-sdk Yes
MCP SDK (TypeScript) /modelcontextprotocol/typescript-sdk Yes
Pydantic /pydantic/pydantic Yes
Prisma /prisma/prisma Yes

For the complete list:

npx @gofullthrottle/context7-registry list

Personal Registry

Users can add custom library entries to ~/.claude/configs/context7-personal.json:

{
  "version": "1.0.0",
  "description": "Personal Context7 registry additions",
  "libraries": {
    "my-internal-lib": {
      "id": "/myorg/internal-lib",
      "name": "Internal Library",
      "description": "Our internal utility library",
      "packageNames": {
        "pypi": "my-internal-lib"
      },
      "versionSupport": false,
      "quality": {
        "snippets": 100,
        "trustScore": 8.0
      },
      "topics": ["utilities"],
      "lastVerified": "2026-01-08"
    }
  }
}

The personal registry is automatically merged with the community registry.

Example Usage

User asks about FastAPI routing

  1. Check if project has FastAPI version detected:

    cat .claude/context7-project.json | jq '.dependencies[] | select(.package == "fastapi")'
    
  2. If version found (e.g., 0.115.0):

    mcp__context7__get-library-docs("/tiangolo/fastapi@0.115.0", topic="routing")
    
  3. If no version:

    mcp__context7__get-library-docs("/tiangolo/fastapi", topic="routing")
    

User asks about an unknown library

  1. Search the registry:

    npx @gofullthrottle/context7-registry query "library-name"
    
  2. If found, use the returned Context7 ID

  3. If not found, check suggestions or try mcp__context7__resolve-library-id

Troubleshooting

Library not in registry

If a library isn't in the registry:

  1. Use mcp__context7__resolve-library-id to find it
  2. Consider adding it to the registry via PR
  3. Or add it to your personal registry

Version-specific docs not working

Some libraries don't have version-specific documentation in Context7. Check:

npx @gofullthrottle/context7-registry query <library> --json | jq '.entry.versionSupport'

If false, only use the base ID without version suffix.

Stale project context

If dependency versions have changed:

npx @gofullthrottle/context7-registry detect . --force