agentleFS
tyler-berggrentyler-berggren/tb-claude-kit/.claude/skills/1password/SKILL.md

1password

Skill2 starsChanged 5 days agoMITView on GitHub

Set up, check, or migrate 1Password secret management for this project — bootstrap service accounts, convert plaintext .env to op:// references, troubleshoot resolution.

  • Reads credentials

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use creative-project, labs-graduation and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • openclawSkill

    creative-project

    Design or revise branding, visual identities, logos, posters, illustrations, and social-media assets using project artwork or image references. Inspect the existing visual language, choose references, and iterate on named candidates.

    Also in 5 projects that use this

  • openclawSkill

    labs-graduation

    Move a feature out of Control UI Labs, either on by default or still off by default. Use when asked to promote, graduate or ship a Labs feature.

    Also in 5 projects that use this

  • friuns2Skill

    discord-e2e

    Test Discord with Convex-leased QA bots: check credentials without a Gateway, exercise owned messages, or prove OpenClaw replies, files, threads, reactions, streaming, and typing. Distinguish API and Gateway evidence from manual user interactions.

    Also in 10 projects that use this

  • friuns2Skill

    openclaw-repair-sweep

    Run scoped OpenClaw issue/PR repair campaigns: coordinate workers, prove root causes, and land or close verified work under the requested authority.

    Also in 10 projects that use this

  • clawdbotSkill

    openclaw-performance

    Performance work in OpenClaw: a slow or heavy flow (latency, CPU, memory, SQL, RPC, renders), writing or reviewing a perf PR, or adding a cache. Count the work, delete waste first, cache last.

    Also in 8 projects that use this

  • clawdbotSkill

    plugin-sdk-impact

    Count Plugin SDK consumers across live ClawHub releases and bundled OpenClaw plugins before deprecation, removal, or behavior changes; supports public release-date filters.

    Also in 8 projects that use this

  • +2 more from friuns2

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 10 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 44 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the user which 1Password vault to use.

    line 49
  2. Very specific:

    Add secrets block to .claude/kit.json:

    line 61
  3. Distinctive:

    Check if a service account already exists for this vault:

    line 69
  4. Distinctive:

    If no service account exists, bootstrap one:

    line 74
  5. Very specific:

    If there's a plaintext .env, proceed to migrate automatically.

    line 85
  6. Distinctive:

    Check if the value already exists as an item in the vault:

    line 94
  7. Distinctive:

    Search by title match or by field value match.

    line 98
  8. Distinctive:

    If no existing item, create one:

    line 100
  9. Distinctive:

    Use the comment or variable name context to pick a descriptive title.

    line 109
  10. Distinctive:

    After rewriting, verify resolution:

    line 120
  11. Distinctive:

    Verify the full chain works:

    line 131
  12. Distinctive:

    Run diagnostics in order:

    line 153
  13. Very specific:

    If .claude/kit.json has a rules."1password" entry, read it and apply it as an additional instruction for this skill.

    line 198

“Common” is measured: kept by at least 6 in 10 of the 44 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

1Password Secret Management

Manage project secrets through 1Password using the oprun wrapper and per-vault service accounts.

Subcommands

CommandWhat it does
/1passwordAuto-detect: if not configured, run setup; if configured, run check
/1password setupFull setup: configure kit.json, bootstrap a service account, create vault items, rewrite .env
/1password checkVerify the current configuration works — vault access, .env resolution, .mcp.json references
/1password migrateConvert an existing plaintext .env to op:// references (creates vault items, rewrites .env)
/1password troubleshootDiagnose why secrets aren't resolving

Procedure

1. Read current state

# kit.json secrets config
jq -r '.secrets // empty' .claude/kit.json 2>/dev/null

# Current .env (check for plaintext vs op:// references)
head -30 .env 2>/dev/null || echo "no .env"

# Service account in Keychain
VAULT=$(jq -r '.secrets.vault // empty' .claude/kit.json 2>/dev/null)
[ -n "$VAULT" ] && security find-generic-password -a "$USER" -s "op-sa-$VAULT" >/dev/null 2>&1 && echo "Keychain: op-sa-$VAULT found" || echo "Keychain: op-sa-$VAULT NOT found"

# oprun availability
~/.claude-kit/scripts/oprun check 2>&1 || true

Determine the subcommand from the user's argument, or auto-detect:

  • No secrets block in kit.json → suggest setup
  • Has secrets but .env has plaintext values → suggest migrate
  • Fully configured → run check

2. Setup

Only if the user asked for setup or the auto-detect suggests it.

Ask the user which 1Password vault to use. If they don't know, list available vaults:

env -u OP_SERVICE_ACCOUNT_TOKEN op vault list --format json 2>&1 | python3 -c "
import sys, json
for v in json.loads(sys.stdin.read()):
    print(f'  {v[\"name\"]} ({v[\"id\"]})')
"

