Ward
Description
Claude Code hook CLI — PII guard, leak detection, event logging
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Ward
A fast, local CLI that integrates with [Claude Code hooks](https://docs.anthropic.com/en/docs/claude-code/hooks) to block PII, secrets, and credentials from leaking through your AI coding workflow. Ships as a single Rust binary — no runtime dependencies.
What It Does
Ward scans every prompt you send and every tool call Claude makes, blocking sensitive data before it leaves your machine.
| Subcommand | Hook Events | Purpose |
|---|---|---|
ward pii |
UserPromptSubmit, PreToolUse, PostToolUse | Block SSNs, credit cards, emails, phone numbers |
ward leaks |
UserPromptSubmit, PreToolUse, PostToolUse | Block API keys, cloud credentials, tokens, passwords, private keys, connection strings |
ward log |
All events | Structured event logging to ~/.ward/events.jsonl |
On UserPromptSubmit and PreToolUse, a match **blocks** (exit 2) before anything leaves your machine. On PostToolUse the tool has already run, so blocking is impossible — instead ward **redacts**: it rewrites the tool output via the hook's `updatedToolOutput` field, replacing each secret with a `[WARD LEAKS REDACTED: ]` (or `WARD PII`) marker before Claude ever sees it. If a match can't be masked in place, the whole output is withheld.
Detection Coverage
PII Patterns
- Social Security Numbers (with ISO date false-positive prevention)
- Credit card numbers (spaces and dashes)
- Email addresses
- US phone numbers
Leak Detection — 3 Tiers
**Tier 1: Provider-Specific Keys** (32 patterns, high confidence)
- AWS (access key, secret key, Bedrock), GCP, Azure
- Anthropic, OpenAI
- GitHub (PAT, fine-grained, OAuth, app tokens), GitLab
- Slack (bot, app, user, webhook, legacy tokens)
- Stripe, SendGrid, Twilio, Linear, Databricks
- Heroku, Vercel, Grafana, Sentry, Datadog
- HashiCorp Vault, NPM, PyPI
**Tier 2: Structural Patterns** (medium confidence)
- PEM-encoded private keys (RSA, EC, OPENSSH)
- JWT tokens
- Connection strings (postgres, mysql, mongodb, redis, amqp,
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11