# Context7

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-zocomputer-skills-context7`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [zocomputer](https://agentstack.voostack.com/s/zocomputer)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [zocomputer](https://github.com/zocomputer)
- **Source:** https://github.com/zocomputer/skills/tree/main/Community/context7

## Install

```sh
agentstack add skill-zocomputer-skills-context7
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Context7 -- Live Library Documentation

Pull current docs and code examples for any programming library directly into context. No more hallucinated APIs or outdated patterns.

## When to Use

- The user asks how to use a library, framework, or SDK (e.g. "how do I do X with Hono?")
- The user asks about a specific API, method, or configuration for a library
- You are writing or reviewing code that depends on an external library and need accurate API details
- The user says "use context7" explicitly
- The user asks about setup, installation, or configuration of a library

## How to Use

The script is at `Skills/context7/scripts/context7.ts`. Run with `bun`.

### Commands

**Search for a library:**
```bash
bun Skills/context7/scripts/context7.ts search ""
```
Returns matching libraries with their Context7 IDs, descriptions, snippet counts, and quality scores. Pick the best match by name relevance, reputation, and benchmark score.

**Fetch docs for a specific query:**
```bash
bun Skills/context7/scripts/context7.ts docs  ""
```
Returns documentation and code examples relevant to the query. Use the library ID from a search result.

**One-shot lookup (search + fetch docs):**
```bash
bun Skills/context7/scripts/context7.ts lookup "" "" --tokens 10000
```
Resolves the library and fetches relevant docs in one step. This is the most common workflow.

### Options

- `--tokens ` -- Max tokens of documentation to return (default: 10000). Use lower values (3000-5000) for focused questions, higher (10000-15000) for broad exploration.
- `--api-key ` -- Override the CONTEXT7_API_KEY environment variable.

### Workflow

1. User asks about a library -> run `lookup` with the library name and their question
2. Read the returned docs and code examples
3. Use them to give an accurate, up-to-date answer or write correct code
4. If `lookup` picks the wrong library, use `search` first to find the right ID, then `docs`

### Tips

- For well-known libraries, `lookup` usually picks the right one automatically
- If multiple versions exist, mention the version in your query: `lookup "next.js" "app router next.js 14"`
- Prefer library IDs from official sources (higher reputation/benchmark scores)
- Cache results mentally within a conversation; don't re-fetch the same docs repeatedly

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [zocomputer](https://github.com/zocomputer)
- **Source:** [zocomputer/skills](https://github.com/zocomputer/skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-zocomputer-skills-context7
- Seller: https://agentstack.voostack.com/s/zocomputer
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
