| name | 1password |
| description | Manage secrets via 1Password CLI (op). Read, create, and inject secrets. Provides whitelisted access for other skills (ask-curl, GitHub, etc.) via op:// secret references and 1Password Environments.
|
| tags | ["secrets","1password","security","env","credentials"] |
1Password Secret Management
Securely store and retrieve secrets. Never expose them in chat, logs, or files.
Prerequisites
op CLI installed: brew install --cask 1password-cli
- Signed in:
op signin (or service account via OP_SERVICE_ACCOUNT_TOKEN)
- For biometric unlock: enable in 1Password desktop app → Settings → Developer → CLI integration
Core Commands
Read a secret
op read "op://VaultName/ItemName/FieldName"
List vaults
op vault list --format json | jq '.[].name'
List items in a vault
op item list --vault "Development" --format json | jq '.[].title'
Create an item
op item create \
--category login \
--vault "Development" \
--title "Service API Key" \
--field "credential=secret_value_here"
Search items
op item list --format json | jq '.[] | select(.title | test("github"; "i"))'
Environment Files (Secret References)
Create env files with op:// references — secrets are resolved at runtime, never stored on disk.
Setup for ask-curl
mkdir -p ~/.config/ask-curl
cat > ~/.config/ask-curl/env.curl << 'ENV'
GITHUB_TOKEN=op://Development/GitHub PAT/credential
OPENAI_API_KEY=op://Development/OpenAI/api key
SLACK_WEBHOOK=op://Development/Slack Webhook/url
ENV
Use with op run
op run --env-file=~/.config/ask-curl/env.curl -- curl -s \
-H "Authorization: Bearer $GITHUB_TOKEN" \
"https://api.github.com/user"
op run --env-file=~/.config/ask-curl/env.curl -- node script.js
Skill Whitelisting
Control which skills can access which secrets by using separate env files per skill:
~/.config/ask-curl/env.curl # HTTP/API secrets for ask-curl
~/.config/github/env.gh # GitHub-specific secrets
~/.config/openclaw/env.gateway # Gateway/infra secrets
Each env file contains only the op:// references that skill needs — principle of least privilege.
Register a new secret for a skill
op item create --vault "Development" --category login \
--title "New Service" --field "api_key=<secret-value>"
echo 'NEW_SERVICE_KEY=op://Development/New Service/api_key' >> ~/.config/ask-curl/env.curl
1Password Environments (Teams/Pro)
For team workflows, use 1Password Environments instead of local env files:
op environment list
op run --environment "Production" -- ./deploy.sh
Service Accounts (Automation)
For unattended/cron usage where biometric auth isn't available:
export OP_SERVICE_ACCOUNT_TOKEN="ops_..."
op read "op://AutomationVault/Deploy Key/credential"
Safety Rules
- NEVER display secret values — use
op read only in subshells or pipes
- NEVER store secrets in files — only
op:// references in env files
- NEVER commit env files with real secrets — only
op:// refs are safe to commit
- Always use
--vault when creating items to avoid putting secrets in the wrong vault
- Verify before creating —
op item list --vault X to check for duplicates first
- Use separate vaults for different trust levels (Development, Production, Personal)