Secret Guard — Development skill for Claude Code
Cross-agent secret-leak guard: gitleaks-based detection core + per-tool hook adapters (Claude Code, OpenCode, Codex, ...).
How to install Secret Guard
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open gramatr/secret-guard and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Secret Guard does
Cross-agent secret-leak guard: gitleaks-based detection core + per-tool hook adapters (Claude Code, OpenCode, Codex, ...). Catches secrets in tool output before they land in an agent's context or transcript.
Alternatives in Development
- Aegis Claude — Windows & macOS TUI: VPN leak check, TZ/WebRTC runtime guard & local Claude ID reset (chats stay) / Защита сре 96 ★
- Burn — SLO burn rate — multi-window alerting that catches budget exhaustion before it happens 83 ★
- Pstack Codex — Codex-native port of Lauren Tan's pstack: 47 skills, 23 playbooks, agent personas, multi-agent workflows, and 83 ★
README
secret-guard
Cross-agent secret-leak guard. Scans tool output for secrets (API keys, tokens, private keys, ...) and redacts them before they land in an agent's context or on-screen transcript — not after the fact.
Born out of a recurring problem with Claude Code sessions: Bash output (env dumps, curl responses, log tails) regularly contains live credentials, and those get echoed straight into the conversation with nothing in between. [gitleaks](https://github.com/gitleaks/gitleaks) is already the mandated secret scanner for committed code across our repos — this project reuses the same engine for *live tool output*, which is a different problem (gating a running agent session, not scanning a git history).
Architecture
core/ — engine, no knowledge of any specific agent tool
scan.sh stdin text in -> same text out, secrets redacted
report.sh reports findings as SOC2 compliance evidence (see below)
adapters/
claude-code/ — Claude Code PostToolUse hook glue
hook.sh
settings-snippet.json
(opencode/, codex/, hermes/ — planned, not yet implemented)
tests/
test_core.sh
test_claude_code_adapter.sh
test_report.sh
fixtures/
`core/scan.sh` is the only place that knows about gitleaks. Every adapter's job is just: pull the right text field out of that tool's hook/plugin payload, pipe it through `core/scan.sh`, and put the result back in whatever shape that tool expects. Adding support for a new agent tool (OpenCode, Codex, Hermes, ...) means writing a new adapter, not touching the core.
Compliance reporting (SOC2 evidence)
Every redaction is also a *finding that something needed to be hidden*, which for a SOC2 program is its own auditable event. `core/scan.sh` can emit a findings JSON (rule id, line, fingerprint — never the secret value) via `SECRET_GUARD_FINDINGS_JSON`, and `core/report.sh` posts that to a Kestra webhook (`secret-leak-to-zammad` in the `gramatr/soc2-coordina
Related Skills
Secret Scan
Scan working directory untuk secrets — gitleaks detect mode, custom rules, fail-fast kalau ada leak.
Claude Secret Guard
Your shell holds the keys to production. secret-guard stops Claude Code from reading, printing or leaking them
Dsh Guard Pack
Nine DeepSeek Harness guard plugins in one installable set: secret-leak blocking, a per-session cost cap, auto
Claude Secret Guard Kit
Block Claude Code from reading, echoing, or committing your secrets. Read-deny rules + shell filename guard +
Ward
Claude Code hook CLI — PII guard, leak detection, event logging
Claudeplus
The open-source power-up layer for Claude Code: local cost tracking, leak detection, token-saving Guard hook,
Related Agents
Adapter Engineer
Implements and maintains Tacet agent adapters (Claude Code, Codex app-server, ACP, OpenCode, PTY fallback) beh
Secret Scanner
PYA specialist spawned by the /pya orchestrator. Finds hardcoded and leaked credentials in an untrusted reposi
Transport Verifier
Runs live end-to-end checks of a delivery transport (Herdr socket, MCP server, Claude Code or Codex hook, Open