Credential Store
Skill0 starsChanged 4 months agoMITView on GitHub
Get every credential OFF this machine's disk and into one store — so shell rc files, git, gh, and tool configs REFERENCE a secret at use time instead of embedding it. Use to SET UP a store and migrate literal tokens into it, REPAIR a reference that stopped resolving (locked store, empty variable, non-interactive shell), UPGRADE by rotating a credential or moving to a better store, or OPTIMIZE by auditing every surface for plaintext. A secret's VALUE never enters the model's context — detection reports names, paths, and classifications only, and every operation needing real plaintext runs out of band.
- Reads credentials
In this repository12 other files it gives its agents.
- Brew DoctorSkill
- Dev EnvironmentSkill
- DotfilesSkill
- Ghostty ConfigSkill
- Git SetupSkill
- Identity ProfilesSkill
- macOS DefaultsSkill
- Neovim ConfigSkill
- Runtime VersionsSkill
- Shell SyncSkill
- SSH ConfigSkill
- Terminal ThemeSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
no findings → report it and stop.
- Very specific: line 58
Read-only inspectors in scripts/.
- Very specific: line 75
A store you can't use is not a store: Never recommend a destination store_status.py reports as absent.
- Very specific: line 84
Read ~/.config/devenv/config.toml.
- Very specific: line 108
Never run a store CLI in a way that prints a secret (op read into a report, security … -w captured for display, gh auth token).
≈ “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
Credential store
One store holds every secret; everything else references it. A shell rc line reads
export GITHUB_TOKEN="$(security find-generic-password -s GITHUB_TOKEN -w)" — not the token. The
credential lives in exactly one place, rotating it is a one-line change, and nothing readable on
disk is worth stealing.
The golden rule is verification-first: prove a migration by resolving the value in a fresh login shell and confirming the plaintext is gone — never by editing the rc file and assuming.
The hard control — a secret's value never enters this session
Never read, print,
cat,grep -o, or echo a credential's value. This holds after a finding too: never open a flagged file to "confirm what tripped it" — thepath + name + classificationrow is the complete evidence, and one confirmation read defeats the entire pipeline. The scripts are built so this is structural, not careful:scan_assignmentsclassifies a value and discards it, so a finding physically cannot carry one.Operations that need real plaintext — writing a secret into the store, unlocking a manager, copying a token — run out of band: the user runs them (e.g. via the
!prefix), or the value is piped between tools without passing through a report. For files that are secret by location, the plugin'sPreToolUseguard (scripts/secret_read_guard.py) enforces this mechanically — treat a denial as the contract working.
Route to a workflow
| The user wants to… | Workflow |
| Pick a store and migrate literal credentials into it | reference/setup.md |
| Fix a reference that stopped resolving (empty var, locked store, non-interactive shell) | reference/repair.md |
| Rotate a credential, or move to a different store | reference/upgrade.md |
| Audit every surface for plaintext, with a prioritized report | reference/optimize.md |
| Prove a migrated secret resolves and the plaintext is gone | reference/verification.md |
No workflow named? (a bare /credential-store) — triage first: run scripts/credential_audit.py:
- any 🔴 → setup if no store exists yet, else repair/migrate.
- only 🟡 → offer optimize.
- no findings → report it and stop.
The four surfaces
| Surface | Where a credential hides | Reference form |
| shell | export FOO_TOKEN=… in a zsh/fish rc — also exported into every process you launch | $(security find-generic-password -s FOO -w) / $(op read …) |
| files | ~/.aws/credentials, ~/.netrc, ~/.npmrc, ~/.git-credentials — plaintext by location | a store-backed credential_process, or delete + reference |
| git | credential.helper=store writes ~/.git-credentials in cleartext | credential.helper=osxkeychain |
| gh | a token in ~/.config/gh/hosts.yml instead of the keyring | gh auth login with keyring storage |
The scripts (call these, don't re-derive them)
Read-only inspectors in scripts/. The mutation — writing a secret into a
store and editing the rc line — is done by the user, out of band.
| Need | Script |
| Sweep every surface for plaintext (run first) | scripts/credential_audit.py |
| Just the shell rc sweep, fast | scripts/credential_audit.py --shell-only |
| A redacted inventory of every assignment, for reviewing what the name heuristic missed | scripts/credential_audit.py --all-assignments |
| Which stores exist here, and the reference form for the recommended one | scripts/store_status.py |
Core principles
- Literal vs. reference is the whole question. Not "is there a secret" (that's
dotfiles' pre-commit tripwire) but "is this value on disk, or fetched at use time."credential_audit.pyclassifies every credential-shaped assignment into exactly that. - A finding names, never quotes. Variable names, file paths, line numbers, and modes are metadata and are reported — they're what makes a finding actionable. Values are not.
- A store you can't use is not a store. Never recommend a destination
store_status.pyreports as absent; a migration into a store the machine can't reach just breaks the shell. - Migrate one credential at a time, verifying each. A batch migration that half-works leaves a shell that can't authenticate and no clear culprit.
- Deleting the plaintext is part of the migration. A secret copied into a store but left in the rc file is strictly worse than before — now it's in two places.
Settings
Read ~/.config/devenv/config.toml; if a [credential-store] section exists, use it as defaults
(precedence: explicit > config > ask). Managed by the devenv skill. Keys honored:
store— the destination store (keychain,1password,pass,chezmoi-encryption).allow_file_reference—trueto accept$(cat …)as adequate (defaultfalse).
Boundaries with the other skills
- dotfiles owns secrets in the chezmoi source tree — the pre-commit question, plus
ageencryption and password-manager templating (secrets.md). This skill owns the live machine: what's in the rc files and config files you actually use. When a file needs to be both tracked and secret, migrate it here, then track it there. - ssh-config owns private keys, passphrases, and the agent. A private key is not migrated into a
credential store — it stays in
~/.sshwith correct modes. - git-setup owns
credential.helperas a git setting; this skill flags it when the chosen helper stores cleartext. - shell-sync owns the rc files' structure and zsh↔fish parity; this skill only changes the right-hand side of a credential assignment, and a migrated line must be mirrored to both shells.
Safety
- Back up any rc file before editing it (timestamped copy).
- Never delete a plaintext credential until the reference is proven to resolve. Order: store it → switch the line → verify in a new login shell → then remove the original.
- A rotation invalidates the old value everywhere. Enumerate what consumes it before rotating.
- Never run a store CLI in a way that prints a secret (
op readinto a report,security … -wcaptured for display,gh auth token). Their output goes into the environment, not into a message.
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.

