/install auth-guard
Auth Guard
Enforce a deterministic auth path: one credential source, one helper command path, one startup check, one fallback policy.
Quick Workflow
- Identify the target service endpoint and current failing flow.
- Define canonical credential source (env var first, credentials file second).
- Create/update a helper script in workspace (
.pi/) that always injects auth. - Add a startup/auth-check command that verifies credentials and endpoint access.
- Update HEARTBEAT.md or AGENTS.md to require helper usage (ban raw unauthenticated calls).
- Add explicit fallback behavior for unauthorized states.
Rules to Apply
- Prefer
ENV_VARoverride, then~/.config/\x3Cservice>/credentials.json. - Never embed secrets in logs, memory notes, or chat responses.
- Never call protected endpoints via raw curl if a helper exists.
- Keep fallback behavior explicit and low-noise.
- Store helper scripts in
workspace/.pi/for easy reuse.
Runtime Requirements
bashcurlpython3
Check once before using this skill:
command -v bash curl python3 >/dev/null
Safety Limits
- Pass only trusted credential paths under
~/.config/\x3Cservice>/...by default. - Do not point
--cred-fileat arbitrary workspace files or unrelated secret stores. - Keep probe URLs scoped to the target service auth endpoint.
Startup Auth Check Pattern
Run at session start (or before heartbeat loops):
bash skills/auth-guard/scripts/auth_check.sh \
--service moltbook \
--url 'https://www.moltbook.com/api/v1/feed?sort=new&limit=1' \
--env-var MOLTBOOK_API_KEY \
--cred-file "$HOME/.config/moltbook/credentials.json"
Expected outcomes:
AUTH_OK→ proceed with normal authenticated helper flow.AUTH_MISSINGorAUTH_FAIL_*→ use defined fallback path and record one concise note.
Reusable Snippets
Use drop-in policy snippets from:
references/snippets.md(HEARTBEAT + AGENTS + helper policy blocks)
References
references/contract.mdfor the full Keychain Contract patternreferences/snippets.mdfor ready-to-paste operational snippetsreferences/examples.mdfor multi-service usage examples (Moltbook, GitHub, Slack)
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install auth-guard - After installation, invoke the skill by name or use
/auth-guard - Provide required inputs per the skill's parameter spec and get structured output
What is Auth Guard?
Standardize API credential handling and startup auth checks to prevent "missing key" regressions across sessions. Use when an agent repeatedly loses auth sta... It is an AI Agent Skill for Claude Code / OpenClaw, with 376 downloads so far.
How do I install Auth Guard?
Run "/install auth-guard" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Auth Guard free?
Yes, Auth Guard is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Auth Guard support?
Auth Guard is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Auth Guard?
It is built and maintained by Ada Vale (@adainthelab); the current version is v1.1.1.