secrets-safety
Use when writing any bash command, script, or tool call that could touch credentials, API keys, passwords, or a designated secrets file (e.g. config.conf). Also use before proposing any operation that reads environment variables, config files, or external secrets stores.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- secrets-safety
- description
- Use when writing any bash command, script, or tool call that could touch credentials, API keys, passwords, or a designated secrets file (e.g. config.conf). Also use before proposing any operation that reads environment variables, config files, or external secrets stores.
03 SKILL.md 正文
Secrets Safety
Overview
Agents must never read, echo, or expose secrets. The sandbox filesystem restriction on the designated secrets file is a structural safety net — it is not a substitute for correct behavior. The rule is unconditional: if an operation requires a credential, the user runs it, not the agent.
Core principle: Agents propose; users execute anything that touches secrets.
Hard Rules (no exceptions)
-
Never read the secrets file. Do not write scripts that read
config.conf(or the user's designated secrets file/folder). Not even to "just check a value." Not even with-sor suppressed output. -
Never echo secrets. Do not print, log, or interpolate secrets into visible output.
# FORBIDDEN PASSWORD=$(grep DECO_PASSWORD config.conf | cut -d= -f2) echo "Using password: $PASSWORD" # FORBIDDEN — value visible in process list / output curl -u "admin:$PASSWORD" http://... -
Suppress output of commands that may touch secrets. If a script must pass a credential (because the user provided it inline), silence the output:
# OK — secret never echoed, output suppressed curl -s -o /dev/null -d "password=..." http://... -
Credential-touching operations belong to the user. Propose the exact command; let the user run it. Do not execute it on their behalf.
What Counts as a "Secrets Source"
The user's secrets may live in any of these forms:
- Single file — e.g.,
config.conf - Folder — e.g.,
secrets/(treat every file inside as secret) - File pattern — e.g.,
.env.*(covers.env.local,.env.production, etc.)
The default is config.conf. The user may designate a different file, folder, or pattern.
Treat any file the user describes as containing credentials, tokens, or passwords with the
same rules — even if the sandbox does not explicitly block it. When in doubt, ask the user
which secrets source applies rather than guessing.
Red Flags — STOP, you are about to violate this rule
- You are about to write
grep ... config.confin any script. - You are about to assign a secret to a shell variable and then use it in a command.
- You are about to
echo,cat,printf, orloga value that came from a config file. - You are about to run a command that requires a credential on behalf of the user.
- You are thinking "the sandbox blocks it anyway, so it's fine."
All of these mean: stop. Propose the operation. Let the user run it.
Rationalization Table
| Excuse | Reality |
|---|---|
| "The sandbox blocks config.conf reads anyway." | Structural protection is a fallback, not a license. Behavior must be correct regardless. |
"I'm using -s so the output is suppressed." |
Suppressing output doesn't make reading the file safe — the value is still in the agent's context. |
| "I need to verify the credential to help the user." | You do not. Propose the command; the user verifies. |
| "I'll assign to a variable but won't print it." | Variables in scripts can leak via set -x, error messages, or process lists. |
| "It's just a quick check." | No credential read is quick or safe. |
Common Mistakes
| Mistake | Fix |
|---|---|
| Reading secrets file to construct a curl command | Write the curl with a placeholder; tell the user to substitute the value themselves. |
| Echoing a secret "to confirm it loaded" | Never confirm by echoing. Trust that the user's credential file is correct. |
Running env or printenv to debug auth issues |
Ask the user to run it and share only the relevant non-secret variable names. |
| Passing secrets via command-line flags | Secrets in flags appear in process listings. Prefer environment variables the user exports, or stdin with read -s. |
Integration
This skill is REQUIRED in all dev flows. Before any bash command or script is written, verify it complies with the rules above.
REQUIRED: Reference this skill from dev-flow and any project setup skill.
04 同仓库更多 Skills
setup-git-credentials
Use when the user wants Git to stop using a PAT in the remote URL or a plain-text credential store, wants Git Credential Manager (GCM) with OAuth for GitHub, GitLab or Azure DevOps on Ubuntu/Debian or WSL2, or sees 'cannot persist Microsoft authentication token cache securely' / 'using plain-text fallback token cache'. Asks whether this is WSL, which Git hosts and which parts to set up, checks what is already done, sets git config itself after confirmation and hands every sudo or interactive step (apt, gpg, pass init, secret-tool, first sign-in) to the user. Bundles gcm-keyring-session.sh to start or reuse a D-Bus + GNOME Keyring session without systemd. Trigger terms - git credentials, PAT in URL, token in remote, git credential manager, gcm, github auth, gitlab auth, azure devops auth, pass, gpg store, secret service, gnome keyring, msal token cache, wsl git auth.
setup-flow
Use when onboarding a repository or agent to the standard development workflow — installs the required skills from the ai.skills store, installs or updates a MANDATORY workflow block in the agent's instruction file (CLAUDE.md, AGENTS.md, GEMINI.md, Copilot or Cursor rules), AND configures .claude/settings.json with Serena MCP, sandbox, permissions, hooks, and plugins. Hooks are wired to the context-hooks kit, which speaks once per session instead of injecting text on every turn; re-running replaces earlier inline hooks rather than adding to them. Also writes .vscode/settings.json to hide the empty shell dotfiles an agent sandbox leaves in the repo root. Use when setting up a new repo, switching agents, or refreshing the workflow rules.
developer-flow
Use when starting, implementing, or completing any feature, change, or fix in any software project — at feature start, before writing code, and before claiming a change is done, fixed, working, or green. A strict ordered flow with a gate per phase; stack-agnostic and repo-agnostic (OpenSpec optional, gates discovered).
daily-log-check
Use to check whether everyone on duty filed their Azure DevOps time-log Tasks for a given day, per platform — reports tickets, hours and activities per person against the headcount you give. Fires on "did everyone log yesterday", "check web 4 mobile 3", "who is missing for 8.09", "daily log check". Read-only. Org and project come from configuration.
daily-activity-log
Use at end of day to file the Azure DevOps time-log Tasks — one closed Task per Activity worked that day, Original Estimate in decimal hours, parented to the current sprint's Feature. Fires on "log my day", "fill my tasks", "close my daily tasks", "I had 2h meetings and 4h development". Org and project come from configuration.
conventional-commits
Write commit messages that follow the Conventional Commits specification so tooling can derive versions and changelogs.