1password

Configure 1Password CLI and read or inject secrets into commands and templates.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing secrets through plaintext environment variables or files is risky and hard to maintain. This Skill sets up the 1Password CLI (op) so secrets stay in your vault and are read, injected, or passed to commands only at runtime. ## Core Features & Use Cases - CLI Setup and Authentication: Install op on macOS, Linux, or Windows and authenticate via service account token, desktop app integration, or a self-hosted Connect server. - Secret Operations: Read secrets with op:// references, fetch one-time passwords, inject secrets into templates with op inject, and run commands with secret env vars via op run. - Use Case: You need a database password for a deployment script. Instead of pasting it into a .env file, run the command through op run so the secret is resolved from your 1Password vault at execution time and never written to disk. ## 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 to the terminal.

Frequently Asked Questions about 1password

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

FAQPage Schema
How do I read a secret from 1Password CLI in a script?

Use op read with an op:// reference, such as op read "op://app-prod/db/password". For commands, prefer op run with the reference stored in an environment variable so the secret is resolved at runtime without being written to files.

How to use 1Password CLI in CI or headless environments?

Authenticate with a service account by setting the OP_SERVICE_ACCOUNT_TOKEN environment variable, which requires CLI v2.18.0 or later. This avoids interactive op signin and supports op read, op inject, and op run non-interactively.

Does 1Password CLI work without the desktop app?

Yes. Use a service account token via OP_SERVICE_ACCOUNT_TOKEN or a self-hosted Connect server with OP_CONNECT_HOST and OP_CONNECT_TOKEN. Desktop app integration is only needed for the interactive biometric sign-in flow.

Why does op fail with account is not signed in?

The desktop app session expired or the terminal call lost auth context. Run op signin again in the same tmux session, or switch to a service account token which persists across terminal calls automatically.

How do I inject 1Password secrets into a config file?

Place op:// references in a template using {{ op://Vault/Item/field }} syntax and pipe it through op inject, for example op inject -i config.tpl.yml -o config.yml. The rendered file contains resolved secrets, so handle it carefully.