ShriD5/claude-mods/tree/main/whoopgate
whoopgate
ライブ WHOOP 心拍数を表示し、設定した上限を超えると危険な Bash コマンドを止める Claude Code mod です。
この mod について
whoopgate は WHOOP 心拍数を Claude Code のステータス行に表示し、値が上限以上の間は危険な Bash コマンドをブロックします。デプロイ、強制 push、rm -rf、公開、PR のマージ、terraform apply、破壊的 SQL を保護します。whoopgate breathe を実行して 92 bpm 未満を 20 秒保つと、2 分間のロック解除ウィンドウが開きます。設定 hooks とステータス行をプロセス内で実装した版ですが、Bluetooth でバンドを読む whoopgate daemon は必要です。WHOOP app で Heart Rate Broadcast を有効にして whoopgate daemon と claude --plugin-dir /path/to/claude-mods/whoopgate を実行するか、/plugin で導入します。この mod と whoopgate install は併用しません。threshold(既定 100 bpm)、~/.whoopgate/config.json の calmBpm・unlockSeconds・extraPatterns、whoopgate pause に対応し、sim.sh はバンドなしのデモを提供します。30 秒より古い値は未知としてブロックしません。
インストール
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add ShriD5/claude-mods claude plugin install whoopgate
原文 / README
whoopgate
Claude Code won't touch prod while your heart is racing.
This mod puts your live WHOOP heart rate in the status line (♥ 87) and blocks risky Bash commands while it is at or over your limit (❤️ 112 · deploys locked). Deploys, force pushes, rm -rf, publishes, PR merges, terraform apply, destructive SQL: the same list as the whoopgate CLI. To unlock, run whoopgate breathe and stay under 92 bpm for 20 seconds. That opens a 2 minute window.
It is the in-process version of whoopgate's settings hooks and status line. You still run the whoopgate daemon, which reads the band over Bluetooth.
Install
whoopgate daemon # WHOOP app > Heart Rate Broadcast on
claude --plugin-dir /path/to/claude-mods/whoopgate
Or add the repo as a marketplace and install it with /plugin. Use the mod or whoopgate install, not both, or every risky command is checked twice.
- Status line:
♥ 87,❤️ 112 · deploys locked,♥ 112 · unlocked 1:43,♡ whoop offline. Refreshed every 2 s. /pulseshows the current bpm, the threshold and the unlock state.
Options
| Option | Default | What it does |
| --- | --- | --- |
| threshold | 100 | bpm at or above which risky commands are blocked |
The mod also follows ~/.whoopgate/config.json for calmBpm and unlockSeconds (what the deny message tells you) and extraPatterns (your own risky regexes), and honours whoopgate pause.
Demo without a band
sim.sh writes a simulated heart rate to ~/.whoopgate/hr.json (with "device": "SIMULATED"). Stop the real daemon first.
./sim.sh 120 # hold around 120 bpm
./sim.sh ramp # climb from 80 to 125
./sim.sh unlock 60 # act as if `whoopgate breathe` worked
How it works
A $.clock.every timer reads ~/.whoopgate/hr.json for the status line, and a tool.call hook on Bash reads it again and returns { deny } for a risky command while the reading is over the limit. A reading older than 30 s counts as unknown and never blocks.
