Agent skill
creating-op-secrets
Creates secrets in 1Password using the op CLI. Use when the user needs to store new passwords, API keys, login credentials, or secure notes in 1Password. Supports Login, Password, API Credential, and Secure Note item types with optional vault selection and password generation.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/op-secrets-creator
SKILL.md
Overview
This skill enables agents to create secrets in 1Password using the op CLI. It supports creating Login, Password, API Credential, and Secure Note items with template support and vault selection.
The skill assumes the op CLI is installed and the user is already authenticated.
Table of Contents
- Overview
- Table of Contents
- Supported Item Types
- Workflow
- Phase 1: Context Assessment
- Phase 2: Secret Creation
- Reference Documentation
Supported Item Types
| Type | Category | Use Case |
|---|---|---|
| Login | LOGIN | Website accounts, application logins |
| Password | PASSWORD | Standalone passwords, WiFi, PINs |
| API Credential | API_CREDENTIAL | API keys, access tokens, service credentials |
| Secure Note | SECURE_NOTE | Text notes, recovery codes, configurations |
Workflow
Phase 1: Context Assessment
Step 1: Understand the Request
Determine what the user wants to create:
-
Identify the item type:
- Login: Has username/password for a website or service
- Password: Standalone password without login context
- API Credential: API key, token, or service credential
- Secure Note: Text information to store securely
-
Gather required information:
- Title for the item (required)
- Target vault (optional, uses default if not specified)
- Field values based on item type
-
Check for special requirements:
- Should password be auto-generated?
- Are there tags to apply?
- Any custom sections needed?
See Item Templates Reference for field requirements per type.
Phase 2: Secret Creation
Step 2: Gather Field Values
Based on the item type, collect the necessary field values:
Login:
username: Account username or emailpassword: Account password (or use--generate-password)url: Website URL (via--urlflag)
Password:
password: The password value (or use--generate-password)
API Credential:
credential: The API key or secretusername: Optional key identifier
Secure Note:
notesPlain: The note content
Step 3: Execute Create Command
Build and execute the appropriate op item create command.
See op CLI Create Command Reference for complete syntax.
Basic pattern:
op item create --category <CATEGORY> \
--title "<title>" \
[--vault "<vault>"] \
[field assignments...] \
--format json
With generated password:
op item create --category Login \
--title "<title>" \
--generate-password=24 \
username=<user> \
--format json
Step 4: Confirm Creation
- Parse JSON response to extract item details
- Verify creation by checking for item ID in response
- Present confirmation to user:
- Item title and ID
- Vault location
- Generated password (if applicable)
Step 5: Handle Errors
Common errors and resolutions:
| Error | Resolution |
|---|---|
vault not found |
List vaults with op vault list, verify name |
already exists |
Use different title or update existing item |
invalid category |
Use valid category: Login, Password, "API Credential", "Secure Note" |
missing required field |
Provide required fields for the category |
Reference Documentation
- op CLI Create Command Reference - Complete command syntax and options
- Item Templates Reference - Field structures for each item type
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?