Agent skill

Context7

by compozy in compozy/compozy

Retrieves authoritative, up-to-date technical documentation, API references, configuration details, and code examples for any developer technology.

MITAuto-check passedDevelopment

Install Context7

skills CLI
$ npx skills add compozy/compozy --skill context7 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install compozy/compozy context7 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/compozy/compozy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/context7 .claude/skills/context7 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
context7
GitHub stars
2.8k
Token cost
~1.6k tokens
SKILL.md length
620 words
Files
1
Skills in repo
47
Repo updated
First seen
Licence
MIT

At a glance

Retrieves authoritative, up-to-date technical documentation, API references, configuration details, and code examples for any developer technology.

  • Works in 2 steps: Resolve a Library → Query Documentation
  • Answering technical questions
  • SKILL.md covers Workflow, Step 1: Resolve a Library, Step 2: Query Documentation and Authentication, plus 2 more sections
  • Calls npm and npx; needs CONTEXT7_API_KEY

What it does

Context7 is an agent skill from compozy/compozy. Retrieves authoritative, up-to-date technical documentation, API references, configuration details, and code examples for any developer technology. Use this skill whenever answering technical questions or writing code that interacts with external technologies. This includes libraries, frameworks, programming languages, SDKs, APIs, CLI tools, cloud services, infrastructure tools, and developer platforms. Common scenarios: - looking up API endpoints, classes, functions, or method parameters - checking configuration…

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Code migrations, Technical documentation and REST APIs. The repository describes itself as: An operating system for AI agents. Plug in the agent CLIs you already use (Claude Code, Codex, Gemini CLI, Cursor) and they become a team: they split the work, hand tasks to each… The licence is MIT.

When your agent uses it

  • Answering technical questions
  • Writing code that interacts with external technologies

Example prompts

  • “how do I”
  • “Use the context7 skill to retrieve authoritative, up-to-date technical documentation, API references, configuration details, and code examples for…”
  • “/context7”

Requirements

  • Node.js
  • A credential in CONTEXT7_API_KEY

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Resolve a Library
  2. Query Documentation

What it can do on your machine

Read from SKILL.md and the folder at commit eec2ed1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • CONTEXT7_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Context7 loads about 1.6k tokens when it runs. Until then it costs about 232 tokens; SKILL.md has 620 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~232
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from compozy/compozy at commit eec2ed1, republished under its MIT licence (© compozy). 620 words, ~1,643 tokens.

