Sensitive Canary — Development skill for Claude Code
Claude Code hooks that guard secrets and PII before they reach the Anthropic API.
How to install Sensitive Canary
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open coo-quack/sensitive-canary and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Sensitive Canary does
Claude Code hooks that guard secrets and PII before they reach the Anthropic API.
Alternatives in Development
- Claude API — Build apps with the Claude API or Anthropic SDK 94.1k ★
- Sanitize — Detect and redact PII from text files — 15 categories (SSNs, credit cards, API keys, etc.), zero dependencies 3.1k ★
- KiroGate — OpenAI & Anthropic 兼容的 Kiro IDE API 代理网关,支持 Claude Code CLI 393 ★
README
Sensitive Canary
[](https://github.com/coo-quack/sensitive-canary/actions/workflows/ci.yml) [](https://opensource.org/licenses/MIT)
A security plugin that prevents unintended data leaks from Claude Code. Automatically detects and blocks secrets and PII — in prompts, file reads, and command executions — before they are sent to the Anthropic API.
No proxy server. No background process. Native Claude Code hooks only.
📖 **[Documentation](https://coo-quack.github.io/sensitive-canary/)** — Installation guide, detection rules reference, and allow tag details.
Why sensitive-canary?
Claude Code is a powerful development tool, but file reads and command executions can inadvertently send secrets and personal information to the Anthropic API. API keys in `.env` files, tokens embedded in config files, credentials pasted into the terminal — once sent to the API, they leave your machine.
**sensitive-canary intercepts them before they are sent, preventing unintended data leaks.**
| Without sensitive-canary | With sensitive-canary |
|---|---|
cat .env → full contents sent to Claude ❌ |
Blocked by name before Claude reads it ✅ |
| Paste a live AWS key in a prompt ❌ | Blocked before the API call is made ✅ |
Read customers.csv full of email addresses ❌ |
PII detected before Claude sees the file ✅ |
echo $API_KEY with live key ❌ |
Env var value scanned and blocked ✅ |
cat docker-compose.yml with POSTGRES_PASSWORD: ❌ |
Assignment detected in YAML and JSON too ✅ |
- Two hooks —
UserPromptSubmitandPreToolUsecover both directions of risk - 76 detection rules — sourced from gitleaks and TruffleHog detector definitions
- Checksum validation — credit cards (Luhn) and national ID numbers (JP My Number, FR NIR, IT Codice Fiscale, DE S
Related Skills
Claude Code Privacy Guard
🛡️ Claude Code plugin that blocks prompts containing secrets, API keys, and PII before they reach Claude.
Cc Agents Kit
Claude Code plugin marketplace. guard-hooks: five defensive hooks that block dangerous shell commands and secr
Steerhook
🛞 Rules that block or warn before Claude Code runs a tool and tell Claude the alternative. A fork of Anthropi
Grounded Research Skill
Anti-hallucination research skill for Claude Code — admits uncertainty, extracts direct quotes before analysis
Claude Usage Guard
Pause Claude before its next tool call when your 5-hour or weekly plan usage runs hot with lots of window left
Rogue Observability Engineering Skill
Expert application observability: structured logging, correlation IDs, health checks, metrics/SLIs, error trac
Related Agents
Secret Guard
MUST be used whenever the user asks to scan for secrets, API keys, credentials, or tokens before a commit or i
Regression Guard
Proactive regression scanner that checks code changes against documented bug patterns. Use before commits, PRs
Security Guard
Security audit of financial code. Invoke before a release or when working with sensitive data.