All skills
upstash avatar

/context7-cli

@1aa3430 official
by upstashupstash/context763k stars
3,041

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.

Use this Skill: https://skilld.dev/gh/upstash/context7/context7-cli

This session only. Nothing lands on disk.

referencessetup.md

≈520 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Setup

ctx7 setup

One-time command to configure Context7 for your AI coding agent. Prompts for mode on first run:

  • MCP server — registers the Context7 MCP server so the agent can call tools natively
  • CLI + Skills — installs a find-docs skill that guides the agent to use ctx7 CLI commands (no MCP required)
ctx7 setup                     # Interactive — prompts for mode, then agent/install target
ctx7 setup --mcp               # Skip prompt, use MCP server mode
ctx7 setup --cli               # Skip prompt, use CLI + Skills mode

# MCP mode — target a specific agent
ctx7 setup --claude            # Claude Code only
ctx7 setup --cursor            # Cursor only
ctx7 setup --opencode          # OpenCode only

# CLI + Skills mode — target a specific install location
ctx7 setup --cli --claude      # Claude Code (~/.claude/skills)
ctx7 setup --cli --cursor      # Cursor (~/.cursor/skills)
ctx7 setup --cli --universal   # Universal (~/.agents/skills)
ctx7 setup --cli --antigravity # Antigravity (~/.config/agent/skills)

ctx7 setup --project           # Configure current project instead of globally
ctx7 setup --yes               # Skip confirmation prompts

Authentication options:

ctx7 setup --api-key YOUR_KEY  # Use an existing API key (both MCP and CLI + Skills mode)
ctx7 setup --oauth             # OAuth endpoint — MCP mode only (IDE handles the auth flow)

Without --api-key or --oauth, setup opens a browser for OAuth login. The device flow returns an API key that setup uses for authentication. --oauth is MCP-only.

What gets written — MCP mode:

  • MCP server entry in the agent's config file (.mcp.json for Claude, .cursor/mcp.json for Cursor, .opencode.json for OpenCode)
  • A Context7 rule file instructing the agent to use Context7 for library docs
  • A context7-mcp skill in the agent's skills directory

What gets written — CLI + Skills mode:

  • A find-docs skill in the chosen agent's skills directory, guiding the agent to use ctx7 library and ctx7 docs commands

Source: SKILL.md on GitHub

2 warnings16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides a set of tools to interact with the Context7 CLI for documentation retrieval, AI skill management, and environment setup. It uses standard installation methods and follows security best practices for credential management, with risks limited to the inherent nature of processing external library documentation.

  • Socket16d

    1 alert: gptAnomaly

  • Snyk16d

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    1/4 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 1aa3430. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 5 months ago

README badge

README badge for upstash/context7/context7-cli