#Recommended approach
1 messages · Page 1 of 1 (latest)
Recommended pattern: yes, use SecretRef for production credentials, but don’t treat secrets.json as the only/primary option.
For skills, the clean path is:
{
skills: {
entries: {
notion: {
apiKey: { source: "env", provider: "default", id: "NOTION_API_KEY" }
},
clay: {
apiKey: { source: "env", provider: "default", id: "CLAY_API_KEY" }
}
}
}
}
That works when the skill declares metadata.openclaw.primaryEnv; OpenClaw resolves skills.entries.<skill>.apiKey and injects it as that env var for the agent run.
For production, my preference order is:
source: "env"if your process manager / container / host secret system already injects env vars.source: "exec"for a real secret manager bridge, e.g. 1Password/Vault/AWS/etc. Good for production if you want OpenClaw to never store the secret value.source: "file"with~/.openclaw/secrets.jsonor/etc/openclaw/secrets.jsononly for single-host/simple deployments, with tight ownership/permissions. It’s supported, but I’d treat it as “local secret file”, not a full production secrets manager.
For Slack specifically, if you mean the built-in channel, use the channel SecretRef fields (channels.slack.botToken, appToken, signingSecret, etc.) rather than a skill-level key.
Docs:
https://docs.openclaw.ai/gateway/secrets
https://docs.openclaw.ai/tools/skills-config