context7-cli
An agent skill by upstash, from upstash/context7. Tags: automation, cli, developer-tools, documentation, setup.
What it does
Use the ctx7 CLI to fetch library documentation, manage AI coding skills, and configure Context7 MCP. Activate when the user mentions "ctx7" or "context7", needs current docs for any library, wants to install/search/generate skills, or needs to set up Context7 for their AI coding agent.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add upstash/context7 --skill context7-cli
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/upstash/context7
cp -r context7/skills/context7-cli ~/.claude/skills/context7-cli
Safety box score
Grade D, elevated risk: 54 of 100 risk points, rated 2026-10-23. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is a Context7 documentation fetcher plus setup helper. Its main risks come from installing and running a live npm package from `@latest`, writing into home-directory agent config/skills paths, and handling login/API-key credentials during setup.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 2 (moderate) | It tells the user to install or run the CLI from npm (`npm install -g ctx7@latest`, `npx ctx7@latest <command>`), so unreviewed package code can execute on the machine. |
| Network access | 2 (moderate) | It reaches out to external services for docs and auth (`ctx7 library`, `ctx7 docs`, `ctx7 login`, `ctx7 setup --oauth`), and install commands also contact npm. |
| Filesystem reach | 2 (moderate) | Setup writes into home-directory agent locations and config files, including `~/.claude/skills`, `~/.cursor/skills`, `~/.agent/skills`, and `.mcp.json` / `.cursor/mcp.json` / `.opencode.json`. |
| Secrets & credentials | 2 (moderate) | It uses and stores authentication material via `export CONTEXT7_API_KEY=your_key` and `ctx7 login` / `ctx7 logout` / `ctx7 whoami`, so credentials are part of the trust boundary. |
| Privilege & persistence | 1 (low) | `npm install -g ctx7@latest` performs a global user-level install and can alter the user's npm prefix, but it does not request sudo or system services. |
| Instruction hijack surface | 2 (moderate) | `ctx7 setup --yes` explicitly skips confirmation prompts, reducing the human approval gate for environment changes. |
| Irreversible actions | 0 (none) | The skill fetches documentation and configures Context7; it does not itself deploy, send messages, pay, book, or delete data. |
| Transparency | 2 (moderate) | The actual CLI behavior comes from `ctx7@latest` fetched at install/run time rather than from code in this repo, so behavior can change without a repo diff. |
Before installing
- Inspect the npm package provenance for `ctx7@latest` and prefer a pinned version if possible.
- Run `ctx7 setup` without `--yes` in a scratch account first, and confirm exactly which files it will modify.
- Check where your npm global prefix points before using `npm install -g`.
- If you need auth, use a disposable API key and verify how `ctx7 login` stores and clears tokens.
Rated 2026-10-23 by an automated review of 3 files from the skill's repository.
Source
- Repository
- upstash/context7 (all skills from this repository)
- Path
- skills/context7-cli/SKILL.md
- Branch
- master
- Updated
- 2026-09-23
Related skills
- cli-developer — Use when building CLI tools, implementing argument parsing, or adding interactive prompts.
- statusline-generator — Installs, configures, customizes, or troubleshoots the Claude Code statusline (cwd, model, token counts).
- agents-get-started — Use when a developer wants to create a new agent project or get started with AgentCore.
- cli-for-agents — Designs or reviews CLIs so coding agents can run them reliably: non-interactive flags, layered --help with examples, stdin/pipelines, fast actionable errors.
- modern-python — Configures Python projects with modern tooling (uv, ruff, ty). Use when creating projects, writing standalone scripts, or migrating from pip/Poetry/mypy/black.
- principle-build-the-lever — Apply to any non-trivial work, not just bulk work: edits, migrations, analyses, checks.