/install manage-secrets
Manage Secrets — Self-Service Secret Updates
Trigger the set-secret.yml workflow in the env repo to set or update an environment secret for this persona. The workflow decrypts the SOPS-encrypted secrets.yaml, injects the key/value under envSecrets, re-encrypts, and pushes the change — which triggers a deploy.
Required Environment Variables
AGENT_GITHUB_PAT— a fine-grained PAT with Actions write permission on the env repo. There is no fallback; the PAT must be present.MANAGE_SECRETS_GITHUB_REPO— the GitHubowner/repoof the env repo that containsset-secret.yml(e.g.,myorg/myapp-env).
if [[ -z "$AGENT_GITHUB_PAT" ]]; then
echo "ERROR: AGENT_GITHUB_PAT is not set. Cannot authenticate to trigger set-secret workflow." >&2
exit 1
fi
if [[ -z "$MANAGE_SECRETS_GITHUB_REPO" ]]; then
echo "ERROR: MANAGE_SECRETS_GITHUB_REPO is not set. Cannot determine target repo." >&2
exit 1
fi
export GITHUB_TOKEN="$AGENT_GITHUB_PAT"
Trigger Set-Secret
export GITHUB_TOKEN="$AGENT_GITHUB_PAT"
gh workflow run set-secret.yml \
--repo "$MANAGE_SECRETS_GITHUB_REPO" \
-f persona=\x3CPERSONA> \
-f secret_key=\x3CKEY> \
-f secret_value=\x3CVALUE>
Where:
\x3CPERSONA>is this agent's persona name. Determine it from the Tailscale hostname (tailscale status --self --json | jq -r .Self.HostName→ strip themoltbot-prefix) or the Kubernetes namespace (moltbot-\x3Cpersona>)\x3CKEY>must match^[A-Z][A-Z0-9_]*$(e.g.,TELEGRAM_BOT_TOKEN,GOOGLE_API_KEY)\x3CVALUE>is the secret value to set
Monitor Workflow Status
After triggering, wait a few seconds then check status:
export GITHUB_TOKEN="$AGENT_GITHUB_PAT"
gh run list \
--repo "$MANAGE_SECRETS_GITHUB_REPO" \
--workflow set-secret.yml \
--limit 3
To watch a specific run until completion:
export GITHUB_TOKEN="$AGENT_GITHUB_PAT"
gh run watch \x3CRUN_ID> \
--repo "$MANAGE_SECRETS_GITHUB_REPO"
RBAC
The workflow enforces an RBAC matrix that maps GitHub usernames to allowed personas. Each persona's GitHub user can only set secrets for its own persona; admin users have wildcard access to all personas. Check the set-secret.yml workflow source for the current RBAC matrix.
Example RBAC structure:
{
"admin-user": ["*"],
"bot-user[bot]": ["*"],
"persona-a-user": ["persona-a"],
"persona-b-user": ["persona-b"]
}
Important Notes
- The workflow runs with
concurrency: { group: set-secret, cancel-in-progress: false }— concurrent dispatches are serialized, not cancelled - The secret key must already be a valid uppercase env var name; the workflow rejects invalid formats
- After the workflow commits, it pushes to
main, which triggers the deploy workflow for the affected persona AGENT_GITHUB_PATandMANAGE_SECRETS_GITHUB_REPOmust be set in the environment; the skill has no fallback- If the secret value is unchanged, the workflow exits cleanly with no commit
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install manage-secrets - 安装完成后,直接呼叫该 Skill 的名称或使用
/manage-secrets触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Manage Secrets 是什么?
Set or update environment secrets via the set-secret GitHub Actions workflow. Use when the user asks to update, rotate, or set a secret/token/API key for thi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 76 次。
如何安装 Manage Secrets?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install manage-secrets」即可一键安装,无需额外配置。
Manage Secrets 是免费的吗?
是的,Manage Secrets 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Manage Secrets 支持哪些平台?
Manage Secrets 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Manage Secrets?
由 Xin(@aehrt55)开发并维护,当前版本 v1.0.0。