Context7 Skill

Use this skill to query library documentation and code examples.

Prerequisites

Core Workflow

  1. Use fixed link command by default:

    • command -v context7-mcp-cli
    • If missing, create it: uxc link context7-mcp-cli mcp.context7.com/mcp
    • context7-mcp-cli -h
    • If command conflict is detected and cannot be safely reused, stop and ask skill maintainers to pick a different fixed command name.
  2. Resolve a library name to get library ID:

    • context7-mcp-cli resolve-library-id libraryName=react query='useState hook'
  3. Query documentation:

    • context7-mcp-cli query-docs libraryId=/reactjs/react.dev query='how to use useState'

Available Tools

Usage Examples

Find React documentation

# First resolve the library
context7-mcp-cli resolve-library-id libraryName=react query='React useState hook'

Query specific documentation

context7-mcp-cli query-docs '{"libraryId":"/reactjs/react.dev","query":"how to use useEffect"}'

Query Node.js documentation

context7-mcp-cli resolve-library-id libraryName=node query='file system'

Notes

Reference Files