Files
chainbase-labs__agentkey/docs/README_zh.md
T
不白 bc740c8015 fix(update-check): ship version.txt inside skill so npx-skills-add installs find it (#26)
## Problem

The skill assumed the whole repo is the plugin root (`PLUGIN_ROOT` =
repo root, `version.txt` at repo root). That holds in Claude Code plugin
mode, where Claude Code injects `CLAUDE_PLUGIN_ROOT`. But the README's
recommended path —

```
npx skills add chainbase-labs/agentkey
```

— uses [vercel-labs/skills](https://github.com/vercel-labs/skills),
which only copies the `skills/agentkey/` subdirectory to
`~/.claude/skills/agentkey/`. The repo-root `version.txt` doesn't come
along.

In that layout, `check-update.sh`'s fallback

```bash
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." 2>/dev/null && pwd)}"
```

resolves `../../..` from `~/.claude/skills/agentkey/scripts/` to
`~/.claude/`, so `VERSION_FILE` points at `~/.claude/version.txt` —
which doesn't exist. `LOCAL_VERSION` ends up empty, the script silently
`exit 0`s at line 35, and **skills-CLI users never see upgrade prompts
at all**.

(Worse case: if some other tool ever drops a `~/.claude/version.txt`,
AgentKey would read it as its own version.)

This is an interface contract mismatch between the two distribution
models, not a one-sided bug — both are valid, but the skill needs to
work under either.

## Fix

1. Move `version.txt` into the skill directory
(`skills/agentkey/version.txt`) so it travels with whichever subset of
the repo gets copied.
2. In `check-update.sh`, anchor on `SKILL_ROOT` (one level above
`scripts/`) instead of an external `CLAUDE_PLUGIN_ROOT`. Both
distribution paths now resolve identically:
   - Plugin: `<repo>/skills/agentkey/version.txt`
   - Skills CLI: `~/.claude/skills/agentkey/version.txt`
3. Point release-please at the new path via `version-file`. The
`plugin.json` `extra-files` entry is unchanged.
4. Update docs (README, `docs/README_zh.md`, `.claude/CLAUDE.md`,
`SECURITY.md`, `claude-pr-review.yml`) to reflect the new path.

## Test plan

- [x] `bash skills/agentkey/scripts/check-update.sh` in repo: resolves
`SKILL_ROOT` to `<repo>/skills/agentkey`, reads `LOCAL_VERSION=1.2.2`
correctly.
- [x] Simulated skills-CLI install: `cp -r skills/agentkey /tmp/sim/`
then ran `bash /tmp/sim/agentkey/scripts/check-update.sh` with
`CLAUDE_PLUGIN_ROOT` unset → resolves `SKILL_ROOT=/tmp/sim/agentkey`,
reads `LOCAL_VERSION=1.2.2` correctly.
- [ ] After merge, the next release-please Release PR should bump
`skills/agentkey/version.txt` (along with `plugin.json` and
`CHANGELOG.md`) — please verify the Release PR diff before merging it.
- [ ] After release, on a fresh `npx skills add chainbase-labs/agentkey`
install, an out-of-date version should now correctly produce
`UPGRADE_AVAILABLE <old> <new>` and trigger the existing AskUserQuestion
prompt flow.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:48:37 +08:00

17 KiB
Raw Blame History

AgentKey

一条命令,解锁 Agent 全网访问能力。
刷推特、搜领英、逛社交媒体、抓网页。无需配置,装好即用。

安装 · 支持平台 · 计费 · 常见问题 · English

Website Console


安装 AgentKey让你的 AI 拥有超能力

AgentKey 是 Agent 生态里的"万能钥匙"。用户在用 Claude、Manus 这些 Agent 时,经常需要获取外部数据(社交媒体、电商、链上数据、各种 API但要么要自己找 API 填 Key要么根本找不到解决方案。

装了 AgentKeyAgent 就自动具备了这些数据获取能力。无需订阅,无需注册任何服务,充值即用。

右上角 Star 本项目,我们会持续更新平台接入变化,有新版本自动通知你。


使用场景

你对 Agent 说 没装会怎样 装了 AgentKey 后
🐦 马斯克最近在推特上在说什么 看不了,搜不到完整推文 一次拉全相关推文,帮你总结结论
📕 Ins / 小红书 上大家怎么看这个产品 打不开,必须登录才能看 直接抓真实笔记,按口碑帮你归纳
📺 这个 YouTube / B 站视频讲了什么 看不了,字幕拿不到 自动看视频/字幕,提炼要点
📖 去 Reddit 上看看有没有人遇到同样的痛点 403 被封,帖子进不去 找到相关帖子,把解法抽出来
👔 帮我看一下这家竞品 / 候选人的 LinkedIn 进不去,权限烦还老 403 打开公司/个人页,提炼关键信息
🎵 帮我看看抖音 / TikTok 最近哪些话题最热 刷不动榜单,只能自己刷 抓热门话题和标签,帮你总结趋势
🌐 帮我看看这个网页写了啥 抓回来一堆 HTML没法读 把正文抠出来,用几段话讲清楚
📦 这个 GitHub 仓库是干嘛的? 只能自己点进仓库慢慢翻 看 README、Issue一句话说清
🧾 帮我看看这个地址/基金最近在买什么 自己去区块浏览器一笔笔点 自动汇总最近交易,帮你看仓位变化

没有安装之前10 个任务10 个 Key10 份账单。

Agent 就像半智能体,完全无法自主行动,不断需要人类帮助搜寻解决方案,管理复杂度直线上升。

现在,一个 AgentKey所有服务全部搞定。AgentKey 统一了 AI 干活需要的一切外部访问。


第一次来?先到网页上看看

在动命令行之前,你可以先在浏览器里熟悉一下 AgentKey —— 官网和后台讲得比 README 更直观。

  • 🌐 agentkey.app —— 产品介绍、支持的平台、在线演示、计费说明
  • 🎛️ console.agentkey.app —— 注册账号、充值、管理 API Key、查看用量

下面的一条命令是把 AgentKey 接进你的 AI Agent。如果只是想先看看上面两个链接是更友好的入口。


安装

一条命令。浏览器弹出登录,完成即可。安装脚本会自动识别你机器上每一个支持的 Agent已支持 40+,常见的如 Claude Code、Codex、Gemini CLI、Cursor CLI 等),逐个配好。

macOS / Linux

curl -fsSL https://agentkey.app/install.sh | bash

WindowsPowerShell

irm https://agentkey.app/install.ps1 | iex

重启 Agent然后问它一些需要联网的问题

"马斯克最近在推特上在说什么?"

就这样。不用复制 API Key也不用改 JSON。

想只装到特定 Agent 或在 CI 里跑?→ 看 常见问题 里的"进阶安装"条目。


装好之后能干什么

AgentKey 在云端维护与各平台的对接 —— 你不需要额外开账号,也不用再填 Key。

类别 服务
搜索  Brave ·  Perplexity · Tavily · Serper
抓取 Firecrawl · Jina Reader · ScrapeNinja
链上 / 加密 Chainbase ·  CoinMarketCap · Dexscreener
社交媒体与内容  Bilibili ·  Douyin ·  Instagram ·  Kuaishou · Lemon8 · LinkedIn ·  Reddit ·  Twitter (X) ·  Weibo ·  Weixin ·  Xiaohongshu维护中 ·  YouTube ·  Zhihu

规划中: 金融数据 · 电商平台 · 地图与天气


计费相关

没有月费。用多少付多少。 充值自定义金额,按实际 Credit 消费:

你让 Agent 做的事 大概花多少
搜网页 $0.001
查币的情况 $0.003
读社交媒体 $0.006
每日定时任务 每月 $510

常见问题

安全吗?

安全。AgentKey 是 Agent 的"万能钥匙"—— 一个平台帮你的 Agent 解锁外部能力。按架构设计,我们就看不到你的本地文件、凭证或 Agent 的对话,也没条件采集。

和 Claude / ChatGPT 自带的能力有什么不一样?

Claude 与 ChatGPT 的原生联网与平台覆盖有限往往触达不到推特、小红书、链上数据等。AgentKey 让你的 Agent 能覆盖这些场景(具体以当前产品能力为准)。

额度用完了怎么办?

充值即可;无自动续费,无隐藏扣款。

怎么更新?

默认不用你管AgentKey 会自己更新。 你的 MCP 配置使用的是 npx -y @agentkey/mcp,每次 Agent 重启都会自动解析到最新发布版本。Claude Code 插件模式下还会在运行时自动检查 GitHub Release发现新版本就静默更新并提示

Claude: AgentKey Skill updated to v1.1.0.

如果你想强制手动更新:

# 拉最新版的 Skill 内容
npx skills update chainbase-labs/agentkey

# 锁定特定版本
npx skills add chainbase-labs/agentkey@v1.0.0

只有在需要换 API Key 时才需要再跑一次 npx -y @agentkey/mcp --auth-login

怎么卸载?

一条命令,清理所有 Agent 与配置。

macOS / Linux

curl -fsSL https://agentkey.app/uninstall.sh | bash

WindowsPowerShell

irm https://agentkey.app/uninstall.ps1 | iex

把 Skill 从所有 Agent 里清理掉,同时删除各 MCP 客户端里的 agentkey 条目 + API Key清理缓存和日志。加 --keep-marketplacebash/ -KeepMarketplacePowerShell可以保留 Claude Code 的 marketplace 条目。

想手动两步卸载?

# 1. 把 Skill 从所有 Agent 里移除
npx skills remove chainbase-labs/agentkey

# 2. 在各 MCP 客户端配置里删掉 mcpServers 下的 "agentkey" 条目:
#    - Claude Code    ~/.claude.json
#    - Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json  (macOS)
#                      %APPDATA%\Claude\claude_desktop_config.json                       (Windows)
#    - Cursor         ~/.cursor/mcp.json

一键卸载脚本还会额外清 npm/npx 缓存、旧的 shell rc 残留、CLAUDE.md 里的 AgentKey 段、MCP stdio 日志 —— 想一次清干净就用它。

好像哪里不对?怎么排查?

在 Agent 里试试 /agentkey status —— 会诊断 MCP 配置、版本、连通性。

可用的 Slash 命令:

命令 作用
/agentkey 主入口:数据查询时自动触发,通常不需要手动调用
/agentkey setup 初始安装:配置 API Key + 验证 MCP 连通性
/agentkey status 诊断当前配置状态MCP、版本、连通性测试

还是解决不了?看下面"怎么获取帮助"那条。

进阶安装CI / 指定 Agent / 手动两步)

安装器会自动探测本机已安装的 AI Agent依据 vercel-labs/skills 支持列表 比对配置目录和命令行工具),自动选中它们 —— 不再弹多选框。需要覆盖时用下面的旗标:

安装器参数:

# 非交互模式CI / 无人值守):安装到所有检测到的 Agent不询问
curl -fsSL https://agentkey.app/install.sh | bash -s -- --yes

# 看一下安装器在本机会自动选中哪些 Agent看完即退出
curl -fsSL https://agentkey.app/install.sh | bash -s -- --list-agents

# 只安装到指定的 Agent覆盖自动检测结果
curl -fsSL https://agentkey.app/install.sh | bash -s -- --only claude-code,cursor

# 跳过我们的检测,让 skills CLI 自己识别全部 Agent
curl -fsSL https://agentkey.app/install.sh | bash -s -- --all-agents

# 只装 Skill 或只做 MCP 授权
curl -fsSL https://agentkey.app/install.sh | bash -s -- --skip-mcp
curl -fsSL https://agentkey.app/install.sh | bash -s -- --skip-skill

# 即使本机已经配置过 AgentKey 也强制重新走一次授权
curl -fsSL https://agentkey.app/install.sh | bash -s -- --force-mcp

PowerShell 对应参数:-Yes-ListAgents-Only-AllAgents-SkipMcp-SkipSkill-ForceMcp

手动两步安装(想自己跑两条底层命令,或一键脚本在你的环境里跑不起来):

# 1. 把 Skill 装进所有检测到的 Agent
npx skills add chainbase-labs/agentkey

