Enforce a deterministic auth path: one credential source, one helper command path, one startup check, one fallback policy.
.pi/) that always injects auth.ENV_VAR override, then ~/.config//credentials.json .workspace/.pi/ for easy reuse.bashcurlpython3Check once before using this skill:
command -v bash curl python3 >/dev/null
~/.config//... by default.--cred-file at arbitrary workspace files or unrelated secret stores.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_MISSING or AUTH_FAIL_* → use defined fallback path and record one concise note.Use drop-in policy snippets from:
references/snippets.md (HEARTBEAT + AGENTS + helper policy blocks)references/contract.md for the full Keychain Contract patternreferences/snippets.md for ready-to-paste operational snippetsreferences/examples.md for multi-service usage examples (Moltbook, GitHub, Slack)共 1 个版本