通过 context7_search 与 context7_get_docs 工具,为 DSH 智能体从 context7.com 获取最新、可锁定版本的库文档与代码示例。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-context7
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:Nrxous/dsh-context7
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本。请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Up-to-date library documentation for DeepSeek Harness, powered by Context7.
This host-only plugin connects DSH to the official Context7 Public API v2, so your agent can always fetch current, version-pinned documentation and code examples for software libraries. It registers two model tools:
| Tool | Purpose |
|---|---|
context7_search |
Search libraries by name (optionally with a natural-language question for LLM ranking). Returns matches with their Context7 library IDs (e.g. /vercel/next.js). |
context7_get_docs |
Fetch LLM-reranked documentation for one library by ID (or bare name, auto-resolved) plus a natural-language question: code snippets, doc snippets, library rules and source URLs. Supports version pinning (e.g. v15.1.8) and a fast low-latency mode. |
No API key is required — Context7 allows keyless access with low rate limits. For higher limits, get a ctx7sk-prefixed key from the Context7 dashboard.
Installing
From npm (published):
dsh plugin --profile web add dsh-context7
From GitHub:
dsh plugin --profile web add github:Nrxous/dsh-context7
Restart DSH after installing. The tools are called automatically whenever the model needs current library docs, or you can trigger them by asking directly.
Configuring the API key (optional)
Set config.apiKey in your profile patch layer — ~/.dsh/profiles/<name>/cordis.patch.yml — which is applied after every bundle layer and survives plugin updates:
- id: dsh-context7
config:
apiKey: ctx7sk_your-key-here
Save and restart DSH. With a key set, requests carry an Authorization: Bearer header for higher rate limits. Without one, the plugin keeps working at keyless limits.
Development
Pure JS plugin, no build step — main: src/index.js, runtime dependency @deepseek-ai/schemastery (provided by the host).
# Hot-mount into the web profile (no restart)
dev_install_package <this-directory>
# or inside the injector environment
dev_inject_plugin <this-directory>
License
Apache-2.0
链接
同类插件
superdesigndev/treg★ 477
给 Agent 的工具目录:按「要做的事」检索约 2,600 个外部接口(SEO 与 SERP、外链、社交、人物与公司信息补全、广告库、抓取),查看参数与单次调用价格后直接调用,凭据由服务端注入。附带技能,MCP 行在未设置 TREG_TOKEN 前保持禁用。
zhaoolee/notes#dsh-plugin★ 147
将 DSH 对话导出为锤子便签风格 PNG,或在配置的账号工作区中新建和更新 Markdown 便签。
taxueseek/argo#dsh-plugin★ 101
专为 agent 打造的搜索工具:多语言,覆盖中文/英文/学术/代码/购物/金融/新闻/百科。
omdsh-dev/dsh-data-agent★ 55
让 AI 帮你连数据库、写 SQL。
heartleo/hn-cli#hacker-news★ 50
用于获取 Hacker News 榜单、讨论串、搜索和用户资料的工具。
geml-spec/geml#integrations/dsh-plugin★ 24
按块寻址的文档读写:MCP server 提供 geml_get / geml_set / geml_check 等工具,Agent 只取回或改写 Markdown、GEML 文档中的某一个块,而不是整篇文件。另带 GEML 写作技能,以及把项目调用图构建为 GEML codemap 并浏览的代码图谱技能。