$npx -y skills add SafeAI-Lab-X/ClawKeeper --skill 1passwordSet up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
| 1 | # 1Password CLI |
| 2 | |
| 3 | Follow the official CLI get-started steps. Don't guess install commands. |
| 4 | |
| 5 | ## References |
| 6 | |
| 7 | - `references/get-started.md` (install + app integration + sign-in flow) |
| 8 | - `references/cli-examples.md` (real `op` examples) |
| 9 | |
| 10 | ## Workflow |
| 11 | |
| 12 | 1. Check OS + shell. |
| 13 | 2. Verify CLI present: `op --version`. |
| 14 | 3. Confirm desktop app integration is enabled (per get-started) and the app is unlocked. |
| 15 | 4. REQUIRED: create a fresh tmux session for all `op` commands (no direct `op` calls outside tmux). |
| 16 | 5. Sign in / authorize inside tmux: `op signin` (expect app prompt). |
| 17 | 6. Verify access inside tmux: `op whoami` (must succeed before any secret read). |
| 18 | 7. If multiple accounts: use `--account` or `OP_ACCOUNT`. |
| 19 | |
| 20 | ## REQUIRED tmux session (T-Max) |
| 21 | |
| 22 | The shell tool uses a fresh TTY per command. To avoid re-prompts and failures, always run `op` inside a dedicated tmux session with a fresh socket/session name. |
| 23 | |
| 24 | Example (see `tmux` skill for socket conventions, do not reuse old session names): |
| 25 | |
| 26 | ```bash |
| 27 | SOCKET_DIR="${OPENCLAW_TMUX_SOCKET_DIR:-${CLAWDBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/openclaw-tmux-sockets}}" |
| 28 | mkdir -p "$SOCKET_DIR" |
| 29 | SOCKET="$SOCKET_DIR/openclaw-op.sock" |
| 30 | SESSION="op-auth-$(date +%Y%m%d-%H%M%S)" |
| 31 | |
| 32 | tmux -S "$SOCKET" new -d -s "$SESSION" -n shell |
| 33 | tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- "op signin --account my.1password.com" Enter |
| 34 | tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- "op whoami" Enter |
| 35 | tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- "op vault list" Enter |
| 36 | tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200 |
| 37 | tmux -S "$SOCKET" kill-session -t "$SESSION" |
| 38 | ``` |
| 39 | |
| 40 | ## Guardrails |
| 41 | |
| 42 | - Never paste secrets into logs, chat, or code. |
| 43 | - Prefer `op run` / `op inject` over writing secrets to disk. |
| 44 | - If sign-in without app integration is needed, use `op account add`. |
| 45 | - If a command returns "account is not signed in", re-run `op signin` inside tmux and authorize in the app. |
| 46 | - Do not run `op` outside tmux; stop and ask if tmux is unavailable. |