Skip to main content

1password-cli-for-agents

This skill allows agents to securely access and manage secrets using the 1Password CLI (op) and a Service Account. It provides commands for reading, writing, and managing items within a dedicated v...

소스 정보

저장소
modbender/skill-library-mcp
최근 소스 활동
2026년 3월 6일 18:33
감지된 SKILL.md 언어
영어
스타
12
포크
3

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
1Password CLI for Agents
description
This skill allows agents to securely access and manage secrets using the 1Password CLI (op) and a Service Account. It provides commands for reading, writing, and managing items within a dedicated v...
# 1Password CLI for Agents This skill allows agents to securely access and manage secrets using the 1Password CLI (`op`) and a Service Account. It provides commands for reading, writing, and managing items within a dedicated vault. ## Prerequisites 1. **Install 1Password CLI:** - macOS: `brew install --cask 1password-cli` - Linux/Windows: See [official docs](https://developer.1password.com/docs/cli/get-started). 2. **Create a Service Account:** - Go to [1Password Developer Portal](https://developer.1password.com/). - Create a Service Account and grant it access to a specific vault (e.g., "Agent Vault"). - Copy the Service Account Token. 3. **Set Environment Variable:** - Set `OP_SERVICE_ACCOUNT_TOKEN` in your environment (e.g., `.env` file or export in shell). - For OpenClaw, you can add `OP_SERVICE_ACCOUNT_TOKEN=...` to `.env`. ## Usage All commands require the `OP_SERVICE_ACCOUNT_TOKEN` to be set. ### 1. Check Authentication Verify the service account is working: ```bash op whoami ``` ### 2. List Vaults List vaults accessible to the service account: ```bash op vault list ``` ### 3. Read an Item Get details of an item (JSON format is best for parsing): ```bash op item get "Item Name" --vault "Vault Name" --format json ``` Or get a specific field (e.g., password): ```bash op read "op://Vault Name/Item Name/password" ``` ### 4. Create an Item Create a login item: ```bash op item create --category login --title "My Service" --url "https://example.com" --vault "Vault Name" username="myuser" password="mypassword" ``` Create a secure note: ```bash op item create --category "Secure Note" --title "API Key" --vault "Vault Name" notes="my-secret-key" ``` ### 5. Edit an Item Update a password: ```bash op item edit "Item Name" password="newpassword" --vault "Vault Name" ``` ### 6. Delete an Item ```bash op item delete "Item Name" --vault "Vault Name" ``` ## Tips for Agents - **Always use JSON output:** Add `--format json` to `op` commands for structured data that is easier to parse. - **Security:** Never print the `OP_SERVICE_ACCOUNT_TOKEN` or retrieved secrets to the console unless explicitly asked. - **Vaults:** If multiple vaults are available, specify the `--vault` flag to avoid ambiguity. - **Rate Limits:** Service accounts have rate limits. Cache results if possible or retry with backoff. ## Troubleshooting - **"You are not currently signed in":** Ensure `OP_SERVICE_ACCOUNT_TOKEN` is set correctly. - **"account is not authorized":** Check that the service account has permission for the specific vault and operation (read/write).
GitHub에서 보기