Skip to main content
Agent skill

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

Get started

Get the complete skill folder, including its scripts and reference files.

When to use this skill

Use 1password when an AI agent needs a reusable SKILL.md workflow for this job: Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

When not to use it

Skip 1password when the task is outside the writing category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.

How to install

Where will you use it?

Install scope
Claude Code folder setup
mkdir -p ~/.claude/skills/1password
# Save SKILL.md to ~/.claude/skills/1password/SKILL.md
  1. Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/1password/SKILL.md. For a shared project, commit the folder at .claude/skills/1password/ instead.
  2. Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
  3. For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.

Full install guide for Claude, Cursor, and Codex →

Try a starter prompt

After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.

Starter prompt
Use the 1password skill for this task: Check OS + shell. Confirm any required inputs or files before making changes.

What supports this recommendation?

80/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
84/100
Practical detail
92/100
Source evidence
63/100
Source signals
70/100
Model compatibility evidence
  • claudeinferred

    The skill text mentions Claude or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • chatgptuntested

    No model-specific signal or recorded compatibility test was found.

  • geminiuntested

    No model-specific signal or recorded compatibility test was found.

  • copilotuntested

    No model-specific signal or recorded compatibility test was found.

  • llamauntested

    No model-specific signal or recorded compatibility test was found.

  • perplexityuntested

    No model-specific signal or recorded compatibility test was found.

  • mistraluntested

    No model-specific signal or recorded compatibility test was found.

  • grokuntested

    No model-specific signal or recorded compatibility test was found.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

What this skill does

# 1Password CLI

Follow the official CLI get-started steps. Don't guess install commands.

## References

- `references/get-started.md` (install + app integration + sign-in flow) - `references/cli-examples.md` (real `op` examples)

## Workflow

1. Check OS + shell. 2. Verify CLI present: `op --version`. 3. Detect the auth mode the user has set up: - **Service account:** `OP_SERVICE_ACCOUNT_TOKEN` is set (typical for headless setups, CI, gateways). - **Desktop app integration:** the 1Password desktop app is running with CLI integration enabled (typical on macOS / Windows / Linux desktops). - **Standalone signin:** neither of the above — `op signin` will prompt for an account password every session. 4. Run `op` according to the auth mode (see below). 5. Verify access: `op whoami` should succeed before any secret read. 6. If multiple accounts: use `--account` or `OP_ACCOUNT`.

## Running `op` per auth mode

### Service account (preferred for headless / gateway use)

Direct exec. No tmux, no signin step.

```bash export OP_SERVICE_ACCOUNT_TOKEN="ops_..." op vault list op read op://app-prod/db/password ```

### Desktop app integration

Direct exec. **Do not wrap in tmux** — the desktop app integration uses a per-user IPC channel that is established for the gateway's exec environment but is not always reliably reachable from tmux subshells, which run with a different environment context. The transport differs per platform (XPC via the 1Password Browser Helper on macOS, a Unix domain socket on Linux, a named pipe on Windows); the practical rule for an agent is the same on all three: run `op` directly. On macOS, a useful symptom indicator is the 1Password integration group container at `~/Library/Group Containers/2BUA8C4S2C.com.1password/t/`.

```bash op vault list # may trigger Touch ID / Windows Hello / system auth on first call op whoami ```

If a call returns `1Password CLI couldn't connect to the 1Password desktop app`, do not switch to tmux. Confirm the desktop app is running and unlocked, then retry direct exec.

### Standalone signin (no app, interactive password)

This is the only mode where tmux helps. `op signin` prints an `eval`-style export setting an `OP_SESSION_*` token for POSIX shells; later commands in the same shell are authenticated by that env var. The gateway's per-command shells lose that state between calls, so a persistent tmux pane keeps the session token alive — but only if the export is actually applied with `eval` in a POSIX shell. Sending `op signin` as a plain command leaves stdout printed to the pane and `op whoami` will fail.

