agentsclimarketplace

Key rotation

Skill aAAaqwq/AGI-Super-Team/skills/key-rotation

14 AI executives powered by legendary minds (Musk/Buffett/Simons/Feynman) — deploy your virtual C-Suite in one git clone.

Install
npx -y skills add aAAaqwq/AGI-Super-Team --skill key-rotation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

API key rotation manager — rotate provider keys across all agent workspaces

SKILL.md

3.1 KB, as published. Nobody here has run it

Key Rotation Skill

触发词: "换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

Key 换新流程

用户说 "给 XX 换 key" 时,执行以下步骤:

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 路径 对照表

供应商环境变量pass 路径用途
ZAIZAI_API_KEYapi/zaiGLM-5 系列
XingsuancodeXINGSUANCODE_KEYapi/xingsuancodeClaude Opus/Sonnet
XSC BackupXSC_BACKUP_API_KEYapi/xingsuancode同上备份
XingjiabiapiXINGJIABIAPI_KEYapi/xingjiabiapi多模型中转
AIXNAIXN_API_KEYapi/aixnClaude 中转
xAIXAI_API_KEYapi/xaiGrok 系列
MoonshotMOONSHOT_API_KEYapi/kimiKimi K2.5
MinimaxMINIMAX_API_KEYapi/minimaxMiniMax M2/M2.5
WoWWOW_API_KEYapi/wow多模型中转
XinyuanXINYUAN_API_KEYapi/xinyuan多模型中转
OpenRouterOPENROUTER_API_KEYapi/openrouter-vip多模型中转
GitHub CopilotGITHUB_COPILOT_KEYapi/github-copilotGPT/Gemini/Claude
GitHub Copilot (Agents)GITHUB_COPILOT_AGENTS_KEYapi/github-copilot-agentsAgent用
OllamaOLLAMA_API_KEY-固定值 ollama
Google AI StudioGOOGLE_AI_STUDIO_KEYapi/google-ai-studioGemini/Veo/Imagen
Brave SearchBRAVE_API_KEYapi/brave网络搜索
DeepSeekDEEPSEEK_API_KEYapi/deepseekDeepSeek 系列
ExaEXA_API_KEYapi/exa语义搜索
PerplexityPERPLEXITY_API_KEYapi/perplexityAI 搜索
TavilyTAVILY_API_KEYapi/tavily网络搜索
FirecrawlFIREFRAWL_API_KEYapi/firecrawl网页爬取
KlingAIKLINGAI_API_KEYapi/klingai视频生成
NotionNOTION_API_KEYapi/notionNotion API

安全原则

  1. 永不明文打印 key — 所有输出用 ***REDACTED*** 遮罩
  2. pass 是唯一真相源.env 从 pass 生成,不手动编辑
  3. 换 key 后必须验证 — 至少调一次 API 确认可用
  4. .env 权限 600 — 仅 owner 可读写

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.