Then:

  1. Add secrets block to .claude/kit.json:
    "secrets": {
      "vault": "<vault-name>",
      "account": "my.1password.com"
    }
  2. Check if a service account already exists for this vault:
    security find-generic-password -a "$USER" -s "op-sa-<vault>" >/dev/null 2>&1 && echo "EXISTS" || echo "NEEDS BOOTSTRAP"
  3. If no service account exists, bootstrap one:
    ~/.claude-kit/scripts/op-sa-bootstrap "<vault>" --account my.1password.com
    This requires Touch ID — tell the user to approve the prompt.
  4. Verify:
    ~/.claude-kit/scripts/oprun check
  5. If there's a plaintext .env, proceed to migrate automatically.

3. Migrate

Convert plaintext .env values to op:// references.

For each secret in .env that is NOT already an op:// reference and is NOT a plain identifier (account IDs, hostnames, ports, URLs, project names):

  1. Check if the value already exists as an item in the vault:
    ~/.claude-kit/scripts/oprun op item list --vault "<vault>" --format json
    Search by title match or by field value match.
  2. If no existing item, create one:
    env -u OP_SERVICE_ACCOUNT_TOKEN op item create \
      --vault "<vault>" \
      --category "API Credential" \
      --title "<service-name>" \
      "<field_name>=<value>" \
      --format json
    Use the comment or variable name context to pick a descriptive title.
  3. Rewrite the .env line to use the op:// reference:
    VAR_NAME=op://<vault>/<item-id>/<field_name>
  4. Also check .mcp.json for plaintext keys in server env blocks. Common shared keys (Brave, Firecrawl, Perplexity) may already have items in a shared vault — check before creating duplicates.
  5. After rewriting, verify resolution:
    ~/.claude-kit/scripts/oprun get <VAR_NAME>

What stays plaintext: Account IDs, hostnames, ports, S3 endpoints, project names, email addresses, non-secret configuration. The rule: if the value appears in documentation or config files and wouldn't be useful to an attacker on its own, it stays plain.

4. Check

Verify the full chain works:

# 1. kit.json has secrets config
jq -r '.secrets.vault' .claude/kit.json 2>/dev/null

# 2. Service account can reach the vault
~/.claude-kit/scripts/oprun check

# 3. Every op:// reference in .env resolves
~/.claude-kit/scripts/oprun -- printenv 2>&1 | head -5

# 4. .mcp.json references resolve (if any)
grep -o 'op://[^"]*' .mcp.json 2>/dev/null | while read ref; do
  ~/.claude-kit/scripts/oprun op read "$ref" >/dev/null 2>&1 && echo "  OK: $ref" || echo "  FAIL: $ref"
done

Report: vault name, auth method, number of references resolved, any failures.

5. Troubleshoot

Run diagnostics in order:

# 1. Is op CLI installed?
which op && op --version

# 2. Is kit.json configured?
jq '.secrets' .claude/kit.json 2>/dev/null || echo "No secrets config in kit.json"

# 3. Is there a Keychain entry?
VAULT=$(jq -r '.secrets.vault' .claude/kit.json 2>/dev/null)
security find-generic-password -a "$USER" -s "op-sa-$VAULT" >/dev/null 2>&1 \
  && echo "Keychain entry exists" || echo "NO Keychain entry — run: ~/.claude-kit/scripts/op-sa-bootstrap $VAULT"

# 4. Can the service account reach the vault?
~/.claude-kit/scripts/oprun check 2>&1

# 5. Can a specific reference resolve?
grep -m1 'op://' .env 2>/dev/null | cut -d= -f2 | while read ref; do
  ~/.claude-kit/scripts/oprun op read "$ref" >/dev/null 2>&1 \
    && echo "Reference resolves: $ref" || echo "FAILED to resolve: $ref"
done

Common failure modes:

  • "no .claude/kit.json above $PWD" → add secrets block to kit.json
  • "no Keychain item" → run op-sa-bootstrap <vault>
  • "Service Account Deleted" → token was revoked; re-run op-sa-bootstrap <vault> --rotate
  • "did not answer within Ns" → macOS TCC dialog blocking; dismiss it, or the service account token is wrong
  • "expected the token to see 1 vault, it sees N" → service account has multiple vault access; recreate with single vault
  • Reference fails but oprun check passes → item ID may be wrong, or field name doesn't match; verify with oprun op item get <item-id> --vault <vault>

Rules

  • Never print resolved secret values — use head -c N or mask them. The point of 1Password is that secrets stay out of transcripts.
  • Never modify the oprun or op-sa-bootstrap scripts — they live in the kit and are shared across all projects.
  • Reference items by ID, not title — op://vault/<item-id>/field costs 1 API call; op://vault/Item Title/field costs 3. Item IDs are the 26-character alphanumeric strings returned by op item create/list.
  • One vault per project — the service account model is one token per vault. A project that needs secrets from two vaults should consolidate into one, or use the desktop-app path for the secondary vault.
  • Plain values stay plain — account IDs, hostnames, project names, and non-secret config do not belong in 1Password. Only credentials, tokens, and keys get op:// references.
  • Ask before creating items — confirm the vault and item names with the user before writing to 1Password, especially when migrating an existing .env with many secrets.

Project overrides

If .claude/kit.json has a rules."1password" entry, read it and apply it as an additional instruction for this skill. Absent file or key means no overrides — that is the normal case.

jq -r '.rules."1password" // empty' .claude/kit.json 2>/dev/null

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.