secret-handoff
Skill4 starsChanged 3 months agoApache-2.0View on GitHub
Fleet secret handling — handoff file, Infisical, Coolify token split, grep trap, leak response. Load BEFORE any command that might touch a credential, before reading ~/.secrets, Infisical, .env, or vault output, and before debugging auth. Trigger even when the user does not say "secret."
- Reads credentials
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apple-notesSkill
- board-opsSkill
- closeoutSkill
- codex-triageSkill
- deploy-verifySkill
- dns-and-registrarsSkill
- drive-grok-tuiSkill
- fleet-coordinationSkill
- fleet-infraSkill
- land-laneSkill
- mac-cleanupSkill
- owner-copySkill
- pickup-seatSkill
- sentence-gapSkill
- session-startSkill
- unstick-prSkill
- windows-releaseSkill
- phone-harnessSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
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
- Distinctive: line 18
Redact in the same command that touches the secret: If you are deciding whether output is safe to show, you are already too late — it is in …
- Very specific: line 65
Prefer bash scripts/infisical-secrets-safe.sh {set|has|names} --projectId … --env prod.
- Very specific: line 74
Never put COOLIFY_AGENTS into Infisical as app COOLIFY_API_TOKEN.
- Distinctive: line 78
Do not declare a Cloudflare credential dead without a real resource call.
- Distinctive: line 90
Delete scratch files / Slack / GitHub comments you can still edit.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Secret handoff (MONET)
Shared
~/.claude/skills. Monet, Claude/Fable, and (when active) Renoir all load this directory. Do not treat the word Monet in examples as proof of your seat. PinAGENT_SEAT/AGENT_TAGfrom the logged-in account before Slack orboard --by:
- Monet →
MONET, NotesMonet,monet/,~/apps/<app>-monet- Claude / Fable →
CLAUDE, NotesClaude,claude/,~/apps/<app>-claude- Renoir →
RENOIR, NotesRenoir,renoir/,~/apps/<app>-renoirCursor, Grok, Grok Bot, Codex, AG, DeepSeek, Kimi, and Fx have their own skill dirs and must not take identity from here.
Load ~/.claude/skills/secret-safety/SKILL.md as well when that file exists. This skill is the fleet overlay.
Redact in the same command that touches the secret. If you are deciding whether output is safe to show, you are already too late — it is in the transcript.
One canonical handoff file
/Users/jay/.secrets/global-api-keys (no extension). There is no global-api-keys.env to use. The superseded sibling is a recovery net, not a source.
Cloud: GET https://mac.jays.services/files/key-names with the same Bearer as /files (MAC_COLLAB_TOKEN). Use names-only lookup; runtime keys are managed via Infisical per app.
Infisical (the app's own project, prod) is the source of truth for deployed app runtime secrets. The handoff file is operator convenience and may go stale. Copy cross-app keys into the consuming Infisical project (store-to-store), do not teach the app to read the handoff file.
Owner drops a chmod 600 file and gives you the path. Never print the value. Prefer scoped, revocable credentials. Remind the owner they can revoke when the task is done.
Handoff-file grep trap (2026-08-14)
A tool result that contains even one KEY=value line has leaked.
Forbidden:
cat ~/.secrets/global-api-keys
grep '^[A-Z0-9_]+=' ~/.secrets/global-api-keys
grep '^ADMIN' ~/.secrets/global-api-keys
rg TOKEN ~/.secrets/
# Read / open-file / less / bat on that pathAllowed:
grep -oE '^[A-Z][A-Z0-9_]*' ~/.secrets/global-api-keys | sort -u
TOKEN="$(grep -m1 '^SOME_KEY=' ~/.secrets/global-api-keys | cut -d= -f2- | tr -d '"')"
some-command 2>&1 | sed "s/${TOKEN}/[REDACTED]/g"Your file-read tool is cat for this purpose. Do not "just look" with Read because grep quoting confused you.
Infisical
Never:
infisical secrets
infisical secrets --output json
infisical secrets get KEY --plain # unless immediately reduced to lengthPrefer bash scripts/infisical-secrets-safe.sh {set|has|names} --projectId … --env prod. Verify writes by key presence and length, never by printing the value.
Coolify
| Key | Allowed use |
COOLIFY_SERVER_STATS | Read-only metrics / server-stats UI |
COOLIFY_AGENTS | Agent deploy/admin only |
Never put COOLIFY_AGENTS into Infisical as app COOLIFY_API_TOKEN. Prefer env vars over --token flags (ps and debug loggers).
Cloudflare "dead token" (2026-08-13)
Do not declare a Cloudflare credential dead without a real resource call.
/user/tokens/verifyonly understands user-owned tokens. Account-owned tokens 401 there by design — use/accounts/{id}/tokens/verifyorGET /zones.- Global API Key "9103 Unknown X-Auth-Key" can mean the wrong email, not a dead key. This fleet has multiple Cloudflare logins. Try the pairing in AGENT-SYNC / the handoff file's CLOUDFLARE section (names only) before concluding.
Empty success:true on a filtered Bearer call means "valid, not scoped to that filter," not dead. Prefer CLOUDFLARE_FLEET_API_TOKEN for ordinary work.
If it leaks
- Stop.
- Name exactly which credential (the owner already has it).
- Tell the owner to rotate.
- Delete scratch files / Slack / GitHub comments you can still edit. Do not force-push git history. You cannot edit a prior chat turn — say so.
- Change the technique, not "be more careful."
Canon
/Users/jay/apps/AGENT-SYNC.md§ Secret handoff, Infisical, Coolify, grep trap, leak response~/.claude/skills/secret-safety/SKILL.md- Coordinator
docs/rollouts/2026-08-15-secret-file-grep-ban.md
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.

