Keep secrets out of Claude Code's context.
Real files stay untouched - masking only happens in the hook layer.
flowchart LR
subgraph Hooks
A[SessionStart] -->|context.js| B[List placeholders]
C[PreToolUse] -->|mask.js| D{Tool?}
end
D -->|Read| E[Copy file, replace secrets with SECRET_VALUE_*]
D -->|Write/Edit| F[Replace SECRET_VALUE_* back to real values]
D -->|Bash| G[Unmask command, mask output]
D -->|Grep| H[Deny on protected files]
Claude sees SECRET_VALUE_API_KEY instead of sk-live-abc123. When it writes or executes, placeholders are swapped back silently.
claude plugin add enixCode/secret-mask
.secretmask/config.json:Simple (KEY=VALUE files like .env):
{
".env": [".*KEY.*", ".*SECRET.*", ".*TOKEN.*", ".*PASSWORD.*"]
}
Advanced (custom file formats - JSON, YAML, INI...):
{
"credentials.json": {
"patterns": [".*key.*", ".*secret.*"],
"extractor": "^\\s*\"([^\"]+)\"\\s*:\\s*\"([^\"]+)\"\\s*,?\\s*$"
}
}
KEY=VALUEpatterns (same) + extractor (regex with 2 capture groups: key, value)config.example.json for more examples.MIT
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Skills for working with light-process: DAG workflow engine that orchestrates code in Docker containers via light-run.
Transparent token compression for Claude Code shell calls. Wraps RTK with lazy binary download and adds verticals RTK does not cover (Terraform, etc.).
npx claudepluginhub enixcode/secret-maskSecure environment variable management with Varlock for secrets, API keys, credentials, and sensitive configuration.
Blocks secrets and PII before they reach the Anthropic API
Security hook that blocks Claude from reading, writing, or accessing secret and sensitive files
Protect secrets and credentials from Claude Code. Blocks writes to .env files, detects API keys in shell commands, prevents hardcoded tokens, and guards service account JSON files.
Encrypted secrets manager for Claude Code sessions backed by a private Git repo
Secret safety hooks: auto-load credentials via CLAUDE_ENV_FILE, redact secrets from CLI output. Powered by the nopeek CLI.