The tmux flow is only actionable on macOS/Linux hosts where the `tmux` skill is available. The example intentionally opens `/bin/sh` so the POSIX `eval "$(op signin ...)"` output is valid even when the user's normal shell is fish. On Windows, prefer desktop app integration or service account auth. If the user only has standalone interactive signin on Windows, stop and ask them to provide a persistent PowerShell session mechanism or switch to desktop integration/service account auth; do not translate the tmux commands directly.

```bash SOCKET_DIR="${OPENCLAW_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/openclaw-tmux-sockets}" mkdir -p "$SOCKET_DIR" chmod 700 "$SOCKET_DIR" SOCKET="$SOCKET_DIR/openclaw-op.sock" SESSION="op-auth-$(date +%Y%m%d-%H%M%S)"

tmux -S "$SOCKET" new -d -s "$SESSION" -n shell /bin/sh tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'eval "$(op signin --account my.1password.com)"' Enter tmux -S "$SOCKET" capture-pane -t "$SESSION":0.0 -p -S - | tail -40 ```

Do not queue follow-up commands while signin is prompting. Poll the pane with `capture-pane` until signin has either completed and the shell prompt has returned, or it is clearly waiting for human input. If the prompt requires a password, MFA, or account choice, pause and ask the user to complete signin in their own terminal; give them the socket and session values so they can attach locally. The agent should not run `tmux attach` from exec because attach consumes the current TTY and prevents scripted `send-keys` / `capture-pane` control.

After the shell prompt returns, verify by sending the checks into the same pane:

```bash tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'op whoami' Enter tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'op vault list' Enter tmux -S "$SOCKET" capture-pane -t "$SESSION":0.0 -p -S - | tail -80 ```

Keep the tmux session running so later `op read` / `op run` commands reuse the same authenticated shell.

Use the same `SOCKET` and `SESSION` values for every follow-up command in this standalone signin flow. The `-S "$SOCKET"` flag selects the tmux server socket; keep it in a user-owned `0700` directory, do not share it between users, and choose a new session name for each new signin attempt.

## Browser sign-in (1Password for Claude)

If the session exposes Claude in Chrome credential tools (`request_credentials`, `autofill_credential`, `enter_verification_code`), prefer them over `op` for signing in to websites: 1Password fills the page directly and the secret never enters context. Rules:

- Request every credential the task needs in one `request_credentials` call before navigating. - Approval is a 1Password prompt on the gateway host. If it stays pending, tell the user which host to unlock ("1Password is waiting for approval on this Mac") instead of retrying. - Never ask the user to send passwords or one-time codes through chat; codes go through `enter_verification_code` only. - Do not fall back to `op read` for a website password just because the browser flow needs approval; that defeats the no-exposure design. Use `op` for secrets consumed by commands and config, not for web logins when the browser flow exists.

## Guardrails

- Never paste secrets into logs, chat, or code. - Prefer `op run` / `op inject` over writing secrets to disk. - If sign-in without app integration is needed, use `op account add` first. - If a command returns "account is not signed in": - service account: re-export `OP_SERVICE_ACCOUNT_TOKEN` - desktop app: confirm the app is running and integration is enabled - standalone: re-run `op signin` inside the same tmux session and authorize

Intended uses

  • Check OS + shell.
  • Verify CLI present: op --version.
  • Detect the auth mode the user has set up:
  • Service account: OPSERVICEACCOUNTTOKEN is set (typical for headless setups, CI, gateways).
  • Desktop app integration: the 1Password desktop app is running with CLI integration enabled (typical on macOS / Windows / Linux desktops).
  • Standalone signin: neither of the above — op signin will prompt for an account password every session.
  • Run op according to the auth mode (see below).
  • Verify access: op whoami should succeed before any secret read.
  • If multiple accounts: use --account or OPACCOUNT.

Implementation notes

  • Review the source instructions and adapt inputs before running the workflow.

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.