Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

context7-docscontext7 文档

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

18,360

周安装

750

GitHub Stars

公开资料未说明

下载量

5,940
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:context7-docs(context7 文档)
来源仓库:https://github.com/jaylane/context7-docs
安装命令:
openclaw skills install context7-docs
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install context7-docs

简介

context7-docs 从 Context7 获取编程库或框架的最新文档与代码示例。

  • 支持特定版本查询,提供结构化信息与实用片段。
  • 适合在开发中快速查找 API 用法与最佳实践。
  • 安装前需确认 Context7 服务可用性,避免依赖不可控外部源。
  • 适用于需要精准、及时技术资料支持的 AI 驱动开发流程。

SKILL.md

name
context7-docs
description
>-
license
MIT
compatibility
Requires curl, jq, and internet access. Optional CONTEXT7_API_KEY env var for higher rate limits.
metadata
author
context7
version
1.0
source
https://github.com/upstash/context7
allowed-tools
Bash(curl:*) Bash(jq:*) Read

Context7 Documentation Lookup

Overview

Context7 provides up-to-date, version-specific documentation and code examples for thousands of programming libraries and frameworks. Use this skill whenever you need current documentation that may differ from your training data — especially for fast-moving libraries like Next.js, React, Supabase, LangChain, etc.

When to Use This Skill

  • The user asks about a library's API and you're unsure if your knowledge is current
  • The user requests code examples for a specific library version
  • The user asks for setup, configuration, or migration guides
  • The user mentions "use context7" or asks for up-to-date docs
  • You need to verify whether an API or method still exists in the latest version

Two-Step Workflow

Step 1: Resolve the Library ID

First, find the Context7-compatible library ID for the library the user is asking about.

bash scripts/resolve-library.sh --query "How to set up authentication" --library-name "next.js"

This returns a list of matching libraries with:

  • Library ID — e.g., /vercel/next.js (use this in Step 2)
  • Name and Description
  • Code Snippets — number of available examples (prefer higher counts)
  • Benchmark Score — quality indicator out of 100 (prefer higher)
  • Source Reputation — High, Medium, Low, or Unknown (prefer High/Medium)
  • Versions — available version-specific IDs like /vercel/next.js/v14.3.0

Selection criteria — Pick the library that best matches based on:

  1. Name similarity (exact matches first)
  2. Description relevance to the user's task
  3. Higher Code Snippet count
  4. Higher Benchmark Score
  5. High or Medium Source Reputation

If the user already provides a library ID in /org/project format, skip this step.

Step 2: Query the Documentation

Use the library ID from Step 1 to fetch relevant documentation:

bash scripts/query-docs.sh --library-id "/vercel/next.js" --query "How to set up authentication with JWT"

This returns documentation text with code examples directly relevant to the query.

Shortcut: Direct curl

You can also call the API directly without the scripts:

Search for a library:

curl -s "https://context7.com/api/search" \
  -H "Content-Type: application/json" \
  ${CONTEXT7_API_KEY:+-H "Authorization: Bearer $CONTEXT7_API_KEY"} \
  -d '{"query": "How to set up auth", "libraryName": "next.js"}' | jq .

Query documentation:

curl -s "https://context7.com/api/context" \
  -H "Content-Type: application/json" \
  ${CONTEXT7_API_KEY:+-H "Authorization: Bearer $CONTEXT7_API_KEY"} \
  -d '{"query": "JWT authentication middleware", "libraryId": "/vercel/next.js"}' | jq .

Important Guidelines

  • Call resolve at most 3 times per question. If you can't find what you need, use the best result.
  • Call query-docs at most 3 times per question. Use the best information you have.
  • Be specific with queries. Good: "How to set up authentication with JWT in Express.js". Bad: "auth".
  • Use versions when relevant. If the user specifies a version, look for it in the resolve results and use the versioned library ID (e.g., /vercel/next.js/v14.3.0).
  • Do NOT include sensitive data (API keys, passwords, credentials) in your queries — they are sent to the Context7 API.

Handling Edge Cases

SituationAction
No results from resolveTry a different library name or broader search term
Multiple good matchesPick the one with the best name match + highest snippet count
User specifies a versionLook for versioned IDs in resolve results
Empty docs responseTry a more specific or different query
Rate limit hitWait a moment and retry, or suggest the user set CONTEXT7_API_KEY

Environment Setup

For higher rate limits, set a free API key:

export CONTEXT7_API_KEY="your-key-here"

Get a free key at: https://context7.com/dashboard

Next Steps

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

92.48%
按下载量换算5,493

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills