1password – Security skill for AI agents
Set up op CLI, sign in, and read or inject secrets.
Install the 1password skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/1password-c54c8.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /1password – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/1password-c54c8.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $1password – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/1password-c54c8.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /1password – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/1password-c54c8.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /1password – then describe the task you want done.
SKILL.md content
1Password CLI
Use this skill when the user wants secrets managed through 1Password instead of plaintext env vars or files.
Requirements
- 1Password account
- 1Password CLI (
op) installed - One of: desktop app integration, service account token (
OP_SERVICE_ACCOUNT_TOKEN), or Connect server tmuxavailable for stable authenticated sessions during Hermes terminal calls (desktop app flow only)
When to Use
- Install or configure 1Password CLI
- Sign in with
op signin - Read secret references like
op://Vault/Item/field - Inject secrets into config/templates using
op inject - Run commands with secret env vars via
op run
Authentication Methods
Service Account (recommended for Hermes)
Set OP_SERVICE_ACCOUNT_TOKEN in ${HERMES_HOME:-~/.hermes}/.env (the skill will prompt for this on first load).
No desktop app needed. Supports op read, op inject, op run.
export OP_SERVICE_ACCOUNT_TOKEN="your-token-here"
op whoami # verify — should show Type: SERVICE_ACCOUNTDesktop App Integration (interactive)
1. Enable in 1Password desktop app: Settings → Developer → Integrate with 1Password CLI
2. Ensure app is unlocked
3. Run op signin and approve the biometric prompt
Connect Server (self-hosted)
export OP_CONNECT_HOST="http://localhost:8080"
export OP_CONNECT_TOKEN="your-connect-token"Setup
1. Install CLI:
# macOS
brew install 1password-cli
# Linux (official package/install docs)
# See references/get-started.md for distro-specific links.
# Windows (winget)
winget install AgileBits.1Password.CLI2. Verify:
op --version3. Choose an auth method above and configure it.
Hermes Execution Pattern (desktop app flow)
Hermes terminal commands are non-interactive by default and can lose auth context between calls.
For reliable op use with desktop app integration, run sign-in and secret operations inside a dedicated tmux session.
Note: This is NOT needed when using OP_SERVICE_ACCOUNT_TOKEN — the token persists across terminal calls automatically.
SOCKET_DIR="${TMPDIR:-${HERMES_HOME:-$HOME/.hermes}/cache/scratch}/hermes-tmux-sockets"
mkdir -p "$SOCKET_DIR"
SOCKET="$SOCKET_DIR/hermes-op.sock"
SESSION="op-auth-$(date +%Y%m%d-%H%M%S)"
tmux -S "$SOCKET" new -d -s "$SESSION" -n shell
# Sign in (approve in desktop app when prompted)
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- "eval \"\$(op signin --account my.1password.com)\"" Enter
# Verify auth
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- "op whoami" Enter
# Example read
tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- "op read 'op://Private/Npmjs/one-time password?attribute=otp'" Enter
# Capture output when needed
tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200
# Cleanup
tmux -S "$SOCKET" kill-session -t "$SESSION"Common Operations
Read a secret
op read "op://app-prod/db/password"Get OTP
op read "op://app-prod/npm/one-time password?attribute=otp"Inject into template
echo "db_password: {{ op://app-prod/db/password }}" | op injectRun a command with secret env var
export DB_PASSWORD="op://app-prod/db/password" # example op:// reference, resolved by `op run`
op run -- sh -c '[ -n "$DB_PASSWORD" ] && echo "DB_PASSWORD is set" || echo "DB_PASSWORD missing"'Guardrails
- Never print raw secrets back to user unless they explicitly request the value.
- Prefer
op run/op injectinstead of writing secrets into files. - If command fails with "account is not signed in", run
op signinagain in the same tmux session. - If desktop app integration is unavailable (headless/CI), use service account token flow.
CI / Headless note
For non-interactive use, authenticate with OP_SERVICE_ACCOUNT_TOKEN and avoid interactive op signin.
Service accounts require CLI v2.18.0+.
References
references/get-started.mdreferences/cli-examples.md- https://developer.1password.com/docs/cli/
- https://developer.1password.com/docs/service-accounts/
Related skills
- 007 – Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks…
- a11y-audit – Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA…
- 401-403-bypass-techniques – Use when protected HTTP routes return 401 or 403.
- accessibility-compliance-accessibility-audit – Audit pages and user journeys against a declared WCAG scope. Use when identifying…
- accesslint-audit – Find and fix WCAG 2.2 accessibility issues. Two modes — report (sweep a codebase or…
- accesslint-diff – Diff a live page's accessibility violations against a baseline — by default compares…
- accesslint-scan – Audit a live page for accessibility issues, locate each WCAG violation precisely, and…
- accounting-audit-system-builder – Routes an accounting or audit request to the right module skill, from software selection…