1password

Configure 1Password CLI and inject secrets into commands using op references.

Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill 1password-chensihakniroth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: 1password
Source: https://github.com/Chensihakniroth/ANAKOT-AGENT/tree/main/optional-skills/security/1password
Command: npx skills add https://github.com/Chensihakniroth/ANAKOT-AGENT --skill 1password-chensihakniroth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing API keys, passwords, and tokens as plaintext environment variables or config files creates security risks. This Skill sets up the 1Password CLI (op) so secrets are read, injected, or passed to commands directly from your 1Password vaults without exposing raw values. ## Core Features & Use Cases - CLI Setup & Authentication: Install op on Linux, macOS, or Windows and authenticate via service account token, desktop app integration, or a self-hosted Connect server. - Secret Reading & Injection: Resolve op://Vault/Item/field references with op read, render templates with op inject, and run commands with secret env vars via op run. - Stable Agent Sessions: Use a dedicated tmux session pattern so desktop-app sign-in persists across non-interactive terminal calls. - Use Case: You need a database password for a deployment script. Instead of pasting it into a .env file, run the command with op run so the secret is injected at runtime from your 1Password vault. ## Quick Start Set up the 1Password CLI with a service account token and read the database password from my app-prod vault without printing it.

Frequently Asked Questions about 1password

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use 1Password CLI to inject secrets into commands?▼

Use op run with an environment variable set to an op:// reference, such as export DB_PASSWORD="op://app-prod/db/password" followed by op run -- your-command. The CLI resolves the reference at runtime so the raw secret never appears in files.

How to authenticate 1Password CLI in headless or CI environments?▼

Set the OP_SERVICE_ACCOUNT_TOKEN environment variable with a service account token created in your 1Password account settings. This requires CLI v2.18.0 or later and supports op read, op inject, and op run without interactive sign-in.

Does 1Password CLI work on Linux, macOS, and Windows?▼

Yes, op supports all three platforms. Install via Homebrew on macOS, winget install AgileBits.1Password.CLI on Windows, and official distro packages on Linux, then verify with op --version.

Why does op fail with account is not signed in?▼

This happens when the authentication context is lost between terminal calls, common in non-interactive shells. Re-run op signin in the same tmux session, or switch to the service account token flow which persists automatically.

How do I get a one-time password (OTP) from 1Password CLI?▼

Run op read with the OTP attribute query, for example op read "op://Private/Npmjs/one-time password?attribute=otp". This returns the current time-based code for the item without opening the desktop app.