๐ Credential Vault
name: credential-vault
by chloepark85 ยท published 2026-03-22
$ claw add gh:chloepark85/chloepark85-credential-vault---
name: credential-vault
description: "Encrypted credential storage for OpenClaw agents. Stop storing API keys in plaintext."
license: "MIT-0"
metadata:
openclaw:
emoji: "๐"
requires:
bins: ["uv"]
primaryEnv: "VAULT_MASTER_PASSWORD"
---
# ๐ Credential Vault
Encrypted credential storage for OpenClaw agents. Stop storing API keys in plaintext.
Overview
Credential Vault provides AES-256-GCM encrypted local storage for API keys, tokens, and other secrets. Instead of scattering credentials across `.env` files, centralize them in an encrypted vault with audit logging and expiry tracking.
Features
Installation
cd ~/ubik-collective/systems/ubik-pm/skills/credential-vault
uv syncQuick Start
# Initialize vault (one-time setup)
uv run vault init
# Unlock vault
uv run vault unlock
# Add credentials
uv run vault add OPENAI_API_KEY "sk-..." --tag openai
uv run vault add TAVILY_API_KEY "tvly-..." --tag tavily --expires 2026-12-31
# List credentials
uv run vault list
# Get a credential
uv run vault get OPENAI_API_KEY
# Export for a skill
eval $(uv run vault env --tag tavily)
# Lock when done
uv run vault lockSecurity Model
Encryption
Storage
Permissions
Threat Model
**Protects against:**
**Does NOT protect against:**
Usage Examples
See [EXAMPLE.md](./EXAMPLE.md) for detailed usage patterns.
Commands
`vault init`
Initialize a new vault with a master password.
`vault unlock`
Unlock the vault for the current session.
`vault lock`
Lock the vault and clear session key.
`vault status`
Show vault status (locked/unlocked, credential count).
`vault add KEY_NAME [VALUE] [--tag TAG] [--expires DATE]`
Add or update a credential. If VALUE is omitted, prompts securely.
`vault get KEY_NAME`
Retrieve and decrypt a credential.
`vault list [--tag TAG]`
List all credentials (values masked). Optionally filter by tag.
`vault remove KEY_NAME [-y]`
Remove a credential. Prompts for confirmation unless `-y` is passed.
`vault env [--tag TAG]`
Export credentials as `KEY=VALUE` for environment injection.
**Example:**
eval $(uv run vault env --tag openai)
echo $OPENAI_API_KEY # Now available`vault audit [--last N]`
View recent audit log entries.
`vault expiring [--days N]`
Check for credentials expiring within N days (default: 7).
`vault rotate KEY_NAME [NEW_VALUE]`
Replace a credential with a new value (preserves tags/metadata).
Integration with Skills
Pattern: Inject credentials before running a skill
# Tavily search skill
eval $(uv run vault env --tag tavily)
uv run scripts/search.py "OpenClaw release date"Pattern: Skill checks vault directly
from lib.store import Store
store = Store()
# Assumes vault is unlocked by user beforehand
api_key = store.get("TAVILY_API_KEY")Pattern: Auto-unlock in HEARTBEAT.md
# HEARTBEAT.md
Check if vault is locked. If so, prompt user to unlock before running daily checks.Best Practices
1. **Use tags consistently** โ Tag credentials by skill name for easy filtering
2. **Set expiry dates** โ Track when API keys need rotation
3. **Lock when idle** โ Run `vault lock` when not actively using credentials
4. **One vault per machine** โ Don't sync the vault file across machines
5. **Rotate regularly** โ Use `vault expiring` to track upcoming expirations
6. **Review audit logs** โ Check `vault audit` periodically
Limitations
Troubleshooting
"Vault is locked"
Run `uv run vault unlock` and enter your master password.
"Incorrect master password"
Double-check your password. If forgotten, you'll need to reinitialize (losing all credentials).
"Vault not initialized"
Run `uv run vault init` to create a new vault.
Session key persists after reboot
Session file is cleared on `vault lock`, but not automatically on reboot. Run `vault lock` explicitly.
Development
Run tests
uv run pytestAdd a test
See `tests/test_roundtrip.py` for examples.
License
MIT-0 (public domain equivalent)
More tools from the same signal band
Order food/drinks (็น้ค) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...