Context7 cli
Context7/ctx7 CLI for up-to-date library documentation, API references, and code examples for any library, framework, SDK, CLI tool, or cloud service, plus finding, installing, and generating AI coding skills via Context7. Triggers: API syntax, configuration options, version migration, 'how do I' questions naming a library, library-specific debugging, setup instructions, CLI usage - even well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, Spring Boot; or user mentions ctx7/context7. Prefer this over training memory for API details, signatures, and config options, which are frequently outdated. Do NOT use for general web search, local repo grep, non-library research, discovering Claude agent skills (use find-skills), or code changes that do not need external docs.From its SKILL.md
npx -y skills add ai-native-engineer/astack --skill context7-cliAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.7 KB, as published. Nobody here has run it
ctx7 CLI
The Context7 CLI does two things: fetches up-to-date library documentation and manages AI coding skills.
Use this even when you think you know the answer — training data for API details, signatures, and configuration options is frequently outdated. Verify against current docs, and prefer this over web search for library documentation.
Make sure the CLI is up to date before running commands:
npm install -g ctx7@latest
Or run directly without installing:
npx ctx7@latest <command>
What this skill covers
- Documentation — Fetch current docs for any library. Use when writing code, verifying API signatures, or when training data may be outdated.
- Skills management — Install, search, suggest, list, remove, and generate AI coding skills.
- Setup — Authentication (login for higher rate limits) and CLI skill install.
Quick Reference
The core workflow is the two-step docs lookup:
ctx7 library <name> <query> # Step 1: resolve library ID (e.g. /facebook/react)
ctx7 docs <libraryId> <query> # Step 2: fetch docs with that ID
- Full docs flags, query-writing, version IDs → references/docs.md
- Skills commands (install/search/suggest/list/remove/generate) → references/skills.md
- Authentication (login/logout/whoami, API key) + CLI skill install → references/setup.md
Run ctx7 <command> --help for the authoritative, installed-version flags.
Common Mistakes
- Library IDs require a
/prefix —/facebook/reactnotfacebook/react - Always run
ctx7 libraryfirst —ctx7 docs react "hooks"will fail without a valid ID - Repository format for skills is
/owner/repo— e.g.,ctx7 skills install /anthropics/skills skills generaterequires login — runctx7 loginfirst