---
title: "whoopgate"
url: "https://claudemods.dev/zh-tw/builds/whoopgate-5a14a8"
source: "https://github.com/ShriD5/claude-mods/tree/main/whoopgate"
source_type: "github"
repo: "https://github.com/ShriD5/claude-mods/tree/main/whoopgate"
author: "ShriD5"
author_handle: "ShriD5"
stars: 2
category: "安全與隱私"
categories: ["security"]
tags: ["bash-guard", "claude-code", "hooks", "safety", "status-line", "whoop"]
permission_level: 2
scan_complete: true
install: "claude plugin marketplace add ShriD5/claude-mods\nclaude plugin install whoopgate"
added: "2026-10-05T01:59:57.363Z"
updated: "2026-10-04T18:19:52Z"
locale: "zh-tw"
content_locale: "zh-tw"
---

# whoopgate

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

## Description

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 秒的讀數視為未知，永遠不會阻擋。

## Install

```
claude plugin marketplace add ShriD5/claude-mods
claude plugin install whoopgate
```

## Original 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

```sh
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.

```sh
./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.