# 2. 浏览器授权并注册 MCP Server
npx -y @agentkey/mcp --auth-login
在 SSH / Docker / OpenClaw 远程通道里安装

如果安装命令是在你看不到屏幕的机器上跑(远程 SSH 服务器、Docker 容器、由手机触发的 OpenClaw 运行时),默认 --auth-login 会在远端"成功"打开一个你看不见的浏览器,然后你只能盯着 "Waiting for authorization..." 卡死。

安装器会自动识别这种场景,切换到"扫码授权"流程:终端里直接打印授权 URL 加二维码,不再尝试本地开浏览器。触发条件(任一命中即判定为远程):

  • ~/.openclaw/ 目录存在OpenClaw 运行时)
  • $SSH_CONNECTION / $SSH_TTY 已设置
  • Linux 且无 $DISPLAY / $WAYLAND_DISPLAY

需要强制其中一种模式:

# 强制远程模式URL + 二维码,不开浏览器)
curl -fsSL https://agentkey.app/install.sh | bash -s -- --remote

# 强制本地模式(自动开浏览器,无视启发式判断)
curl -fsSL https://agentkey.app/install.sh | bash -s -- --local

PowerShell-Remote / -Local

如果完全不想走 URL/二维码流程、想自己手动粘 Key可以用 npx -y @agentkey/mcp --setup —— 交互式向导,问你要 Key 并让你勾选要写入的 MCP 客户端。

