Claude Code Haiku Guard — Development skill for Claude Code
Safe-by-default Bash permission guard for Claude Code powered by Claude Haiku — auto-approves routine commands, surfaces a dialog only on real risks.
How to install Claude Code Haiku Guard
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Serg2000Mr/claude-code-haiku-guard and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Haiku Guard does
Safe-by-default Bash permission guard for Claude Code powered by Claude Haiku — auto-approves routine commands, surfaces a dialog only on real risks.
Alternatives in Development
- Crypto Research Haiku Command — Execute lightweight cryptocurrency research by calling only haiku versions of crypto analysis agents in parall 3.4k ★
- Contract Review Skill — Review legal contracts for risks, extract key terms, and suggest redlines 192 ★
- Explore 에이전트 시스템 프롬프트 — 관찰 위치: Claude Code 내부 아키텍처 속도에 최적화된 읽기 전용 코드베이스 검색 전문가입니다 149 ★
README
🛡️ claude-code-haiku-guard
⚠️ Superseded by Auto Mode
Claude Code's native [Auto Mode](https://code.claude.com/docs/en/permission-modes) (`"defaultMode": "auto"`) now performs the same job — model-side safety checks that auto-approve commands aligned with the user's request, surfacing only the ones that need human judgment. Codex shipped an equivalent native classifier.
If you've adopted Auto Mode, this hook is largely redundant — you'll be paying for two classifiers (Anthropic's internal one + OpenRouter Haiku) and they can disagree on edge cases. The repo stays available for users who prefer explicit rule-based gating with a custom config and audit log, but new features are no longer planned.
Anyone who uses Claude Code heavily eventually gets tired of approving harmless commands. Most people start by adding allow-list exceptions, and some end up switching on `--dangerously-skip-permissions`. The incident reports linked below are a good reminder of why that trade-off is risky.
The idea in this repo is simple: keep rules for obviously safe commands, and use a small, fast model such as Haiku for the harder cases. In practice, that means most routine commands are approved automatically, while the user only sees the commands that look dangerous or unclear.
Technically, this is a Claude Code hook that classifies the full Bash command by risk. By default, the LLM step runs through OpenRouter.
On current OpenRouter pricing this is usually a cents-per-day tool, not a dollars-per-day one. The rough math is in [SETUP.md](SETUP.md).
[Русская версия →](README.ru.md)
⚖️ What happens to a command
| Risk | Behavior |
|---|---|
none / low |
allow silently |
medium |
ask Haiku for a yes/no decision in context |
high / critical |
always show a dialog |
Real-world cases where AI agents ran `rm -rf`, `git reset --hard`, and similar commands through over-broad allow-list rules are collected in [INCIDENTS.md](INCIDENTS.md).
🔍
Related Skills
Claude Yolo
Run parallel Claude Code agents in tmux with automatic permission approval. Auto-approves Bash, WebFetch, and
Claude Code Pwsh Guard
Claude Code hook pack that stops the agent firing Bash-only syntax at a Windows PowerShell session. Detects ex
Brief Me
Get briefed — loads your full memory, pulls live state from all connected tools, surfaces risks, staleness, up
Claude Code Prompt Me Less
Claude Code plugin that auto-approves safe commands, prompts for others
Claude Notch
Approve Claude Code from your Mac's notch. A native SwiftUI menu-bar app that surfaces Claude Code permission
Claude Perm Sim
Claude Code permission rule simulator: load the merged allow, ask and deny settings, show which rule decides a
Related Agents
Deep Review Guard Bypass
Traces guard functions (permission, capacity, rate-limit, validation) to find any code path that reaches a pro
Deploy Guard
Pre-deploy validation gate. HUMAN-INVOKED ONLY. Project-scope permission rule Agent(deploy-guard) is DENIED in
MCP PR Reviewer
Autonomous PR reviewer for MCP server updates and additions. Reviews PRs that modify server.json files in the