Hook Gym — Testing skill for Claude Code
Test harness for Claude Code hooks — batch-run violation cases against your guardrails.
How to install Hook Gym
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open MakiDevelop/hook-gym and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Hook Gym does
Test harness for Claude Code hooks — batch-run violation cases against your guardrails.
Alternatives in Testing
- Sentient — Test prompt to showcase claude code hook blocking a dangerous rm -rf command 3.4k ★
- Claude Codepro — by Max Ritter - Professional development environment for Claude Code with spec-driven workflow, TDD enforcemen 1.6k ★
- Run YAML Test — Execute YAML Test Cases 185 ★
README
Hook Gym
Test harness for [Claude Code hooks](https://docs.anthropic.com/en/docs/claude-code/hooks). Batch-run violation cases against your guardrails and find out what slips through.
Why
You wrote hooks to protect against dangerous commands, secret leaks, and accidental file destruction. But have you actually tested them?
Hook Gym ships with **64 built-in test cases** across 8 security dimensions. Run them against your hooks and get a coverage report in seconds.
PASS pre-bash-danger-guard: 9/9
PASS pre-edit-sensitive-guard: 4/4
PARTIAL pre-bash-secrets-guard: 3/5
FAIL (no hook for chmod 777): 0/2
Overall: 41/64 passed (64%)
Install
git clone https://github.com/MakiDevelop/hook-gym.git
cd hook-gym
pip install -e .
Quick Start
# Run all daily cases against your hooks
hook-gym run --exclude-tag extreme
# Run everything (including edge cases like reverse shells)
hook-gym run
# See what hooks and cases are loaded
hook-gym list
# Filter by category
hook-gym run --tag destructive
hook-gym run --tag credentials
hook-gym run --tag git
# Export markdown report
hook-gym run --report report.md
Built-in Test Cases
| Category | Cases | What it tests |
|---|---|---|
| Destructive Ops | 10 | git push --force, git reset --hard, DROP DATABASE, DELETE without WHERE |
| File Destruction | 7 | rm -rf /, rm -rf ~, rm -rf .git, rm -rf ~/.claude |
| Credential Leaks | 7 | Hardcoded API keys, cat .env, cat credentials.json, echo $TOKEN |
| Sensitive Files | 5 | Editing ~/.ssh/, ~/.gnupg/, .secrets/, .env |
| Git Hygiene | 5 | git add ., commit without diff, English commit messages |
| Network Risks | 7 | curl | bash, reverse shells, ngrok, /dev/tcp |
| Production Safety | 8 | docker prune -af, --set-env-vars, kubectl delete namespace, TRUNCATE |
| Permission Escalation | 5 | chmod 777, sudo rm, chown root |
| Scope Boundary | 5 | E |
Related Skills
Nereus
An opinionated development harness for Claude Code — interview → spec → TDD build → parallel review → finish,
Selftest
Run the hardmode self-test — the real shipped hooks against planted failure modes in a throwaway sandbox, plus
Agentarena
Adversarial coding-agent evaluation harness that pits Claude Code, Codex, and Gemini CLI against the same repo
Vnv Sprint Prep
V&V (Validation and Verification) sprint preparation — check cross-platform parity on the dev board, clone spr
QA Integration
Run integration/E2E QA against a RUNNING app via a real browser — execute new + regression test cases, assert
Batch
Run evals or prompts across hundreds of parallel Claude Code sessions. Use when the user wants to batch-run ev
Related Agents
Bully Evaluator
Evaluates a single bully semantic-evaluation payload against a diff and returns a structured violation list. I
Ct Harness Engineer
Designs and audits Claude Code harness infrastructure — hooks, rules, settings, constraint promotion, maturity
Context First Auditor
Audits a context-first (non-dev) harness: documentation/wiki/rules-oriented repo. Replaces test-runner / forma