Skip to content
Back to skills

Lookup

ASecurity

Look up current library documentation, API references, and code examples via Context7 (ctx7 CLI or the Context7 MCP server, same backend). Use when: 'look up the docs for X', 'how do I migrate to X v2', or whenever a question names a library, framework, SDK, CLI tool, or cloud service, including API syntax, configuration, setup, and version-migration questions. Actions: lookup LIBRARY QUERY (default) | update (CLI upgrade + upstream drift check). For CLI/MCP setup, auth, and Windows gotchas, ...

  • 13 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 2, 2026
ai-agentsgoshellbashreactgitapibackenddocumentation

Works with

  • cli
  • api
  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 10 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add melodic-software/claude-code-plugins --skill lookup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lookup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lookup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/melodic-software-lookup/badge)](https://www.skillsdirectory.com/skills/melodic-software-lookup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: "Look up current library documentation, API references, and code examples via Context7 (ctx7 CLI or the Context7 MCP server, same backend). Use when: 'look up the docs for X', 'how do I migrate to X v2', or whenever a question names a library, framework, SDK, CLI tool, or cloud service, including API syntax, configuration, setup, and version-migration questions. Actions: lookup LIBRARY QUERY (default) | update (CLI upgrade + upstream drift check). For CLI/MCP setup, auth, and Windows gotchas, run /context7:setup."
argument-hint: "[lookup <library> <query>|update]"
user-invocable: true
disable-model-invocation: false
allowed-tools:
  - "Bash(ctx7 --version*)"
metadata:
  upstream-version: upstash/context7@master
  synced: 2026-05-22
  workflow-stage: research
  summary: Look up current library docs, API references, and examples via Context7
shell: bash
---

**Arguments.** `[lookup <library> <query>|update]`. Default action is lookup, e.g. /context7:lookup react "useEffect cleanup".

## Pre-computed context

Installed CLI version: !`ctx7 --version 2>/dev/null || echo "not installed (run: npm install -g ctx7@latest)"`

MCP availability: check your own tool list. If `mcp__context7__resolve-library-id` / `mcp__context7__query-docs` are present, the MCP path is configured.

## Purpose

A primary source of up-to-date library documentation. Two equivalent interfaces: CLI (`ctx7`) via npm, and the Context7 HTTP MCP server (`mcp__context7__*`) when the consuming project has it configured. Both read the same backend. Pick by workflow (see [When to use CLI vs MCP](#when-to-use-cli-vs-mcp)).

**Philosophy**: training data is stale by the time you use it. Library APIs, framework defaults, best practices change. Before claiming how a library works, verify against Context7.

## Actions

| Action | When | Loads |
|---|---|---|
| `lookup <library> <query>` (default) | User asks about a library | [context/lookup.md](context/lookup.md) |
| `update` | Drift check + CLI upgrade + upstream skill changes | [context/update.md](context/update.md) |

If the argument is bare (no action keyword), treat as `lookup`.

First-time setup covers CLI install, `CONTEXT7_API_KEY` auth, optional MCP server wiring, and the Windows Git Bash gotcha. It lives in its own skill: run `/context7:setup`.

## Lookup (happy path)

Two-step: resolve library name → fetch docs with resolved ID.

```bash
# Step 1: name → Context7 library ID
ctx7 library "<name>" "<question>"
# Step 2: ID → docs (Windows Git Bash: prefix with MSYS_NO_PATHCONV=1 — see context/cli.md)
MSYS_NO_PATHCONV=1 ctx7 docs "<libraryId>" "<question>"
```

Equivalent via MCP when the consuming project has the Context7 MCP server configured (no Windows gotcha, cleaner output, more content per call; measured ratio in [context/mcp.md](context/mcp.md)):

```text
mcp__context7__resolve-library-id(libraryName: "...", query: "...")
mcp__context7__query-docs(libraryId: "/org/project", query: "...")
```

Call `library` / `resolve-library-id` first to get a valid ID; `docs` / `query-docs` reject anything else, unless the user supplies an ID in `/org/project` format. One concept per query. When a question spans several independent topics, run a separate lookup per topic. Do not run more than 3 lookup commands per topic. If you cannot find what you need, fall back to training knowledge and tell the user Context7 didn't cover it.

**Do not include sensitive information** (API keys, passwords, credentials) in queries. Sent to the Context7 backend.

Details: query-writing, result selection, version-specific IDs, common mistakes → [context/lookup.md](context/lookup.md)

## When to use CLI vs MCP

Both read the same backend. Results equivalent in substance. Pick by workflow.

| Use the CLI (`ctx7`) when | Use the MCP (`mcp__context7__*`) when |
|---|---|
| Piping into `grep`, `jq`, `head`, a file | Conversational lookup where the model picks the tool naturally |
| Dumping large docs to disk (`> docs.md`) instead of context | Default docs depth matters (MCP returns more content per call; see [context/mcp.md](context/mcp.md)) |
| Scripting, loops, Bash one-liners | Clean markdown output (no ANSI codes) |
| No MCP server configured, or `mcp.context7.com` blocked | Zero Windows Git Bash ceremony (no `MSYS_NO_PATHCONV=1`) |
| Structured extraction (`--json`) | Auto-discoverable from the model's tool list |

More: [context/cli.md](context/cli.md), [context/mcp.md](context/mcp.md)

## Update

Two upstream dependencies can drift: the `ctx7` npm package, and Upstash's reference skill content. Aggregate-level stale-tracking via `metadata.upstream-version` + `metadata.synced` in the frontmatter above; the verbatim upstream baselines under `vendor/` refresh together.

When CLI or upstream skill content drifts:

```bash
bash "${CLAUDE_PLUGIN_ROOT}/skills/lookup/scripts/update.sh"        # check only
bash "${CLAUDE_PLUGIN_ROOT}/skills/lookup/scripts/update.sh" --fix  # apply CLI upgrade
```

Script (a) reports installed vs latest `ctx7` version, (b) fetches latest upstream `find-docs/SKILL.md` and `context7-cli/SKILL.md` from `upstash/context7`, (c) diffs against the `vendor/` baselines, (d) if different, reports NEW upstream guidance for manual integration into this skill. The script does NOT auto-overwrite this `SKILL.md`. Customizations (Windows gotcha, CLI-vs-MCP guidance, action dispatch) must be preserved.

Full protocol (merge strategy, what to preserve, maintainer-only baseline refresh) → [context/update.md](context/update.md)

## Spoke paths

The `context/` files write this skill's directory as `<skill-dir>`, which is `${CLAUDE_SKILL_DIR}`.
Put that path in place of the placeholder before running a command or writing it into a brief. Those
files arrive through the Read tool as plain bytes, so a `${…}` token in them would reach the Bash
tool unsubstituted, and the Bash tool's environment has no `CLAUDE_SKILL_DIR` to expand it from.
Basis: the plugins reference,
<https://code.claude.com/docs/en/plugins-reference#where-each-variable-resolves>, verified
2026-09-30; recheck when that table adds supporting files to where a `${…}` reference resolves.

## What this skill does NOT do

- **Does not replace multi-source research**. Use your research workflow for architecture decisions or anything needing cross-referenced sources. This skill is library-doc retrieval only
- **Does not refactor code**. Retrieves docs. User's question shapes what comes back
- **Does not cache content locally**. Docs fetched fresh each call. `vendor/` baseline is verbatim upstream for skill-content drift detection only, not doc retrieval, so read it when running the `update` action and not on a normal lookup
- **Does not auto-overwrite on update**. `update` is advisory. User approves any merge before changes land

## Gotchas

- **Windows Git Bash**: `ctx7 docs /org/project "..."` gets path-mangled to `C:/Program Files/Git/org/project`. Always prefix with `MSYS_NO_PATHCONV=1`. `ctx7 library` is unaffected. Full detail: [context/cli.md](context/cli.md)
- **Prefer the `CONTEXT7_API_KEY` env var over `ctx7 login`**: `ctx7 login` triggers browser OAuth and writes a token to `~/.ctx7/`. The env var is simpler and portable across machines. See [context/cli.md](context/cli.md)
- **No content tuning**: CLI has no `--tokens` / `--limit` flag. Default depth is server-controlled. For more content per call, prefer MCP (measured ratio in [context/mcp.md](context/mcp.md))
- **Don't run `ctx7 skills install` into `.claude/skills/`**: this plugin owns the Context7 lookup surface. Installing Upstash's `find-docs` skill alongside creates a parallel surface that fragments lookups and drifts independently

Files in this skill

  • SKILL.md6.9 KB
  • context/cli.md6.9 KB
  • context/lookup.md5.2 KB
  • context/mcp.md4.1 KB
  • context/update.md4.8 KB
  • evals/evals.json3.1 KB
  • scripts/update.sh8 KB
  • vendor/.markdownlint-cli2.jsonc43 B
  • vendor/cli/SKILL.md2.9 KB
  • vendor/find-docs/SKILL.md6.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.