Agent Shipped

Directory · Hooks

Claude Code Japanese Guard

A Claude Code Stop hook that detects English-dominant responses and sends them back to be rewritten in Japanese, for Japanese-speaking users.

★ 268 stars · last updated 2026-11-25 · Free, open source · View on GitHub

Best for

Install

mkdir -p ~/.claude/hooks
curl -fsSL https://raw.githubusercontent.com/minorun365/claude-code-japanese-guard/main/hooks/japanese-guard.py -o ~/.claude/hooks/japanese-guard.py
chmod +x ~/.claude/hooks/japanese-guard.py

Our take

Counts Latin vs Japanese characters in the turn's prose (ignoring code blocks, inline code, URLs, and links) and blocks the stop when Latin exceeds 3x Japanese, retrying at most once per turn. Setup also requires adding entries to hooks.Stop and hooks.PreToolUse (matcher mcp__.*__wrap_up) in ~/.claude/settings.json; thresholds are tunable via environment variables and it can be disabled for claude -p scripts. Pure Python 3 with no dependencies, includes tests and a --check mode for past session transcripts; README is in Japanese.

Similar hooks

Get the field guide

Join builders who use coding agents every day. Free, twice a week, unsubscribe in one click.

No spam. The CLAUDE.md starter pack comes in your confirmation email. Not seeing it? Check spam or Promotions.