← 返回 Skills 市场
am-will

Context7 API Documentation Fetcher

作者 am-will · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
2171
总下载
0
收藏
7
当前安装
1
版本数
在 OpenClaw 中安装
/install context7-api
功能描述
Fetch up-to-date library documentation via Context7 API. Use PROACTIVELY when: (1) Working with ANY external library (React, Next.js, Supabase, etc.) (2) User asks about library APIs, patterns, or best practices (3) Implementing features that rely on third-party packages (4) Debugging library-specific issues (5) Need current documentation beyond training data cutoff Always prefer this over guessing library APIs or using outdated knowledge.
使用说明 (SKILL.md)

Context7 Documentation Fetcher

Retrieve current library documentation via Context7 API.

Workflow

1. Search for the library

python3 ~/.claude/skills/context7/scripts/context7.py search "\x3Clibrary-name>"

Example:

python3 ~/.claude/skills/context7/scripts/context7.py search "next.js"

Returns library metadata including the id field needed for step 2.

2. Fetch documentation context

python3 ~/.claude/skills/context7/scripts/context7.py context "\x3Clibrary-id>" "\x3Cquery>"

Example:

python3 ~/.claude/skills/context7/scripts/context7.py context "/vercel/next.js" "app router middleware"

Options:

  • --type txt|md - Output format (default: txt)
  • --tokens N - Limit response tokens

Quick Reference

Task Command
Find React docs search "react"
Get React hooks info context "/facebook/react" "useEffect cleanup"
Find Supabase search "supabase"
Get Supabase auth context "/supabase/supabase" "authentication row level security"

When to Use

  • Before implementing any library-dependent feature
  • When unsure about current API signatures
  • For library version-specific behavior
  • To verify best practices and patterns
安全使用建议
This skill appears to be what it says (a Context7 API client), but it has two issues you should consider before installing or using it: - Hardcoded API key: The script contains a default API key baked into source. That key could be shared, revoked, or abused. Do not assume it's safe to use — prefer to set your own CONTEXT7_API_KEY in your environment and remove the embedded key from the copy you run. - Undeclared credential requirement: The skill metadata and SKILL.md do not mention the required CONTEXT7_API_KEY. Ask the publisher: who owns the default key and should you be using it? Ideally the skill should require you to provide your own key and document how to obtain it. - Data exposure: The script sends queries and potentially code/queries to an external service (context7.com). Avoid sending sensitive secrets or full source files in queries. Review Context7's privacy policy and ensure you trust the endpoint before sending proprietary code or credentials. Recommended actions: 1) Request the skill author to remove the hardcoded key and update SKILL.md to declare CONTEXT7_API_KEY as required and explain how to get one. 2) If you must use the skill now, set CONTEXT7_API_KEY in your environment to a key you control and sanitize any queries to avoid leaking secrets. 3) If you cannot verify the origin/ownership of the embedded key or the service, do not use the default key and consider not installing the skill until the author provides clarification.
功能分析
Type: OpenClaw Skill Name: context7-api Version: 1.0.0 The skill is classified as suspicious due to the hardcoded API key found in `scripts/context7.py`. While the script's primary function is to fetch documentation from context7.com, the inclusion of a default API key (`ctx7sk-d6069954-149e-4a74-ae8f-85092cbfcd6f`) directly in the source code is a poor security practice and constitutes an information exposure, even if the key's specific permissions are unknown. This is a risky capability without clear malicious intent, but it prevents a benign classification.
能力评估
Purpose & Capability
The name/description match the included script: the tool queries context7.com for library docs. However the skill metadata declares no required credentials or env vars while the script expects CONTEXT7_API_KEY (and falls back to a hardcoded key). The missing declaration of the API credential is an incoherence.
Instruction Scope
SKILL.md instructs running the packaged script to search and fetch context; it does not direct reading unrelated local files or other secrets. But the instructions omit any mention of setting CONTEXT7_API_KEY or the presence of a default key, which may cause silent use of the embedded key when run.
Install Mechanism
No install spec; this is an instruction-only skill with a local Python script. No external download/install step is present, which minimizes install-time risk.
Credentials
The code reads an environment variable CONTEXT7_API_KEY but the skill metadata lists no required env vars or primary credential. Worse, the script embeds a default API key in source — embedding credentials in code is inappropriate and increases risk (key leakage, abuse, or unexpected shared usage).
Persistence & Privilege
The skill does not request permanent presence (always:false) and doesn't attempt to modify other skills or system-wide settings. It runs as an on-demand CLI client.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install context7-api
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /context7-api 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - Python-based Context7 API client for fetching up-to-date library documentation with search and context commands
元数据
Slug context7-api
版本 1.0.0
许可证
累计安装 7
当前安装数 7
历史版本数 1
常见问题

Context7 API Documentation Fetcher 是什么?

Fetch up-to-date library documentation via Context7 API. Use PROACTIVELY when: (1) Working with ANY external library (React, Next.js, Supabase, etc.) (2) User asks about library APIs, patterns, or best practices (3) Implementing features that rely on third-party packages (4) Debugging library-specific issues (5) Need current documentation beyond training data cutoff Always prefer this over guessing library APIs or using outdated knowledge. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2171 次。

如何安装 Context7 API Documentation Fetcher?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install context7-api」即可一键安装,无需额外配置。

Context7 API Documentation Fetcher 是免费的吗?

是的,Context7 API Documentation Fetcher 完全免费(开源免费),可自由下载、安装和使用。

Context7 API Documentation Fetcher 支持哪些平台?

Context7 API Documentation Fetcher 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Context7 API Documentation Fetcher?

由 am-will(@am-will)开发并维护,当前版本 v1.0.0。

💬 留言讨论