360 Secure SkillHub
360 安全技能中心

Key Swap

该 Skill 用于在 OpenClaw 中轮换 Claude Max API token:先向用户索取以 sk-ant- 开头的新 token,再执行本地脚本更新 anthropic:jawadjarvis 与 anthropic:manual 两个配置,最后向用户报告是否成功以及网关是否重启。

jawaddxb
jawaddxb
热度 58.39
最近更新 2026-05-17 13:10:08
分类:安全依赖:代码执行 / 读写文件应用场景:自动化脚本 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add keyswap
Metadata
name
keyswap
description
Rotate Claude Max API token for OpenClaw Anthropic profiles. Use when the user says "swap key", "rotate key", "new key", "keyswap", or provides a new `sk-ant-` token to replace the current one.

Key Rotation

Rotate the Claude Max API token for both Anthropic profiles (anthropic:jawadjarvis and anthropic:manual) in OpenClaw.

Instructions

  1. If the user has not provided a token, ask for one. It must start with sk-ant-.
  2. Run the rotation script:
bash /opt/homebrew/lib/node_modules/openclaw/skills/keyswap/scripts/keyswap.sh <token>
  1. Report the result to the user. On success, confirm both profiles were updated and the gateway restarted. On failure, show the error output.