ShriD5/claude-mods/tree/main/whoopgate
关于这个 mod
whoopgate 会把实时 WHOOP 心率放进 Claude Code 状态行,并在读数达到上限时阻止危险 Bash 命令。它保护部署、强制推送、rm -rf、发布、PR 合并、terraform apply 和破坏性 SQL。运行 whoopgate breathe 并低于 92 bpm 持续 20 秒,可开启 2 分钟解锁窗口。这是设置 hooks 与状态行的进程内版本,仍需要通过蓝牙读取手环的 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.
获取徽章
这是你的项目吗?把这个徽章放进 README 或网站,链接回本页。