c7search
Skill7 starsChanged 4 months agoMITView on GitHub
Look up current, version-correct documentation and code examples for any library, framework or API through Context7 (the `c7search` CLI) instead of answering from memory. Use whenever the user asks how to use a library, wants a current code example, asks for the current or latest API or signature, or the answer may have changed since the training cutoff, even if they never name Context7.
- Reads credentials
- Installs packages
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- beadsSkill
- azadvertizerSkill
- business-planSkill
- clear-and-humanSkill
- convert-to-webpSkill
- cv-and-humanSkill
- cv-cover-letterSkill
- cv-evidence-baseSkill
- dev-fleetSkill
- excalidraw-diagramSkill
- frontier-roundsSkill
- ghost-publishSkill
- hook-and-humanSkill
- interview-panelSkill
- job-feedsSkill
- markdown-converterSkill
- nano-banana-pro-jsonSkill
- readabilitySkill
- report-builderSkill
- social-image-prepSkill
- source-snapshotSkill
- terraform-registrySkill
- terragrunt-skillSkill
- transcribe-summarizeSkill
- travel-planningSkill
- trilium-captureSkill
- use-linearisSkill
- ux-auditSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
If MISSING: the quickest install (and the only one needing no extra steps on macOS) is go install github.com/kevin-burns/c7search@latest, …
- Very specific: line 35
If you can't install a binary, fall back to the curl-based context7 skill (same endpoints, no caching/retries): …
- Distinctive: line 45
Prefer this two-step recipe.
- Very specific: line 57
Step 1 — resolve the library ID: Use --library-name when you know the name.
- Very specific: line 100
Default markdown is what Context7 token-optimizes for LLMs (Source: headers + fenced code blocks + --- separators).
- Very specific: line 137
Cache works: Search results live 6 h on disk, docs payloads 24 h.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
c7search
c7search wraps the Context7 v2 documentation API in a single static
binary. It exposes two operations — resolve a library name to an ID, then
fetch docs for that ID — with on-disk caching, secret redaction, retries,
and semantic exit codes. Payload goes to stdout (markdown by default,
JSON on demand); status messages go to stderr, so you can pipe stdout
straight into the model context without filtering.
When to use
- "How do I X in
<library>" / "show me<library>'s API for Y" - Need current code examples or usage for a library or framework
- A library may have changed since the training cutoff
- Verifying the right API surface before generating code that uses it
Check the binary is installed
command -v c7search >/dev/null 2>&1 && c7search version || echo MISSINGIf MISSING: the quickest install (and the only one needing no extra
steps on macOS) is go install github.com/kevin-burns/c7search@latest,
then ensure $(go env GOPATH)/bin is on $PATH. For release binaries
and per-OS notes (macOS Gatekeeper, Windows SmartScreen), see the install
section of the README: https://github.com/kevin-burns/c7search#install.
If you can't install a binary, fall back to the curl-based context7
skill (same endpoints, no caching/retries):
https://github.com/intellectronica/agent-skills/blob/main/skills/context7/SKILL.md
An API key is optional (CONTEXT7_API_KEY=ctx7sk-... lifts rate limits);
the anonymous tier is fine for casual lookups. c7search auth status
prints the key source and connectivity.
Workflow: resolve, then fetch
Prefer this two-step recipe. It uses the v2 endpoints exclusively and has predictable resolution.
Avoid
c7search ask "..."except for a known-unambiguous lookup.askdoes resolve+fetch in one shot over free-form v1 search, ranking the entire query string — so incidental feature keywords drag it to the wrong library. Real misses: a query mentioning "mock" resolved to a mock-testing lib, "plugins" to a plugins SDK, "register a tool in fastmcp" to a Go DI library. The more keywords you stuff in, the worse it gets. Instead resolve by library name (Step 1) — that anchors resolution to the actual library, then use--topicondocsto focus. Treataskas a last resort.
Step 1 — resolve the library ID. Use --library-name when you know
the name; the positional argument becomes the relevance topic:
c7search resolve --library-name <name> "<topic>" --json --limit 1 | jq -r '.[0].id'Returns an ID like /vercel/next.js. For free-form lookups where you
don't know the library name, omit --library-name and inspect the top
results before fetching — that path ranks by trust score and can surface
high-trust hits for unrelated libraries:
c7search resolve "<query>" --json --limit 5 | jq '.[] | {id, trustScore, totalSnippets, stars}'Step 2 — fetch docs. Pass the resolved ID and a semantic --topic:
c7search docs "<library-id>" --topic "<topic>" --tokens <budget>Examples
Two-step lookup (Next.js app-router middleware):
LIB=$(c7search resolve --library-name "next.js" "app router middleware" --json --limit 1 \
| jq -r '.[0].id')
c7search docs "$LIB" --topic "middleware" --tokens 4000Filter by language before ingesting (only TypeScript snippets):
LIB=$(c7search resolve --library-name "next.js" "server actions" --json --limit 1 \
| jq -r '.[0].id')
c7search docs "$LIB" --topic "server actions" --tokens 6000 --json \
| jq '.snippets[] | select(.codeLanguage | test("typescript|ts"))'Output format
Default markdown is what Context7 token-optimizes for LLMs (Source:
headers + fenced code blocks + --- separators). Feed it straight into
context. Use --json only when you need to filter or sort snippets by
a structured field (codeLanguage, codeTitle) before ingesting — it
adds ~10–15% token overhead from the JSON envelope.
Token budget (--tokens)
| Goal | Budget |
| One specific API call (signature, parameters) | 1500 |
| Walkthrough of a feature (default) | 4000–6000 (default 5000) |
| Whole-library reference | 10000+ (anonymous tier may rate-limit) |
Exit codes — branch on $?
| Code | Meaning |
0 | OK |
1 | No results (search returned empty) |
2 | API error (5xx, 429, 404) |
3 | Auth error (401/403) — check CONTEXT7_API_KEY |
4 | Usage / bad request |
if ! out=$(c7search docs "$LIB" --topic "$TOPIC" 2>&1); then
case $? in
1) echo "no docs found";;
2) echo "API problem; retry later";;
3) echo "check CONTEXT7_API_KEY";;
*) echo "unknown error: $out";;
esac
fiTips
- Cache works. Search results live 6 h on disk, docs payloads 24 h;
repeated queries are ~10× faster. Use
--no-cacheonly when you need fresh data (e.g. a release you just published). - Library IDs accept
/owner/repoorowner/repo. Leading slashes, whitespace, and case are normalized. --debugis safe. Bearer tokens and URL credentials are scrubbed before any log line reaches stderr.
Provenance
The c7search CLI is my own open-source tool (MIT): https://github.com/kevin-burns/c7search. It queries Context7's public documentation API, a third-party service — this skill and the CLI are not affiliated with or endorsed by Context7, and Context7's API terms and rate limits apply.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

