skills/tier-1-foundation/secrets-manager/SKILL.md
Set up and configure cloud secrets management for your AI agent. Guides users through platform selection (GCP, AWS, Azure, 1Password, Doppler, HashiCorp Vault), account setup, CLI configuration, and secure credential storage.
npx skillsauth add pbc-os/agent-skills-public secrets-managerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Right now you're chatting with an AI. That's 1% of what's possible.
Without secrets management, your AI agent is a brain in a jar — it can think, but it can't do anything:
┌─────────────────────────────────────────────────────┐
│ WITHOUT SECRETS │
│ │
│ You ──── text ────► [ AI Agent ] ──── text ───► You
│ (brain in a jar) │
│ │
│ ❌ Can't read email ❌ Can't run ads │
│ ❌ Can't check inventory ❌ Can't pull analytics │
│ ❌ Can't manage orders ❌ Can't post content │
│ ❌ Can't send invoices ❌ Can't automate anything│
│ │
│ It's a walkie-talkie. You talk. It talks back. │
│ That's it. │
└─────────────────────────────────────────────────────┘
Now look what happens when you give the agent secure access to your tools:
┌──────────────────────────────────────────────────────────────────┐
│ WITH SECRETS MANAGEMENT │
│ │
│ ┌──────────┐ │
│ ┌────────►│ Gmail │ Read/send email │
│ │ └──────────┘ │
│ │ ┌──────────┐ │
│ ├────────►│ Square │ POS, inventory, orders │
│ │ └──────────┘ │
│ │ ┌──────────┐ │
│ You ──►[ AI AGENT ]─┼────────►│ Google Ads│ Run campaigns │
│ │ └──────────┘ │
│ │ ┌──────────┐ │
│ ├────────►│Mailchimp │ Email marketing │
│ │ └──────────┘ │
│ │ ┌──────────┐ │
│ ├────────►│QuickBooks│ Accounting │
│ │ └──────────┘ │
│ │ ┌──────────┐ │
│ └────────►│ Walmart │ Ecommerce │
│ └──────────┘ │
│ │
│ Every API key = a new superpower. │
│ Secrets management = the secure vault that holds them all. │
└──────────────────────────────────────────────────────────────────┘
Here's how secrets flow from vault to action:
┌─────────────┐ startup ┌──────────────┐ env vars ┌──────────┐ API calls ┌──────────┐
│ Cloud Vault │─────────────►│ Gateway │──────────────►│ AI Agent │───────────────►│ Services │
│ (encrypted) │ fetch keys │ Wrapper.sh │ in memory │ │ authenticated │ (Gmail, │
│ │ │ │ (not on disk) │ │ │ Square, │
└─────────────┘ └──────────────┘ └──────────┘ │ etc.) │
└──────────┘
SECURE SECURE SECURE AUTHORIZED
at rest, encrypted fetched once at boot never written to disk full API access
Think of it this way: Secrets management gives your AI agent keys to the building instead of just a walkie-talkie. Every integration you'll ever add — email, POS, ads, ecommerce — starts here.
This is the foundation. Set it up once, and every future integration becomes a 5-minute job instead of an hour of fumbling with .env files and hardcoded keys.
Ask the user: "Which secrets platform do you want to use? Here are your options:"
| Platform | Best For | Pricing | Complexity | |----------|----------|---------|------------| | GCP Secret Manager | Google ecosystem, cost-effective | 6 active secrets free, ~$0.06/secret/mo | Medium | | AWS Secrets Manager | AWS ecosystem, enterprise | $0.40/secret/month | Medium | | Azure Key Vault | Microsoft/Azure ecosystem | $0.03/10k operations | Medium | | 1Password Connect | Teams already on 1Password | Business plan required | Low | | Doppler | Developer-focused, multi-env | Free tier available | Low | | HashiCorp Vault | Self-hosted, max control | Free (self-hosted) | High |
Not sure? Ask me to help you decide. Tell me what cloud services you already use, your team size, and your budget. I'll recommend one.
For a detailed side-by-side comparison, load references/platform-comparison.md.
After the user selects a platform, load the corresponding reference file:
| Selection | Reference File |
|-----------|---------------|
| GCP | references/gcp-secret-manager.md |
| AWS | references/aws-secrets-manager.md |
| Azure | references/azure-key-vault.md |
| 1Password | references/1password-connect.md |
| Doppler | references/doppler.md |
| HashiCorp Vault | references/hashicorp-vault.md |
Read the selected platform's reference file and walk the user through it step by step.
Guidelines for the agent:
echo "${VAR:+set}").Once the platform is configured, wire secrets into however your agent starts. The pattern is the same for any runtime (Claude Code, Codex CLI, Gemini CLI, a cron-triggered script, a long-running daemon): wrap the start command with a script that fetches secrets into env vars first, then execs the agent. Secrets stay in memory — they never touch disk.
Create ~/.config/ai-agent/wrapper.sh:
#!/bin/bash
# wrapper.sh — Fetch secrets at startup, export as env vars, then launch your agent.
# Secrets are held in memory only — never written to disk.
set -euo pipefail
# ------------------------------------------------------------------
# Helper: fetch a single secret (replace with your platform's CLI)
# ------------------------------------------------------------------
# GCP: gcloud secrets versions access latest --secret="$1" --project=YOUR_PROJECT
# AWS: aws secretsmanager get-secret-value --secret-id "$1" --query SecretString --output text
# Azure: az keyvault secret show --vault-name YOUR_VAULT --name "$1" --query value -o tsv
# 1Password: op read "op://vault/$1/credential"
# Doppler: doppler secrets get "$1" --plain
# Vault: vault kv get -field=value secret/"$1"
# ------------------------------------------------------------------
fetch_secret() {
# Uncomment and customize ONE of the lines above
echo "REPLACE_ME"
}
# ------------------------------------------------------------------
# Export secrets as environment variables
# ------------------------------------------------------------------
export MY_API_KEY=$(fetch_secret "my-api-key")
export ANOTHER_SECRET=$(fetch_secret "another-secret")
# Add more as needed...
# ------------------------------------------------------------------
# Launch your agent. Replace the line below with your runtime's
# start command. Examples:
# exec claude # Claude Code
# exec codex # Codex CLI
# exec gemini # Gemini CLI
# exec "$@" # pass-through (recommended if you alias this script)
# ------------------------------------------------------------------
exec "$@"
mkdir -p ~/.config/ai-agent
chmod +x ~/.config/ai-agent/wrapper.sh
Most agent runtimes support ${VAR_NAME} substitution in their config files. For example:
{
"integrations": {
"myService": {
"apiKey": "${MY_API_KEY}"
}
}
}
If your agent doesn't support env-var substitution in its config, your code can read os.environ["MY_API_KEY"] (Python), process.env.MY_API_KEY (Node), etc.
Instead of running claude (or whatever your agent's start command is) directly, run it through the wrapper:
~/.config/ai-agent/wrapper.sh claude
Or add a shell alias so you don't have to think about it:
# ~/.zshrc or ~/.bashrc
alias claude='~/.config/ai-agent/wrapper.sh claude'
What you should see: Your agent starts normally with all the env vars populated from the vault.
From inside your agent session, ask it to echo one of the env vars (not the real secret value — just confirm the variable is set):
echo "${MY_API_KEY:+set}" # prints "set" if populated, nothing otherwise
If it prints set, secrets are flowing correctly.
Run the verification script to confirm everything is wired up:
bash scripts/verify_access.sh
What you should see: Green checkmarks for CLI detection, authentication, and secret access.
If any check fails, the script prints exactly what went wrong and how to fix it.
Run the test script to create, read, and delete a test secret:
bash scripts/test_secret.sh
This creates ai-agent-test-secret, reads it back, verifies the value, and cleans up after itself.
You now have a secure secrets pipeline. Here's what to do with it:
fetch_secret + export line for each new keyEvery integration you add from here is a 5-minute job. The hard part is done.
1. Store the secret: <platform-cli> create-secret "secret-name" "secret-value"
2. Update wrapper: export SECRET_NAME=$(fetch_secret "secret-name")
3. Update config: Add ${SECRET_NAME} to your agent's config if needed
4. Relaunch agent: ~/.config/ai-agent/wrapper.sh <your-agent-command>
.env files, code, or config filestools
Generate and iteratively refine USPTO-style patent figure drawings from provisional patent application markdown files, using nano-banana for v1 generation and targeted single-fix edits for v2+ iteration.
data-ai
Weekly revenue / sales forecasting for small businesses with multiple locations or product lines. Blends recent trend + seasonal baseline + YoY growth with per-entity holiday multipliers and week-of-month adjustments. Ships autoresearch-compatible eval and parameters so you can tune it on your own historical data.
data-ai
Analyze email, calendar, and file patterns to discover repeatable workflows that AI agents can automate.
testing
Automated daily digest for small business owners. Combines email triage, calendar agenda, open tasks, and business KPIs into a single morning briefing. Composable — works with whatever data sources are available. Urgent emails require body inspection and explicit escalation signals — never classified from sender/timing metadata alone.