active/op/SKILL.md
Use 1Password CLI safely for agent credential workflows.
npx skillsauth add kevinslin/skills 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.
Use this skill to operate 1Password CLI with least privilege and low transcript exposure.
op run with secret references over reading plaintext secret values.Before touching secrets, establish what is needed:
op is installed and authenticated without exposing secrets:command -v op
op --version
op whoami
If auth is missing, ask the user to unlock or sign in to 1Password. Do not ask the user to paste account passwords, Secret Keys, recovery codes, or service account tokens into chat.
Use this when a subprocess needs credentials:
op run --env-file .env.op -- your-command
The .env.op file should contain secret references, not secret values:
API_KEY=op://Vault/Item/api-key
TOKEN=op://Vault/Item/token
Keep secret-reference env files local and uncommitted unless the project explicitly wants shared references. If creating a local env file, set restrictive permissions:
chmod 600 .env.op
Use plaintext reads only when no safer injection path exists. Prefer command substitution that passes the value directly to the consumer, and avoid echoing:
TOKEN="$(op read 'op://Vault/Item/token')" your-command
Avoid these patterns:
op read 'op://Vault/Item/token'
echo "$(op read 'op://Vault/Item/token')"
set -x
env
printenv
When a user gives an item name but not a reference, inspect item metadata carefully and avoid revealing field values. Do not print raw op item get --format json output; filter it before it reaches the transcript:
op item get "Item Name" --vault "Vault Name" --format json \
| jq '.fields[] | {label, id, type, purpose, reference}'
When the desired field is known, extract only the reference:
op item get "Item Name" --vault "Vault Name" --format json \
| jq -r '.fields[] | select(.label == "Field Name") | .reference'
Do not include secret field values in the final answer. If a command output includes values, redact them before quoting or summarizing.
Use a dedicated service account with access only to the needed vault/items. Keep the service account token out of repos and transcripts:
export OP_SERVICE_ACCOUNT_TOKEN="..."
op whoami
In Codex or other agent runtimes, inject OP_SERVICE_ACCOUNT_TOKEN through the runtime's approved secret mechanism or a local secrets file sourced by the launching shell. Do not write it into project config unless that config is explicitly secret-managed and excluded from version control.
op run --env-file.op run.op item get and report metadata only.op read without printing it.op whoami, op account list, and non-secret error text.op commands.Before finishing any task that created or changed files:
git status --short
git diff -- . ':!*.lock'
Confirm no plaintext secrets were added. If a secret appears in a tracked file or diff, stop, remove it, and tell the user to rotate the credential if it may have been persisted.
When explaining setup to a user:
op run and secret references first.op is missing, ask the user to install 1Password CLI.op whoami fails, ask the user to unlock/sign in or provide a runtime-approved secret injection path.development
Create, rename, audit, or close a tracked Codex task whose turns and status are persisted in the local thread ledger. Only use when directly invoked.
testing
Manage Git preflight, branch and worktree creation, and completed-work cleanup. Use when explicitly invoked.
databases
Automatically use for durable knowledge, configured project-context lookup, and schema-backed artifact layouts.
content-media
Create, update, or optimize skills and SKILL.md content.