Manages secrets with the 1Password CLI (op): sign-in, item CRUD, op:// references, secret injection, and running processes with loaded secrets.
Agentic Workflow: Read -> Reason -> Act (1password)
You are 1Password (api/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — api context for 1password
- Domain: Manages secrets with the 1Password CLI (op): sign-in, item CRUD, op:// references, secret injection, and running processes with loaded secrets.
- secret-management: Create, read, and update 1Password items programmatically. —
op signin --account my.1password.com
- secret-injection: Reference secrets by URI and inject into files or process environments without printing them. —
op read op://vault/MyLogin/password
- Check
knowledge and prerequisites: op
2. Reason — think for 1password
- For
secret-management: Create, read, and update 1Password items programmatically. — decide which checks to run
- For
secret-injection: Reference secrets by URI and inject into files or process environments without printing them. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with 1password tools
- Tools:
Glob, Grep, Read, Op (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
1password:0db33e7b
1Password
What this skill does
Manages credentials with the 1Password CLI (op): sign-in flows, item CRUD, reading secrets by op:// reference, injecting secrets into templates or process environments, and shell plugins for third-party CLIs.
When to use
- Fetching a stored password or API key for a script or deploy
- Creating vault items during automation
- Injecting secrets into .env files or process environments without echoing them
Real commands
# Authenticate the CLI
op signin --account my.1password.com
# Create a login item
op item create --category=login --title=prod-db username=admin password=secret --vault=Infra
# Read a single field by reference
op read op://Infra/prod-db/password
# Inject into a template file
op inject -i template.env -o .env
# Run a process with secrets loaded, never printed
op run -- ./deploy.sh
Template example
DB_URL=op://Infra/prod-db/url
API_KEY=op://Infra/stripe/live-key
Testing
- Verify items with
op item get <title> --fields username after creation
- Test injection by running the target script with
op run and checking it authenticates
Best practices
- Never pipe
op read output into logs; use op run when secrets must reach a subprocess
- Scope with
--account and --vault in scripts to avoid ambiguity
- Use
--reveal only on demand; output masks hidden fields by default
- Grant access via vault permissions, not shared passwords
Capabilities
secret-management
Create, read, and update 1Password items programmatically.
Parameters:
vault (string): Vault to search or write into
fields (string): Comma-separated field names to return
reveal (boolean): Print hidden fields in plaintext
Commands:
op signin --account my.1password.com
op item create --category=login --title=MyLogin username=me password=secret
op item get MyLogin --fields username,password
op item edit MyLogin --vault=Personal
op item delete MyLogin --archive
Examples:
- op item get MyLogin --fields password --reveal
- op item create --category=login --title=prod-db --url db.internal username=admin password=$(openssl rand -base64 24)
- op item list --vault=Infra --format=json
secret-injection
Reference secrets by URI and inject into files or process environments without printing them.
Parameters:
input (string): Template file containing op:// references
output (string): Destination file for injected output
account (string): 1Password account shorthand, e.g. my.1password.com
Commands:
op read op://vault/MyLogin/password
op inject -i template.env -o .env
op run --no-masking -- env
op run -- ./deploy.sh
op vault list
Examples:
- op read op://Prod/db-credentials/password
- op inject -i deploy.tpl -o deploy.env
- op run -- npm run start:prod
References
1---2name: "1password"3description: "Manages secrets with the 1Password CLI (op): sign-in, item CRUD, op:// references, secret injection, and running processes with loaded secrets. Use when working with secret management, secret injection, api or when the user mentions secret management, secret injection, api."4license: "MIT"5compatibility: "Requires op."6metadata:7 source: https://skillmd.com/skills/opknock/1password8 author: Kdesk9 version: 2.0.010 category: api11allowed-tools: "Glob Grep Read Bash(op:*)"12---1314Manages secrets with the 1Password CLI (op): sign-in, item CRUD, op:// references, secret injection, and running processes with loaded secrets.1516## Agentic Workflow: Read -> Reason -> Act (1password)1718You are **1Password** (api/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — api context for `1password`21- Domain: Manages secrets with the 1Password CLI (op): sign-in, item CRUD, op:// references, secret injection, and running processes with loaded secrets.22- **secret-management**: Create, read, and update 1Password items programmatically. — `op signin --account my.1password.com`23- **secret-injection**: Reference secrets by URI and inject into files or process environments without printing them. — `op read op://vault/MyLogin/password`24- Check `knowledge` and `prerequisites: op`2526### 2. Reason — think for `1password`27- For `secret-management`: Create, read, and update 1Password items programmatically. — decide which checks to run28- For `secret-injection`: Reference secrets by URI and inject into files or process environments without printing them. — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `1password` tools32- Tools: `Glob`, `Grep`, `Read`, `Op` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `1password:0db33e7b`3536# 1Password3738## What this skill does3940Manages credentials with the 1Password CLI (op): sign-in flows, item CRUD, reading secrets by op:// reference, injecting secrets into templates or process environments, and shell plugins for third-party CLIs.4142## When to use4344- Fetching a stored password or API key for a script or deploy45- Creating vault items during automation46- Injecting secrets into .env files or process environments without echoing them4748## Real commands4950```bash51# Authenticate the CLI52op signin --account my.1password.com5354# Create a login item55op item create --category=login --title=prod-db username=admin password=secret --vault=Infra5657# Read a single field by reference58op read op://Infra/prod-db/password5960# Inject into a template file61op inject -i template.env -o .env6263# Run a process with secrets loaded, never printed64op run -- ./deploy.sh65```6667## Template example6869```env70DB_URL=op://Infra/prod-db/url71API_KEY=op://Infra/stripe/live-key72```7374## Testing7576- Verify items with `op item get <title> --fields username` after creation77- Test injection by running the target script with `op run` and checking it authenticates7879## Best practices8081- Never pipe `op read` output into logs; use `op run` when secrets must reach a subprocess82- Scope with `--account` and `--vault` in scripts to avoid ambiguity83- Use `--reveal` only on demand; output masks hidden fields by default84- Grant access via vault permissions, not shared passwords8586## Capabilities8788### secret-management89Create, read, and update 1Password items programmatically.9091**Parameters:**92- `vault` (string): Vault to search or write into93- `fields` (string): Comma-separated field names to return94- `reveal` (boolean): Print hidden fields in plaintext9596**Commands:**97- `op signin --account my.1password.com`98- `op item create --category=login --title=MyLogin username=me password=secret`99- `op item get MyLogin --fields username,password`100- `op item edit MyLogin --vault=Personal`101- `op item delete MyLogin --archive`102103**Examples:**104- op item get MyLogin --fields password --reveal105- op item create --category=login --title=prod-db --url db.internal username=admin password=$(openssl rand -base64 24)106- op item list --vault=Infra --format=json107108### secret-injection109Reference secrets by URI and inject into files or process environments without printing them.110111**Parameters:**112- `input` (string): Template file containing op:// references113- `output` (string): Destination file for injected output114- `account` (string): 1Password account shorthand, e.g. my.1password.com115116**Commands:**117- `op read op://vault/MyLogin/password`118- `op inject -i template.env -o .env`119- `op run --no-masking -- env`120- `op run -- ./deploy.sh`121- `op vault list`122123**Examples:**124- op read op://Prod/db-credentials/password125- op inject -i deploy.tpl -o deploy.env126- op run -- npm run start:prod127128## References129- [1Password CLI Reference](https://developer.1password.com/docs/cli/reference)130- [Secret References](https://developer.1password.com/docs/cli/secret-references)131- [Shell Plugins](https://developer.1password.com/docs/cli/shell-plugins)