shell-secrets
Skill1 starsChanged 3 months agoMITView on GitHub
Which API keys and secrets are loaded into the user's shell on every host, under which environment variable names, and how to add a new one. Use before asking the user for an API key or token, when a tool or script needs a credential (OpenRouter, Dokploy, fal.ai, MiniMax, Z.ai, Moonshot, OpenCode, React Bits), when an expected variable is empty, or when adding a secret to the NixOS config.
- Reads credentials
In this repository22 other files it gives its agents.
- skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- agent-browserSkill
- design-taste-frontendSkill
- fal-image-genSkill
- find-skillsSkill
- ft-netbird-shareSkill
- ft-readme-styleSkill
- ft-visual-styleSkill
- gitadelSkill
- impeccableSkill
- react-bits-proSkill
- react-doctorSkill
- researchSkill
- rust-best-practicesSkill
- scorchSkill
- supermemory-auditSkill
- svelte-code-writerSkill
- svelte-core-bestpracticesSkill
- unslopSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
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
- Very specific: line 12
All secrets are SOPS-encrypted in ~/nixos/secrets/*.json and rendered by the modules in ~/nixos/modules/nixos/services/sops/.
- Very specific: line 31
Not exported, on purpose: Gitadel (gtd reads /run/secrets/gitadel_api_token itself), Syncthing and SSH material (files), and service-only …
- Very specific: line 57
If a variable is missing on a host, the host has not been rebuilt since the module changed.
- Very specific: line 72
Import it in modules/nixos/services/sops/default.nix.
- Distinctive: line 73
Add a row to the table above (and remove or edit rows when a secret is removed or renamed).
≈ “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
Shell secrets
Keep this skill current. Whenever a secret is added, removed, renamed, or its variable changes in
~/nixos(secrets/*.jsonormodules/nixos/services/sops/), update the table below in the same change.
All secrets are SOPS-encrypted in ~/nixos/secrets/*.json and rendered by
the modules in ~/nixos/modules/nixos/services/sops/. Every module is on by
default, so all hosts (vd, kiwi, neo) get the same set. API keys meant for
the shell are rendered to ~/.secrets.d/<name>.fish (mode 0600), and fish
sources every file there at startup.
What is exported
| Variable | Source secret | Module | Also available as a file |
OPENROUTER_API_KEY | secrets/openrouter.json | default.nix | ~/.config/secrets/openrouter_api_key |
MOONSHOT_API_KEY | secrets/moonshot.json | default.nix | ~/.config/secrets/moonshot_ai |
DOKPLOY_API_KEY, DOKPLOY_URL | secrets/dokploy-fractal-tess.json (API_KEY) | dokploy.nix | – |
FAL_AI, FAL_KEY | secrets/fal-ai.json | fal-ai.nix | – |
MINIMAX_API_KEY | secrets/minimax.json | minimax.nix | ~/.config/secrets/minimax/apikey |
ZAI_API_KEY | secrets/z-ai.json | z-ai.nix | ~/.config/secrets/z-ai/apikey |
OPENCODE_VGFRACTAL, OPENCODE_VILIAN_GERDJIKOV | secrets/opencode.json | opencode.nix | – |
REACTBITS_LICENSE_KEY | secrets/reactbits.json | reactbits.nix | – |
Not exported, on purpose: Gitadel (gtd reads /run/secrets/gitadel_api_token
itself), Syncthing and SSH material (files), and service-only secrets
(clip-sync, shadoword, cliproxyapi; Supermemory's LLM router reads the
CLIProxyAPI client key as a systemd credential). secrets/hermes-agent.json
and secrets/supermemory.json (the old OpenRouter key) are not wired up
anywhere. secrets/bitwarden.json (bitwarden_master_password)
is a file only (/run/secrets/bitwarden_master_password), read by bw-agent
to unlock the vault; never read it directly. Account logins (website
usernames, passwords, 2FA codes) are not shell secrets: they come from
Bitwarden through bw-agent, see the bitwarden skill.
This table can drift. The live truth, names only:
grep -ho 'set -gx [A-Z_]*' ~/.secrets.d/*.fish | cut -d' ' -f3 | sortUsing a key from an agent shell
Agent shells are often zsh/bash and do not source fish files. Check the variable, then fall back to the rendered file. Never print the value.
[ -n "$OPENROUTER_API_KEY" ] || OPENROUTER_API_KEY=$(sed -n 's/^set -gx OPENROUTER_API_KEY "\(.*\)"$/\1/p' ~/.secrets.d/*.fish)If a variable is missing on a host, the host has not been rebuilt since the
module changed. Rebuild with the update script (nixos skill), then open a
new shell.
Adding a key
- Encrypt it:
cd ~/nixos && sops secrets/<name>.json(age key~/.config/sops/age/keys.txt, recipients in.sops.yaml). - Copy
modules/nixos/services/sops/dokploy.nix: asops.secrets.<name>(key = "<json field>"when the field name differs) and asops.templates."<name>.fish"withpath = "/home/${username}/.secrets.d/<name>.fish"andset -gx VAR "${config.sops.placeholder.<name>}". Makeenabledefault totrue(mkEnableOption "…" // { default = true; }). Do not add per-host toggles: hosts only setmodules.services.sops.enable = true. - Import it in
modules/nixos/services/sops/default.nix. - Add a row to the table above (and remove or edit rows when a secret is removed or renamed).
- Rebuild all hosts with the update script.
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.

