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
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- explorations/AGENTS.mdAGENTS.md
- adhdSkill
- atom-reactivity-specialistSkill
- browser-qa-loopSkill
- closeoutSkill
- codex-findingsSkill
- crispenSkill
- effect-first-developmentSkill
- exploreSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- jsdoc-annotation-specialistSkill
- motion-evidence-reviewSkill
- ontology-architectSkill
- ontology-conceptualizerSkill
- ontology-curatorSkill
- ontology-foundational-auditorSkill
- ontology-mapperSkill
- ontology-requirementsSkill
- ontology-scoutSkill
- ontology-validatorSkill
- operator-handoffSkill
- orchestrateSkill
- plasma-sensitive-entrySkill
- portlessSkill
- qa-session-opsSkill
- quality-review-fix-loopSkill
- reflectSkill
- remote-development-agentsSkill
- schema-first-developmentSkill
- shadcnSkill
- sparql-expertSkill
- teachSkill
- turborepoSkill
- unslopSkill
- yeetSkill
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
- Very specific: line 10
Use this skill only when the user explicitly asks to work with 1Password, op:// secret references, 1Password Developer Environments, op …
- Distinctive: line 17
Never ask the user to paste raw secret values.
- Distinctive: line 18
Never print, summarize, or store raw secret values.
- Distinctive: line 20
Prefer 1Password MCP for 1Password Developer Environments.
- Very specific: line 21
If the MCP server is unavailable, insufficient for vault item inspection, or blocked by the local approval client, fall back to sanitized …
- Very specific: line 24
Before listing vault/item/field metadata, confirm the user asked for a secret-reference inventory or that the metadata is required to edit …
- Distinctive: line 27
When reading 1Password item JSON, pipe through a filter that emits only the minimum metadata required for the requested edit.
- Very specific: line 33
Keep tracked examples commit-safe.
- Distinctive: line 46
Before any vault, item, or reference operation, verify the route without printing credential or item data:
- Very specific: line 70
If it succeeds, use that same lane-scoped wrapper for the real command.
- Distinctive: line 121
If item lookup by title is ambiguous and the user asked you to resolve it, display only the minimum disambiguation needed.
- Distinctive: line 129
Do not run commands that output unfiltered item JSON into chat or tool results.
- Distinctive: line 130
Do not paste inventory tables into the final answer unless the user explicitly requested inventory display.
- Distinctive: line 135
When redesigning env files:
- Very specific: line 139
Use empty values or placeholder refs in .env.example.
- Very specific: line 140
Use actual op://... references in ignored .env files only when the user requested that file edit.
- Distinctive: line 142
Prefer stable field names over duplicate aliases unless the code requires both.
- Distinctive: line 143
If runtime tooling expects plaintext values, document the wrapper command:
≈ “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.
Files
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
opCLI 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.exampleshould 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-doctorcommand -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/nullIf 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.envfiles 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 whetherop-doctorpassed; 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.
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
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.

