Arnie016/codex-prompt-templates / skills/auto-skill-safety-mcp-secret-guard
auto-skill-safety-mcp-secret-guard
VerifiedPrevent 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.
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.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |