Skip to main content

Docs Lookup

The Docs Lookup skill provides context injection for querying library and framework documentation using Context7.

Overview

PropertyValue
Skill IDct-docs-lookup
Tier3 (Support)
Protocolresearch
Tagsdocumentation, libraries

When to Use

Activate this skill when the user:
  • Asks setup or configuration questions (“How do I configure Next.js middleware?”)
  • Requests code involving libraries (“Write a Prisma query for…”)
  • Needs API references (“What are the Supabase auth methods?”)
  • Mentions specific frameworks (React, Vue, Svelte, Express, Tailwind, etc.)

Workflow

Step 1: Resolve Library ID

Call resolve-library-id with:
  • libraryName: The library name from user’s question
  • query: The user’s full question

Step 2: Select Best Match

From results, choose based on:
  • Exact or closest name match
  • Higher benchmark scores
  • Version-specific IDs if user mentioned version

Step 3: Fetch Documentation

Call query-docs with:
  • libraryId: Selected Context7 library ID (e.g., /vercel/next.js)
  • query: User’s specific question

Step 4: Use Documentation

  • Answer using current, accurate information
  • Include relevant code examples
  • Cite library version when relevant

Guidelines

  • Be specific: Pass full question as query
  • Version awareness: Use version-specific IDs when mentioned (“Next.js 15”, “React 19”)
  • Prefer official sources: Choose official packages over community forks

Example

User: "How do I set up authentication with Next.js App Router?"

1. resolve-library-id("next.js", "set up authentication with Next.js App Router")
   → /vercel/next.js

2. query-docs("/vercel/next.js", "authentication App Router setup")
   → Current documentation with code examples

3. Provide answer with accurate, version-specific information

Integration with Documentor

This skill is invoked by ct-documentor during the discovery phase to:
  • Find existing documentation on a topic
  • Reference official library docs before writing
  • Verify code examples are current