plugins/1pass/skills/op/SKILL.md
Use this skill when the user asks about 1Password, secrets management, retrieving credentials, using op CLI, service accounts, secret references, vault operations, or any task involving the 1Password CLI (op). Also use when needing to inject secrets into environment variables, read passwords or API keys from 1Password, or manage 1Password items from the command line.
npx skillsauth add nsheaps/ai-mktpl opInstall 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.
The 1Password CLI (op) lets you manage 1Password vaults, items, and secrets
from the terminal. It integrates with shell environments to securely inject
secrets without exposing them in plaintext.
# Check sign-in status
op whoami
# Sign in (interactive)
op signin
# Sign in with service account token (CI/automation)
export OP_SERVICE_ACCOUNT_TOKEN="your-token"
op whoami
# List accounts
op account list
| Command | Description |
| ----------------- | ----------------------------------- |
| op item list | List items in a vault |
| op item get | Get item details |
| op item create | Create a new item |
| op item edit | Edit an existing item |
| op item delete | Delete an item |
| op vault list | List vaults |
| op vault get | Get vault details |
| op read | Read a secret reference |
| op inject | Inject secrets into a template |
| op run | Run a command with secrets injected |
| op whoami | Show current user/account |
| op document get | Download a document |
1Password secret references use the format:
op://vault-name/item-name/field-name
# Read a single secret
op read "op://Private/My API Key/credential"
# Read a password
op read "op://Private/My Login/password"
# Read a specific section field
op read "op://Private/Server Config/database/connection_string"
# Run a command with secrets injected from env template
export DB_PASSWORD="op://Private/Database/password"
export API_KEY="op://Private/API Key/credential"
op run -- my-command
# Run with env file
op run --env-file .env -- my-command
# Inject secrets into a template file
op inject -i config.template.yaml -o config.yaml
# Template syntax in files:
# database:
# password: {{ op://Private/Database/password }}
# List all items
op item list
# List items in a specific vault
op item list --vault "Private"
# List with format
op item list --format json
# Filter by category
op item list --categories "Login"
op item list --categories "API Credential"
op item list --categories "Secure Note"
# Filter by tag
op item list --tags "production"
# Get full item details
op item get "My Login" --vault "Private"
# Get specific field
op item get "My Login" --fields "password"
# Get as JSON
op item get "My Login" --format json
# Get by UUID
op item get "abc123def456"
# Get OTP code
op item get "My Login" --otp
# Create a login
op item create --category login \
--title "New Service" \
--vault "Private" \
--url "https://example.com" \
username="admin" \
password="secret123"
# Create an API credential
op item create --category "API Credential" \
--title "Service API Key" \
--vault "Private" \
credential="sk-abc123"
# Create a secure note
op item create --category "Secure Note" \
--title "Important Note" \
--vault "Private" \
notesPlain="This is the note content"
# Generate a random password for new item
op item create --category login \
--title "New Account" \
--generate-password="20,letters,digits,symbols"
# Edit a field
op item edit "My Login" --vault "Private" \
password="new-password"
# Add a tag
op item edit "My Login" --tags "production,critical"
# List vaults
op vault list
# Get vault details
op vault get "Private"
# Create a vault
op vault create "Team Secrets"
# List vault permissions
op vault user list "Private"
Service accounts are used for CI/CD and automation:
# Set the token
export OP_SERVICE_ACCOUNT_TOKEN="ops_..."
# Use op normally — it auto-authenticates
op read "op://vault/item/field"
op run -- my-command
Service account limitations:
# .env file with secret references
# DATABASE_URL=op://Private/DB/connection_string
# API_KEY=op://Private/API/credential
op run --env-file .env -- docker compose up
#!/bin/bash
DB_PASS=$(op read "op://Private/Database/password")
API_KEY=$(op read "op://Private/API Key/credential")
curl -H "Authorization: Bearer $API_KEY" https://api.example.com
# Generate a random password
op item create --category password --generate-password
# Custom password recipe
op item create --category password \
--generate-password="30,letters,digits,symbols"
This plugin supports configuration via plugins.settings.yaml:
1pass:
enabled: true
autoInstall: false # Download op if not on PATH
installToProject: true # Install to $project/bin/.local
backgroundInstall: false # Install in background
opVersion: "latest" # Specific op version or "latest"
installOpExec: false # Also install op-exec
opExecVersion: "latest" # Specific op-exec version
# Expose entire 1Password items as environment variables
opExec:
items:
- "op://MyVault/ENVIRONMENT"
targets:
- sessionStartBashEnv # → CLAUDE_ENV_FILE (session-scoped, bash only)
- userSettings # → ~/.claude/settings.local.json (persistent, all tools)
# Note: recursive resolution of op:// references is always on (op-exec built-in)
Place in:
$CLAUDE_PROJECT_DIR/.claude/plugins.settings.yaml (project-level)~/.claude/plugins.settings.yaml (user-level)The opExec.targets array controls where resolved env vars are written:
| Target | Where | Scope | Persistence |
| --------------------- | -------------------------------------- | ------------------------------- | ----------------------------------- |
| sessionStartBashEnv | CLAUDE_ENV_FILE | Bash tools only | Session only |
| envLocal | $AGENT_HOME_DIR/.env.local | All consumers sourcing the file | Across sessions (idempotent upsert) |
| userSettings | ~/.claude/settings.local.json .env | All Claude Code tools | Across sessions |
sessionStartBashEnv + userSettings are enabled by default. envLocal is
opt-in and is intended for agent-home setups where a repo-templated .env
sources .env.local so direnv and other consumers can pick up the vars. See
the op-exec skill for details on configuring envLocal.path and
envLocal.sourceChain.
| Variable | Description |
| -------------------------- | ---------------------------------------- |
| OP_SERVICE_ACCOUNT_TOKEN | Service account token for authentication |
| OP_CONNECT_HOST | 1Password Connect server URL |
| OP_CONNECT_TOKEN | 1Password Connect API token |
| OP_ACCOUNT | Default account shorthand |
| OP_VAULT | Default vault |
Ensure op is installed. This plugin auto-installs to $CLAUDE_PROJECT_DIR/bin/.local/op
when autoInstall: true. Alternatively, install via mise:
# mise.toml
[tools]
"vfox:mise-plugins/vfox-1password" = "latest"
# Verify sign-in
op whoami
# Re-authenticate
op signin
# Check service account token
echo $OP_SERVICE_ACCOUNT_TOKEN | head -c 10
In CI/web sessions, use a service account token:
export OP_SERVICE_ACCOUNT_TOKEN="ops_..."
tools
Manually reproduce what the github-app plugin's SessionStart hook does to make a GitHub App installation token usable in the current session — materialize the PEM, generate the token, isolate GH_CONFIG_DIR, write the runtime env file, and wire CLAUDE_ENV_FILE so every Bash call sees GH_TOKEN/GITHUB_TOKEN. Use when the hook did not run, the token is missing from the environment, or a shell/teammate needs the token wired up by hand. <example>GH_TOKEN isn't set even though github-app is configured</example> <example>the github-app SessionStart hook didn't run, set up the token manually</example> <example>wire the github app token into CLAUDE_ENV_FILE</example> <example>gh keeps falling back to the wrong account, isolate GH_CONFIG_DIR</example>
tools
Manually configure the GitHub App bot git identity the way the github-app plugin's SessionStart hook does — resolve the app slug and bot user ID, build the <slug>[bot] name and noreply email, set GIT_AUTHOR_*/GIT_COMMITTER_* env vars, and write an isolated GIT_CONFIG_GLOBAL with the gh auth git-credential helper. Use when commits are attributed to the wrong account, "Author identity unknown" appears, or git identity must be set up by hand. <example>my commits are showing up as the handler, not the bot</example> <example>git says Author identity unknown after the github-app hook ran</example> <example>configure the github app bot git identity manually</example> <example>set up the gh credential helper for git push</example>
tools
Manages spec files for requirements capture and validation
tools
# Bash Chaining Alternatives This skill teaches you how to work around the bash command chaining restriction enforced by this plugin. ## Why Chaining is Blocked The `bash-command-rejection` plugin blocks these operators: | Operator | Name | Why Blocked | | -------- | ---------- | ----------------------------------------------------------------------------------- | | `&&` | AND chain | Runs cmd2 only if cmd1 su