我的 Agent 没被自动配置,怎么手动设置?

MCP 自动配置覆盖 Claude CodeClaude DesktopCursor。如果你用的是 Codex / OpenCode / Gemini CLI / Hermes / Manus(或 Linux 版 Claude DesktopSkill 会正常装上,但你需要把下面这段 MCP 片段手动贴到该 Agent 的配置里(路径因 Agent 而异):

{
  "mcpServers": {
    "agentkey": {
      "command": "npx",
      "args": ["-y", "@agentkey/mcp"],
      "env": { "AGENTKEY_API_KEY": "ak_..." }
    }
  }
}

写完后重启 Agent。你第一次在对话里触发 Skill 时,它也会引导你走这一步。

能自托管 / 本地开发吗?

从本地 checkout 安装:

git clone https://github.com/chainbase-labs/agentkey.git
cd agentkey

# 1. 把当前工作副本装进所有检测到的 Agent
npx skills add .

# 2. 注册 MCP Server只需一次
npx -y @agentkey/mcp --auth-login

npx skills add . 支持本地路径(也支持 file:// URL改完 skills/agentkey/SKILL.md 再跑一次就能立刻生效是日常迭代最快的路径。MCP 注册步骤每台机器只需一次。

想改 MCP Server 本身? 在 MCP 配置里把 command 换成 node /path/to/AgentKey-Server/mcp-server/dist/index.js,然后在 server 仓库里 pnpm --filter @agentkey/mcp build,就能在本地验证改动。

Claude Code 插件模式 —— 把仓库当成本地 marketplace 安装:

claude plugin marketplace add /absolute/path/to/agentkey
claude plugin install agentkey

编辑文件后 claude plugin update agentkey 重新加载。日常 Skill 调整用 skills CLI 就够;只有在验证 Claude Code 插件内部机制(例如 CLAUDE_PLUGIN_OPTION_* 环境变量接线)时才走插件路径。

仓库结构:

agentkey/
├── .claude-plugin/plugin.json   # Claude Code 插件清单
├── .mcp.json                    # 作为插件安装时使用
├── skills/agentkey/
│   ├── SKILL.md                 # 决策树 & 路由规则
│   ├── scripts/                 # check-mcp / check-update 辅助脚本
│   └── version.txt              # 由 release-please 自动维护
└── scripts/
    ├── install.sh               # 一键安装脚本mac/linux
    ├── install.ps1              # Windows PowerShell 安装脚本
    ├── uninstall.sh             # 一键卸载脚本mac/linux
    └── uninstall.ps1            # Windows PowerShell 卸载脚本

发布新版本Maintainer 发版由 release-please 自动触发。合并一个 feat:fix: 的 PR 后release-please 会开一个 Release PR自动 bump skills/agentkey/version.txtplugin.jsonCHANGELOG.md。合并这个 Release PR 即会创建 tag + GitHub Release + 上传 agentkey.skill 产物。

目前产品是什么阶段?

早期内测阶段,产品仍有不少不完善之处,还请担待。功能建议与问题反馈欢迎通过 GitHub Issues 或下面的 Telegram 与我们联系。

怎么获取帮助 / 反馈 bug / 关注更新?
  • Telegram t.me/AgentKey_Official —— 通用咨询、支持、需求反馈
  • 问题反馈: GitHub Issues
  • 发布公告: Star 本项目即可在有新版本时收到通知

Star History Chart