auto-skill-safety-mcp-secret-guard
Skill3 starsChanged 7 months agoMITView on GitHub
Prevent secret leakage when adding or reviewing MCP server configs. Use when you see `mcpServers` JSON, `.env`, config snippets, tool docs, or logs that might contain API keys/tokens. Produces a redacted config + a short secret hygiene report.
- Reads credentials
In this repository30 other files it gives its agents.
- agent-memory-ledgerSkill
- agent-observabilitySkill
- automation-skill-forgeSkill
- auto-skill-audit-codex-supercharge-installed-driftSkill
- auto-skill-build-agent-reliability-loopSkill
- auto-skill-build-agent-run-ledger-dashboardSkill
- auto-skill-build-mcp-conformance-harnessSkill
- auto-skill-build-memsearch-codex-memorySkill
- auto-skill-build-source-pattern-synthesisSkill
- auto-skill-build-sources-inventorySkill
- auto-skill-build-supercharge-feedback-loopSkill
- auto-skill-ops-supercharge-maintenance-passSkill
- auto-skill-safety-external-skill-intakeSkill
- auto-skill-trend-github-discovery-radarSkill
- codebase-graph-scoutSkill
- codex-prompt-template-builderSkill
- codex-supercharge-routerSkill
- experiment-loop-runnerSkill
- low-token-contextSkill
- mcp-safety-reviewSkill
- mcp-server-labSkill
- model-cost-routerSkill
- openapi-to-mcp-skillSkill
- open-design-ui-librarySkill
- repo-intelligence-briefSkill
- repo-to-wikiSkill
- sandbox-source-intakeSkill
- skill-pack-factorySkill
- skill-quality-gateSkill
- workflow-launchpadSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
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 25
Search for likely MCP config locations:
- Distinctive: line 29
Run conservative scans (don’t paste results into chat unredacted):
- Very specific: line 35
Never commit .env; add to .gitignore if needed.
≈ “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
MCP Secret Guard (Config Hygiene)
Generated by: Codex Supercharge maintenance automation.
Goal: keep credentials out of repos, prompts, and MCP config files while still producing a usable config snippet.
Trigger
- You are adding/editing MCP config (e.g.,
mcpServersJSON). - A repo/README shows tokens/keys in examples.
- Logs or screenshots may include secrets.
Workflow
- Identify config surfaces
- Search for likely MCP config locations:
rg -n \"\\bmcpServers\\b\" -S --hidden .rg -n \"mcp\" -S --hidden .codex* ~/.codex 2>/dev/null || true
- Search for likely MCP config locations:
- Detect secret-shaped strings (local only)
- Run conservative scans (don’t paste results into chat unredacted):
rg -n \"(api[_-]?key|access[_-]?token|secret|private[_-]?key|bearer)\" -S --hidden .rg -n \"sk-[A-Za-z0-9]{20,}|ghp_[A-Za-z0-9]{20,}|xox[baprs]-[A-Za-z0-9-]{10,}\" -S --hidden .
- Run conservative scans (don’t paste results into chat unredacted):
- Normalize config to env-var references
- Replace inline secrets with env-var placeholders:
- Prefer
"env": { \"API_KEY\": \"${API_KEY}\" }style. - Never commit
.env; add to.gitignoreif needed.
- Prefer
- Replace inline secrets with env-var placeholders:
- Redact before sharing
- Any time you must include an example, redact to:
***REDACTED***or${ENV_VAR}(never partial key fragments).
- Any time you must include an example, redact to:
- Record where secrets should live
- OS keychain / password manager / CI secret store.
- Minimal env var list required to run.
Output
# MCP Secret Hygiene Report
Config files checked:
Findings (redacted):
Required env vars:
Redaction actions taken:
Remaining risks:Skip When
- You are only reviewing high-level architecture and no configs/logs are involved.
Validation
- Re-run the scans in step 2 after edits; expect 0 inline secrets in tracked files.
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.

