ClaudeMods
☰
ZH-TW
● — 人在線上 · 瀏覽 — 次
贊助提交作品
GitHub 儲存庫 · 發布者 ShriD5

whoopgate

顯示即時 WHOOP 心率,並在心率超過可設定上限時阻擋危險 Bash 指令的 Claude Code mod。

已翻譯

關於這個 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.
  • /pulse shows 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 或網站,連回本頁。

Featured on ClaudeMods
尺寸
配色
Markdown
HTML

更多類似作品