Agent skill
context7-cli
Use the local Context7 CLI in this repo to search libraries and fetch Context7 context for skills or documentation tasks. Trigger when you need to run `c7 search`/`c7 context`, resolve library IDs, or retrieve text/json outputs from Context7 via the CLI.
Install this agent skill to your Project
npx add-skill https://github.com/strantalis/agent-skills/tree/main/skills/context7-cli
SKILL.md
Context7 CLI
Overview
Use the local agent-skills CLI (subcommand c7) to query Context7 for library discovery and context snippets. Prefer this tool when a task needs authoritative library context and you want a deterministic CLI output that can be piped into downstream steps.
Quick Start
- Ensure
CONTEXT7_API_KEYis set or pass--api-key. - If
agent-skillsis already installed, use it directly:
command -v agent-skills
agent-skills c7 search --library-name react --query "useEffect cleanup"
- Otherwise, run the CLI from the repo:
go run ./cmd/agent-skills c7 search --library-name react --query "useEffect cleanup"
For repeated calls, build once:
go build -o bin/agent-skills ./cmd/agent-skills
./bin/agent-skills c7 context --library-id /facebook/react --query "useEffect cleanup"
Or install remotely (requires Go) only if the binary is missing:
if ! command -v agent-skills >/dev/null 2>&1; then
go install github.com/strantalis/agent-skills/cmd/agent-skills@latest
fi
agent-skills c7 search --library-name react --query "useEffect cleanup"
Tasks
Search for libraries
Use this to discover candidate library IDs.
go run ./cmd/agent-skills c7 search --library-name react --query "useEffect cleanup"
- Default output is JSON. Use
--format jsonlfor JSON lines or--format textfor tab-separated lines. - Use
--limitto reduce results when you only need the top few.
Fetch context
Prefer explicit --library-id for determinism.
go run ./cmd/agent-skills c7 context --library-id /facebook/react --query "useEffect cleanup"
If you only have a name, you may use --library-name. If multiple libraries match, use --select=interactive or --select=first, or provide --library-id for determinism.
go run ./cmd/agent-skills c7 context --library-name react --query "useEffect cleanup"
Output formats
- Use
--format jsonwhen another tool or step needs structured output. - Use
--format jsonlfor streaming or piping one JSON object per line. - Use
--format textfor direct reading or quick copy/paste.
Flags (global to c7)
--api-key(orCONTEXT7_API_KEY): Context7 API key.--base-url: Override the Context7 base URL.--timeout: HTTP timeout (default 30s).--retries: Retry count for 202/429/5xx responses.--cache-dir: Enable disk cache when set.--cache-ttl: Cache TTL (default 24h, only used when cache-dir is set).
Troubleshooting
- 401/403: Missing or invalid API key. Set
CONTEXT7_API_KEYor pass--api-key. - 429: Rate limited. The client retries automatically; reduce request rate if persistent.
- 202: Context is still processing; retries will handle this automatically.
Reference
See references/api_reference.md for the full command reference and examples.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
debug-mode
Run an iterative, hypothesis-driven “debug mode” loop to diagnose and fix a bug using targeted instrumentation and log capture. Use when the user wants an interactive debug loop, when you need to quickly narrow a failure via added debug statements, or when you need a lightweight way to centralize logs from a repro run (via `agent-skills debug` server + SSE UI).
crypto-expert
Crypto best-practices guidance and review across languages and domains. Use whenever cryptography, encryption, hashing, signatures, key/nonce/IV handling, randomness, password storage, TLS/PKI, secure channels, token formats, or "roll your own crypto" is mentioned, including high-level questions or code/design reviews. Trigger broadly to prevent subtle security mistakes.
gh-cli
Standardize all GitHub interactions via the GitHub CLI (`gh`) instead of ad-hoc URLs, UI clicks, or direct REST API calls. Use when you need to read or change GitHub state (repos, issues, pull requests, reviews, check status, Actions workflows/runs, releases, labels, milestones, discussions, gists) and want deterministic output (prefer `--json` + `--jq`). Also use when the user provides a GitHub URL, including deep links like `https://github.com/OWNER/REPO/pull/123`, `.../issues/123`, `.../pull/123/files`, or comment permalinks like `#issuecomment-...`, and you need to fetch the underlying PR/issue/thread and reply. Fall back to `gh api` only when there is no first-class `gh NOUN VERB` command.
setup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?