1password-cli
Skill2 starsChanged 8 months agoMITView on GitHub
Manage 1Password items, vaults, and secrets using the op CLI. Use when the user wants to create, read, update, or delete passwords and secrets, manage vaults, inject secrets into config files, run commands with secret environment variables, or read secret references. Also use this skill when the user mentions .env secret management, credential rotation, vault organization, storing API tokens or SSH keys, or any workflow involving op://, op read, op run, or op inject. Triggers on mentions of 1Password, op CLI, password manager, secret management, credential storage, or secure configuration.
- Reads credentials
- Installs packages
3 other projects use a version of this.
Adopted by
Most recently taken up by
- gigio1023/agent-skillstheir own version, first seen Sep 29, 2026
- spenserhale/skillstheir own version, first seen Sep 24, 2026
- caelaxie/skillettheir own version, first seen Aug 10, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- caelaxie/skillet★ 1same name
- gigio1023/agent-skills★ 1same name
- spenserhale/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- awscliSkill
- gandi-cliSkill
- iterm2-automationSkill
- iterm2-profilesSkill
- iterm2-shell-setupSkill
- pbcopySkill
- syncthingSkill
- synology-cliSkill
- tailscale-cliSkill
- textual-tuiSkill
- your-skill-nameSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 34
Use JSON templates: when creating/editing items with sensitive values.
- Very specific: line 36
Keep secrets out of version control: Don't write resolved values to files that might be committed.
- Distinctive: line 37
Delete template files: after use — they contain resolved secrets on disk.
- Distinctive: line 74
Read one secret value. Best for one-off lookups or piping into another command.
- Distinctive: line 128
Delete resolved config files when no longer needed — they contain plaintext secrets.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
1Password CLI (op) Assistant
Help users manage 1Password secrets and items using the op CLI.
Prerequisites
- The
opCLI must be installed (brew install 1password-clion macOS) - Desktop app integration must be enabled (1Password app > Settings > Developer > Integrate with 1Password CLI)
- Verify setup:
op whoami
Security Principles
Secrets that leak into terminal output, shell history, or version-controlled files are hard to revoke and easy to miss. These guidelines reduce that surface area:
- Avoid printing raw secrets unless the user explicitly asks. Prefer
op read --out-fileorop runto keep secrets out of scrollback and logs. - Use
--format=jsonfor list/get commands — structured output is easier to parse and less likely to be misread. - Use JSON templates when creating/editing items with sensitive values. Inline assignment statements (
'password=...') can appear inpsoutput on shared machines. - Prefer
op://references over reading secrets into shell variables. References are resolved just-in-time and never persist in memory. - Keep secrets out of version control. Don't write resolved values to files that might be committed. Use
.envfiles withop://references instead. - Delete template files after use — they contain resolved secrets on disk.
Reference Files
This skill includes two reference files for detailed lookups. Consult them as needed:
| File | When to use |
| reference/commands.md | Looking up specific flags, subcommands, field assignment syntax, or shell completion setup |
| reference/conventions.md | Deciding item categories, naming items, organizing vaults, choosing field types, Markdown syntax limits in notes, or reviewing the best-practices checklist |
Secret References (op://)
The op:// URI is the core abstraction — it points to a secret without exposing it:
op://<vault>/<item>/[<section>/]<field>[?<query>]vault: Vault name or IDitem: Item title or IDsection: (Optional) Section namefield: Field label (e.g.,password,username,credential)
Query parameters for special attributes:
op read "op://vault/item/field?attribute=otp" # one-time password
op read "op://vault/item/private key?ssh-format=openssh" # SSH key formatResolving Secrets
There are three ways to resolve op:// references, each suited to a different scenario:
op read — Single secret
Read one secret value. Best for one-off lookups or piping into another command.
op read "op://vault/item/password" # stdout
op read --out-file=token.txt "op://vault/item/credential" # file (no terminal output)
# Use in command substitution
docker login -u "$(op read op://prod/docker/username)" \
-p "$(op read op://prod/docker/password)"op run — Environment variable injection
Scans env vars for op:// references, resolves them, then runs a subprocess. Secrets are masked in output by default. Best for running apps or scripts that read config from env vars.
# From exported variables
export DB_PASSWORD="op://app-prod/db/password"
op run -- node app.js
# From .env file
op run --env-file="./prod.env" -- node app.js
# Unmasked (use with caution)
op run --no-masking -- printenv DB_PASSWORDShell expansion gotcha: The shell expands $VAR before op run sees it. Use a subshell to defer expansion:
# WRONG — shell expands $MY_VAR immediately
MY_VAR=op://vault/item/field op run --no-masking -- echo "$MY_VAR"
# CORRECT — subshell defers expansion
MY_VAR=op://vault/item/field op run --no-masking -- sh -c 'echo "$MY_VAR"'op inject — Template file injection
Replaces op:// references in a template file with resolved values. Best for generating config files from templates.
op inject -i config.yml.tpl -o config.ymlTemplate (config.yml.tpl):
database:
host: http://localhost
port: 5432
username: op://prod/mysql/username
password: op://prod/mysql/passwordDelete resolved config files when no longer needed — they contain plaintext secrets.
Environment Differentiation
Organize vaults by environment with the same item structure, then use a shell variable to switch contexts:
# .env file uses a variable for the vault name
DB_PASSWORD="op://$APP_ENV/mysql/password"
# Switch environment at runtime
APP_ENV=prod op run --env-file="./app.env" -- ./deploy.sh
APP_ENV=dev op run --env-file="./app.env" -- ./deploy.sh
# Also works with op inject
APP_ENV=prod op inject -i config.yml.tpl -o config.ymlCommon Workflows
Create an item (non-sensitive fields as flags, sensitive via template)
# Simple: non-sensitive fields only
op item create --category=Login --title="Netflix" --vault=Private \
--url='https://www.netflix.com/login' \
--generate-password='letters,digits,symbols,32' \
'username=user@example.com'
# Secure: use a JSON template for sensitive values
op item template get --out-file=/tmp/login.json "Login"
# edit /tmp/login.json, then:
op item create --template=/tmp/login.json
rm /tmp/login.jsonEdit an item
op item edit <title-or-id> --title="New Title"
op item edit <title-or-id> 'username=new-user'
op item edit <title-or-id> 'Subscription.Renewal Date[date]=2025-12-31'
op item edit <title-or-id> 'Old Field[delete]'
# For sensitive value changes, use a template
op item get <title-or-id> --format json > /tmp/item.json
# edit /tmp/item.json, then:
op item edit <title-or-id> --template=/tmp/item.json
rm /tmp/item.jsonSearch and filter
op item list --format=json # all items
op item list --vault=<vault> --format=json # by vault
op item list --categories=Login --format=json # by category
op item list --tags=production --format=json # by tag
op item get <title-or-id> --format=json # full details
op item get <title-or-id> --fields label=username,label=password --format=jsonFor the full command reference (all subcommands, flags, field types), see reference/commands.md. For naming conventions and vault organization guidelines, see reference/conventions.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