Download SKILL.mdSave it as .claude/skills/context7/SKILL.md (or your agent's skills folder).
name
context7
description
Retrieves authoritative, up-to-date technical documentation, API references, configuration details, and code examples for any developer technology. Use this skill whenever answering technical questions or writing code that interacts with external technologies. This includes libraries, frameworks, programming languages, SDKs, APIs, CLI tools, cloud services, infrastructure tools, and developer platforms. Common scenarios: - looking up API endpoints, classes, functions, or method parameters - checking configuration options or CLI commands - answering "how do I" technical questions - generating code that uses a specific library or service - debugging issues related to frameworks, SDKs, or APIs - retrieving setup instructions, examples, or migration guides - verifying version-specific behavior or breaking changes Prefer this skill whenever documentation accuracy matters or when model knowledge may be outdated.

Documentation Lookup

Retrieve current documentation and code examples for any library using the Context7 CLI.

Make sure the CLI is up to date before running commands:

bash
npm install -g ctx7@latest

Or run directly without installing:

bash
npx ctx7@latest <command>

Workflow

Two-step process: resolve the library name to an ID, then query docs with that ID.

bash
# Step 1: Resolve library ID
ctx7 library <name> <query>

# Step 2: Query documentation
ctx7 docs <libraryId> <query>

You MUST call ctx7 library first to obtain a valid library ID UNLESS the user explicitly provides a library ID in the format /org/project or /org/project/version.

IMPORTANT: Do not run these commands more than 3 times per question. If you cannot find what you need after 3 attempts, use the best result you have.

Step 1: Resolve a Library

Resolves a package/product name to a Context7-compatible library ID and returns matching libraries.

bash
ctx7 library react "How to clean up useEffect with async operations"
ctx7 library nextjs "How to set up app router with middleware"
ctx7 library prisma "How to define one-to-many relations with cascade delete"

Always pass a query argument — it is required and directly affects result ranking. Use the user's intent to form the query, which helps disambiguate when multiple libraries share a similar name. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query.

Result fields

Each result includes:

  • Library ID — Context7-compatible identifier (format: /org/project)
  • Name — Library or package name
  • Description — Short summary
  • Code Snippets — Number of available code examples
  • Source Reputation — Authority indicator (High, Medium, Low, or Unknown)
  • Benchmark Score — Quality indicator (100 is the highest score)
  • Versions — List of versions if available. Use one of those versions if the user provides a version in their query. The format is /org/project/version.
Selection process
  1. Analyze the query to understand what library/package the user is looking for
  2. Select the most relevant match based on:
    • Name similarity to the query (exact matches prioritized)
    • Description relevance to the query's intent
    • Documentation coverage (prioritize libraries with higher Code Snippet counts)
    • Source reputation (consider libraries with High or Medium reputation more authoritative)
    • Benchmark score (higher is better, 100 is the maximum)
  3. If multiple good matches exist, acknowledge this but proceed with the most relevant one
  4. If no good matches exist, clearly state this and suggest query refinements
  5. For ambiguous queries, request clarification before proceeding with a best-guess match
Version-specific IDs

If the user mentions a specific version, use a version-specific library ID:

bash
# General (latest indexed)
ctx7 docs /vercel/next.js "How to set up app router"

# Version-specific
ctx7 docs /vercel/next.js/v14.3.0-canary.87 "How to set up app router"

The available versions are listed in the ctx7 library output. Use the closest match to what the user specified.

Show full SKILL.md (241 more words)Show less

Step 2: Query Documentation

Retrieves up-to-date documentation and code examples for the resolved library.

bash
ctx7 docs /facebook/react "How to clean up useEffect with async operations"
ctx7 docs /vercel/next.js "How to add authentication middleware to app router"
ctx7 docs /prisma/prisma "How to define one-to-many relations with cascade delete"
Writing good queries

The query directly affects the quality of results. Be specific and include relevant details. Do not include any sensitive or confidential information such as API keys, passwords, credentials, personal data, or proprietary code in your query.

QualityExample
Good"How to set up authentication with JWT in Express.js"
Good"React useEffect cleanup function with async operations"
Bad"auth"
Bad"hooks"

Use the user's full question as the query when possible, vague one-word queries return generic results.

The output contains two types of content: code snippets (titled, with language-tagged blocks) and info snippets (prose explanations with breadcrumb context).

Authentication

Works without authentication. For higher rate limits:

bash
# Option A: environment variable
export CONTEXT7_API_KEY=your_key

# Option B: OAuth login
ctx7 login

Error Handling

If a command fails with a quota error ("Monthly quota reached" or "quota exceeded"):

  1. Inform the user their Context7 quota is exhausted
  2. Suggest they authenticate for higher limits: ctx7 login
  3. If they cannot or choose not to authenticate, answer from training knowledge and clearly note it may be outdated

Do not silently fall back to training data — always tell the user why Context7 was not used.

Common Mistakes

  • Library IDs require a / prefix — /facebook/react not facebook/react
  • Always run ctx7 library first — ctx7 docs react "hooks" will fail without a valid ID
  • Use descriptive queries, not single words — "React useEffect cleanup function" not "hooks"
  • Do not include sensitive information (API keys, passwords, credentials) in queries

© compozy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/context7 of compozy/compozy.

Open the folder on GitHubat commit eec2ed1

Compare with similar skills

Context7 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Context7 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Context7 this skillcompozy/compozy2.8k—~1.6kAutomated safety check: PassMIT
Releasejaemk/self_update961—~2.2kAutomated safety check: PassMIT
API Generatinghuangjia2019/claude-code-engineering1.1k1 repos~426Automated safety check: PassNone
Project Gradle Third Party Version UpgradeafkT/DevUtils1.6k—~1.2kAutomated safety check: PassApache-2.0
Record Prisma 8 Upgrade Instructionsprisma/orm48k—~3.2kAutomated safety check: NotesApache-2.0
Tabler Upgrade Guide Writertabler/tabler42k—~1.7kAutomated safety check: PassMIT

Similar skills

  • Release

    jaemk/self_update

    Prepare a release (bump the crate version, update CHANGELOG.md with a migration guide for breaking changes, regenerate README, commit), or run a pre-release review.

    961 GitHub stars~2.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • API Generating

    huangjia2019/claude-code-engineering

    Generate API endpoint documentation from Express route files.

    1.1k GitHub starsUsed in 1 repo~426 tokens
    DevelopmentAuto-check passed
  • 对 DevUtils 工程(DEPSROOT=file/gradle、DEPSMANIFEST=file/deps)中定义的第三方库 GAV 依赖做版本查证与升级;结合 Maven Central、Google Maven、Gradle Plugin Portal、 JitPack 与 GitHub Releases/README 交叉校验「最新可用版本」;必要时修正…

    1.6k GitHub stars~1.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Adds an upgrade-instruction fragment to a Prisma 8 breaking-change PR so downstream app and extension authors can apply the matching code translation.

    48k GitHub stars~3.2k tokensUpdated today
    DevelopmentAuto-check: notes
  • Writes the upgrade guide page for a Tabler release by collecting removed, renamed and deprecated items from changesets and diffs, with before and after examples.

    42k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed
  • Packages Documentation

    reactive/data-client

    Write, update, and format documentation for @data-client public APIs - API reference (Docusaurus/MDX), README files, JSDoc/TSDoc docstrings, usage examples, migration guides, deprecation notices…

    2k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed

More from compozy/compozy

All 47 skills in this repo
  • Eng Real Scenario QA

    compozy/compozy

    Dogfoods Compozy through an autonomous startup scenario with live providers, cross-surface observation, and strict evidence audit.

    2.8k GitHub stars~3.4k tokensUpdated today
    Auto-check passed
  • Eng Test Conventions

    compozy/compozy

    Go test-shape discipline for Compozy. An agent skill from compozy/compozy.

    2.8k GitHub stars~467 tokensUpdated today
    Auto-check passed
  • Assistant UI

    compozy/compozy

    Guide for assistant-ui library - AI chat UI components. An agent skill from compozy/compozy.

    2.8k GitHub stars~958 tokensUpdated today
    Auto-check passed
  • Guide for assistant-ui UI primitives - ThreadPrimitive, ComposerPrimitive, MessagePrimitive.

    2.8k GitHub stars~999 tokensUpdated today
    Auto-check passed
  • Assistant UI Runtime

    compozy/compozy

    Guide for assistant-ui runtime system and state management. An agent skill from compozy/compozy.

    2.8k GitHub stars~856 tokensUpdated today
    Auto-check passed
  • Assistant UI Streaming

    compozy/compozy

    Guide for assistant-stream package and streaming protocols. An agent skill from compozy/compozy.

    2.8k GitHub stars~813 tokensUpdated today
    Auto-check passed

Categories

Questions about Context7

What does Context7 do?

Retrieves authoritative, up-to-date technical documentation, API references, configuration details, and code examples for any developer technology. Context7 is an agent skill from compozy/compozy. Retrieves authoritative, up-to-date technical documentation, API references, configuration details, and code examples for any developer technology.

When should I use Context7?

Context7 fits situations like: answering technical questions; writing code that interacts with external technologies.

How do I install Context7 in Claude Code?

Run `npx skills add compozy/compozy --skill context7 -a claude-code`. Or copy the skill folder (.agents/skills/context7 in compozy/compozy) into .claude/skills/context7 in your project. Claude Code loads it when a task matches its description.

How do I install Context7 in Codex?

Run `npx skills add compozy/compozy --skill context7 -a codex`. Or copy the skill folder (.agents/skills/context7 in compozy/compozy) into .agents/skills/context7 in your project. Codex loads it when a task matches its description.

Can I use Context7 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add compozy/compozy --skill context7 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/context7, .gemini/skills/context7, .github/skills/context7 and .opencode/skills/context7 in your project.

What does Context7 need to run?

Going by SKILL.md and its folder, Context7 needs the command-line tools its instructions call (npm and npx) and credentials named CONTEXT7_API_KEY. Our summary lists: Node.js; A credential in CONTEXT7_API_KEY.

Does Context7 access the network?

SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Context7 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Context7 use?

Context7 is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Context7 use?

About 1.6k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Context7?

Skills that share tags, products or a category with Context7: Release (jaemk/self_update, 961 stars), API Generating (huangjia2019/claude-code-engineering, 1.1k stars), Project Gradle Third Party Version Upgrade (afkT/DevUtils, 1.6k stars) and Record Prisma 8 Upgrade Instructions (prisma/orm, 48k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Context7?

compozy (a GitHub organization) maintains it in compozy/compozy, which has 2,792 GitHub stars. The repository holds 47 skills in this directory. The repository was last updated on October 8, 2026.

Source: compozy/compozy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.