agentsclimarketplace

Key rotation

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

API key rotation manager — rotate provider keys across all agent workspacesFrom its SKILL.md

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.

SKILL.md

3.1 KB, ~1.1k tokens by cl100k_base, 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 可读写

What ships with it: 3 files

6.1 KB alongside SKILL.md, 3 of them executable

scripts/

Gives 0 of the 12 instructions most secrets credentials skills give in ~1.1k tokens

Counted across 219 of the 226 authors here whose files we hold, read 2026-09-06

  • Rotate secrets regularlyin 12 of 219, across 9 files
  • Use different secrets per environmentin 10 of 219, across 7 files
  • Mask secrets in logsin 10 of 219, across 7 files
  • Enable audit loggingin 10 of 219, across 9 files
  • Encrypt secrets at restin 9 of 219, across 6 files
  • Use short-lived tokens when possiblein 9 of 219, across 6 files
  • Rotate exposed credentials immediatelyin 9 of 219, across 6 files
  • Use hierarchical numbering for numbered sequencesin 9 of 219
  • Identify secret types, owners, and rotation requirementsin 8 of 219, across 5 files
  • Choose a secrets backend and access modelin 8 of 219, across 5 files
  • Validate rotation and audit loggingin 8 of 219, across 5 files
  • Document secret requirementsin 8 of 219, across 5 files

Said here and by no other author read

  • store the new key in pass
  • rebuild the .env file from pass
  • reload the systemd daemon before restarting
  • restart the gateway service after updating
  • verify each rotated key with one API call
  • mask all key output as redacted

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. 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.