From agi-super-team
Manages API key rotation across providers by updating pass vault entries, rebuilding environment files, and restarting gateway processes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agi-super-team:key-rotationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**触发词**: "换key", "更换key", "替换key", "rotate key", "key rotation", "更新密钥", "换API key", "给XX换key"
触发词: "换key", "更换key", "替换key", "rotate key", "key rotation", "更新密钥", "换API key", "给XX换key"
统一管理 OpenClaw 所有 API key 的轮换流程。所有 key 通过 pass 金库存储,通过 ~/.openclaw/.env 分发到 OpenClaw Gateway 和所有 Agent。
pass (金库)
↓ pass show api/xxx
~/.openclaw/.env (运行时环境变量文件)
↓ EnvironmentFile= (systemd)
openclaw-gateway 进程环境变量
↓ ${VAR_NAME} 引用
openclaw.json + agents/*/agent/models.json
Step 1: 确认新 key
# 用户提供新 key 后,存入 pass
pass insert api/<provider-name>
# 输入新 key
Step 2: 更新 .env
# 运行 env 重建脚本
bash ~/.openclaw/skills/key-rotation/scripts/rebuild-env.sh
Step 3: 重启 Gateway
systemctl --user daemon-reload
systemctl --user restart openclaw-gateway
Step 4: 验证
bash ~/.openclaw/skills/key-rotation/scripts/verify-keys.sh
| 供应商 | 环境变量 | pass 路径 | 用途 |
|---|---|---|---|
| ZAI | ZAI_API_KEY | api/zai | GLM-5 系列 |
| Xingsuancode | XINGSUANCODE_KEY | api/xingsuancode | Claude Opus/Sonnet |
| XSC Backup | XSC_BACKUP_API_KEY | api/xingsuancode | 同上备份 |
| Xingjiabiapi | XINGJIABIAPI_KEY | api/xingjiabiapi | 多模型中转 |
| AIXN | AIXN_API_KEY | api/aixn | Claude 中转 |
| xAI | XAI_API_KEY | api/xai | Grok 系列 |
| Moonshot | MOONSHOT_API_KEY | api/kimi | Kimi K2.5 |
| Minimax | MINIMAX_API_KEY | api/minimax | MiniMax M2/M2.5 |
| WoW | WOW_API_KEY | api/wow | 多模型中转 |
| Xinyuan | XINYUAN_API_KEY | api/xinyuan | 多模型中转 |
| OpenRouter | OPENROUTER_API_KEY | api/openrouter-vip | 多模型中转 |
| GitHub Copilot | GITHUB_COPILOT_KEY | api/github-copilot | GPT/Gemini/Claude |
| GitHub Copilot (Agents) | GITHUB_COPILOT_AGENTS_KEY | api/github-copilot-agents | Agent用 |
| Ollama | OLLAMA_API_KEY | - | 固定值 ollama |
| Google AI Studio | GOOGLE_AI_STUDIO_KEY | api/google-ai-studio | Gemini/Veo/Imagen |
| Brave Search | BRAVE_API_KEY | api/brave | 网络搜索 |
| DeepSeek | DEEPSEEK_API_KEY | api/deepseek | DeepSeek 系列 |
| Exa | EXA_API_KEY | api/exa | 语义搜索 |
| Perplexity | PERPLEXITY_API_KEY | api/perplexity | AI 搜索 |
| Tavily | TAVILY_API_KEY | api/tavily | 网络搜索 |
| Firecrawl | FIREFRAWL_API_KEY | api/firecrawl | 网页爬取 |
| KlingAI | KLINGAI_API_KEY | api/klingai | 视频生成 |
| Notion | NOTION_API_KEY | api/notion | Notion API |
***REDACTED*** 遮罩.env 从 pass 生成,不手动编辑npx claudepluginhub aaaaqwq/agi-super-team --plugin agi-super-teamRotates and syncs API keys across multi-agent workspaces via environment variable substitution. Audits hardcoded keys, migrates to `${ENV_VAR}` pattern, and updates key storage in one command.
Guides key rotation management with step-by-step instructions, best practices, and production-ready configurations for enterprise security.
Designs and audits API key subsystems: entropy, scoping, transmission, hashed storage, rotation strategy.