agentleFS
kriegcloudkriegcloud/beep-effect/.claude/skills/onepassword-secret-refs/SKILL.md

onepassword-secret-refs

Skill78 starsChanged 8 days agoApache-2.0View on GitHub

Safe 1Password workflows for Claude/Codex when the user explicitly asks for Developer Environments, op:// secret references, or env-file rewrites.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 11 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Use this skill only when the user explicitly asks to work with 1Password, op:// secret references, 1Password Developer Environments, op …

    line 10
  2. Distinctive:

    Never ask the user to paste raw secret values.

    line 17
  3. Distinctive:

    Never print, summarize, or store raw secret values.

    line 18
  4. Distinctive:

    Prefer 1Password MCP for 1Password Developer Environments.

    line 20
  5. Very specific:

    If the MCP server is unavailable, insufficient for vault item inspection, or blocked by the local approval client, fall back to sanitized …

    line 21
  6. Very specific:

    Before listing vault/item/field metadata, confirm the user asked for a secret-reference inventory or that the metadata is required to edit …

    line 24
  7. Distinctive:

    When reading 1Password item JSON, pipe through a filter that emits only the minimum metadata required for the requested edit.

    line 27
  8. Very specific:

    Keep tracked examples commit-safe.

    line 33
  9. Distinctive:

    Before any vault, item, or reference operation, verify the route without printing credential or item data:

    line 46
  10. Very specific:

    If it succeeds, use that same lane-scoped wrapper for the real command.

    line 70
  11. Distinctive:

    If item lookup by title is ambiguous and the user asked you to resolve it, display only the minimum disambiguation needed.

    line 121
  12. Distinctive:

    Do not run commands that output unfiltered item JSON into chat or tool results.

    line 129
  13. Distinctive:

    Do not paste inventory tables into the final answer unless the user explicitly requested inventory display.

    line 130
  14. Distinctive:

    When redesigning env files:

    line 135
  15. Very specific:

    Use empty values or placeholder refs in .env.example.

    line 139
  16. Very specific:

    Use actual op://... references in ignored .env files only when the user requested that file edit.

    line 140
  17. Distinctive:

    Prefer stable field names over duplicate aliases unless the code requires both.

    line 142
  18. Distinctive:

    If runtime tooling expects plaintext values, document the wrapper command:

    line 143

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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 References

Use this skill only when the user explicitly asks to work with 1Password, op:// secret references, 1Password Developer Environments, op CLI, or secret-reference-backed env files. Do not activate for ordinary .env edits unless 1Password or op:// references are part of the request.

Non-Negotiables

  • Never ask the user to paste raw secret values.
  • Never print, summarize, or store raw secret values.
  • Never use --reveal.
  • Prefer 1Password MCP for 1Password Developer Environments.
  • If the MCP server is unavailable, insufficient for vault item inspection, or blocked by the local approval client, fall back to sanitized op CLI metadata commands and report that MCP was skipped for that part.
  • Before listing vault/item/field metadata, confirm the user asked for a secret-reference inventory or that the metadata is required to edit the named target files.
  • When reading 1Password item JSON, pipe through a filter that emits only the minimum metadata required for the requested edit. Prefer writing refs directly to the target file over displaying inventory rows in chat.
  • In final/status reports, summarize counts and changed files. Do not repeat vault names, item names, field ids, section labels, account names, or item lists unless the user explicitly requested those exact metadata details.
  • Keep tracked examples commit-safe. .env.example should contain placeholders, documentation, or secret references only; never real secret values.

Agent Authentication (managed workstations)

On Benjamin's managed workstations every agent invocation of the 1Password CLI resolves op from PATH, never the system binary by absolute path: the user-local PATH shim loads exactly one automation credential (a service account by default, or the local Connect server with OP_AGENT_BACKEND=connect), exports OP_BIOMETRIC_UNLOCK_ENABLED=false, and exits 78 with one stderr line when no agent credential exists. Desktop-app integration, op signin, and desktop MCP approval loops are human paths and are never retried by agents.

Before any vault, item, or reference operation, verify the route without printing credential or item data:

command -v op
op-doctor

command -v op must resolve to the user-local shim, not the system binary. On any 1Password failure, run op-doctor once and act on its count/type/mode-only output. Do not ask the operator to unlock the desktop app, do not run op signin, and do not bypass the shim. If the required secret operation still cannot proceed, report the failing doctor line and stop.

Minimal Diagnosis

For an existing op://-backed env file, test the exact wrapper operation first and suppress successful output:

op run --env-file=<path> -- true >/dev/null

If it succeeds, use that same lane-scoped wrapper for the real command. If it fails, run op-doctor and use only its sanitized result. Never use --reveal, shell tracing, environment dumps, or raw item JSON in transcripts; send verification reads to /dev/null or reduce them to a boolean, count, or byte count. Preserve op:// references instead of resolving them into tracked files.

Quota rule: the live service-account limit is 1,000 reads per hour per token, and a name-based op:// reference costs three reads (a UUID reference costs one). A fan-out of N lanes over a template with R references can cost up to N x R x 3 reads. Above roughly 600 reads per hour, launch lanes on the Connect backend, which caches locally and is not quota'd (it covers BEEP_SECRETS but not BEEP_CI), or convert the template to UUID references:

env OP_AGENT_BACKEND=connect op run --env-file=<path> -- <lane command>

MCP Usage

The official 1password-mcp is the desktop Environments MCP: it cannot return secret values and is not a replacement for the service account or Connect. Use it only when the user explicitly requests a Developer Environments workflow and accepts the human desktop path. It is irrelevant to unattended agent secret retrieval. Tools that read OP_SERVICE_ACCOUNT_TOKEN or OP_CONNECT_* themselves instead of calling op are launched as op-agent-auth exec -- <trusted-command>.

Secret-Reference Lookup

To find refs for fields in a user-named vault/item, emit only the requested reference metadata. Prefer redirecting to a local scratch file and reporting only the number of refs found:

op item get "<item>" \
  --vault "<vault>" \
  --format json \
  | jq -r '
      .fields[]
      | select(.reference != null)
      | [
          (.section.label // ""),
          (.label // ""),
          (.id // ""),
          .reference
        ]
      | @tsv
    '

If item lookup by title is ambiguous and the user asked you to resolve it, display only the minimum disambiguation needed. Prefer counts first:

op item list --vault "<vault>" --format json \
  | jq -r '[.[] | select(.title == "<item>")] | length'

Do not run commands that output unfiltered item JSON into chat or tool results. Do not paste inventory tables into the final answer unless the user explicitly requested inventory display.

.env And .env.example

When redesigning env files:

  • Inventory required variables from scripts, package configs, tests, and docs.
  • Group variables by subsystem with short comments only where useful.
  • Use empty values or placeholder refs in .env.example.
  • Use actual op://... references in ignored .env files only when the user requested that file edit.
  • Prefer stable field names over duplicate aliases unless the code requires both.
  • If runtime tooling expects plaintext values, document the wrapper command:
op run --env-file=.env -- <command>

Safe Closeout

Report:

  • Which backend the shim used (op-agent-auth status: service account or Connect) and whether op-doctor passed; on failure, the single failing doctor line, never a desktop sign-in status.
  • Whether the desktop Environments MCP was used or skipped.
  • Which files changed.
  • How many secret references were written or displayed.
  • Any remaining operator action, such as rotating the service account or granting a vault to the Connect server. Never list "unlock 1Password desktop" as an agent remediation.

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.