---
title: "whoopgate"
url: "https://claudemods.dev/zh-cn/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-cn"
content_locale: "zh-cn"
---

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