[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75TC8SWQ9GTHCK2153SYXB4":3,"skill-same:01M75TC8SWQ9GTHCK2153SYXB4":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":35,"commitSha":36,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":6,"updatedAt":40,"install":41,"resources":54},"01M75TC8SWQ9GTHCK2153SYXB4","heart-sense",null,"rPPG heart rate estimation for the Rabbit R1. The user places a fingertip over the camera lens for 30 seconds; the skill extracts a blood-volume pulse signal from the red channel, applies peak detection or FFT, and returns estimated BPM with a confidence score.","ajohnsonnow\u002Fr1-warren","ajohnsonnow","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8867891?v=4","01M75T7TQ3B5VRHJF6X2Q7AWWW","Anthony Johnson","01M75T7TQPJG8YZTAVCH4SQW27",0,"MIT","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fheart-sense\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: heart-sense\ndescription: \"rPPG heart rate estimation for the Rabbit R1. The user places a fingertip over the camera lens for 30 seconds; the skill extracts a blood-volume pulse signal from the red channel, applies peak detection or FFT, and returns estimated BPM with a confidence score.\"\nversion: 1.0.0\nauthor: rabbit-r1-skillz\nmetadata:\n  openclaw:\n    requires:\n      bins:\n        - node\n      npm:\n        - sharp\n        - \"@opencv-tsjs\u002Fopencv4nodejs\"\n    primaryEnv: HEART_SENSE_ENABLED\n---\n\n# HeartSense — rPPG Heart Rate Skill\n\nHeartSense estimates heart rate without any wearable. The user covers the R1's camera lens\nwith a fingertip. The skill captures ~30 seconds of video frames, extracts the subtle red-channel\nbrightness changes caused by blood pulsing through capillaries (rPPG — remote photoplethysmography),\nand converts that signal to beats per minute.\n\nThe R1 Creation (`heart-sense\u002Findex.html`) handles the UI — countdown ring, live pulse-wave\nvisualization, BPM display, morning-baseline comparison, and a guided HRV breathing-sync session.\nThis OpenClaw skill provides the compute: camera capture and signal processing.\n\n---\n\n## Commands\n\n| Command   | Params                                          | Returns                                    | Description                          |\n|-----------|-------------------------------------------------|--------------------------------------------|--------------------------------------|\n| `capture` | `{ durationS: number, fps: number, ts: number }` | `{ bpm, confidence, signal_quality, raw }` | Capture and analyze a rPPG session   |\n\n---\n\n## Prerequisites\n\n- **Node.js 18+** — the skill runs as a Node.js process under the OpenClaw daemon.\n- **OpenClaw daemon** — must be running on the host machine paired with your R1. The Creation\n  communicates with this skill via the shared-storage pub\u002Fsub bridge\n  (`openclaw:cmd` \u002F `openclaw:resp`).\n- **CPU-only signal processing** — no GPU required. rPPG peak detection and FFT run on CPU.\n  The `sharp` and `@opencv-tsjs\u002Fopencv4nodejs` packages handle frame decoding and channel\n  extraction; no CUDA or GPU driver is needed.\n- **Camera access** — OpenClaw must have permission to access the R1's rear camera stream.\n  On RabbitOS 2 this is granted when the user opens the Creation and the daemon receives the\n  `capture` command.\n\n---\n\n## Installation\n\n### 1. Place the skill\n\n```bash\ncp -r heart-sense\u002F ~\u002F.openclaw\u002Fskills\u002Fheart-sense\u002F\n```\n\nOr install via ClawHub when available:\n\n```bash\nclawhub install heart-sense\n```\n\n### 2. Install Node.js dependencies\n\n```bash\ncd ~\u002F.openclaw\u002Fskills\u002Fheart-sense\nnpm install sharp @opencv-tsjs\u002Fopencv4nodejs\n```\n\n`sharp` is used for fast frame-buffer decoding (JPEG\u002Fraw → pixel array). `@opencv-tsjs\u002Fopencv4nodejs`\nprovides the OpenCV bindings used for red-channel extraction, Gaussian smoothing, and optional\ncascade-based motion rejection.\n\n### 3. Set the enable flag\n\nAdd to your OpenClaw environment (`~\u002F.openclaw\u002F.env` or system env):\n\n```\nHEART_SENSE_ENABLED=true\n```\n\nOptional tuning variables:\n\n```\n# Minimum frames required before returning a result (default: 600 = 30s × 30fps)\nHEART_SENSE_MIN_FRAMES=600\n\n# FFT window size — must be power of 2 (default: 256)\nHEART_SENSE_FFT_WINDOW=256\n\n# BPM search range (default: 40–180)\nHEART_SENSE_BPM_MIN=40\nHEART_SENSE_BPM_MAX=180\n\n# Signal quality threshold below which the skill falls back to peak detection (0–1, default: 0.4)\nHEART_SENSE_QUALITY_THRESHOLD=0.4\n```\n\n### 4. Verify the skill\n\n```bash\nnode ~\u002F.openclaw\u002Fskills\u002Fheart-sense\u002Findex.js --test\n```\n\nExpected output is a JSON object with keys `bpm`, `confidence`, `signal_quality`, and `raw`.\n\n---\n\n## How rPPG Works\n\nRemote photoplethysmography (rPPG) measures pulse rate from a camera without contact sensors.\nHere is what happens step by step:\n\n1. **Illumination.** When light (ambient or camera flash) hits skin, the red channel of the\n   camera image is most sensitive to blood-volume changes. Oxygenated blood absorbs green and\n   blue light more than red, so the red channel fluctuates as each heartbeat pushes a bolus of\n   blood through capillaries.\n\n2. **Frame capture.** The skill requests 30 seconds of camera frames at 30 fps (900 frames).\n   For a fingertip measurement, the R1 rear camera is ideal: the lens is small, the flashlight\n   is close, and the fingertip blocks ambient-light noise entirely.\n\n3. **Red-channel extraction.** Each frame is decoded to an RGB array. The mean red-channel\n   value across all pixels in the frame is computed. This produces a 1-D time series of 900\n   samples — the blood-volume pulse (BVP) waveform.\n\n4. **Detrending and smoothing.** A linear trend is subtracted (removes slow brightness drift\n   from movement or lighting change). A Gaussian smoothing kernel removes high-frequency noise\n   above ~4 Hz (240 BPM, the physiological ceiling).\n\n5. **BPM estimation — two methods.**\n   - **FFT (primary).** A Fast Fourier Transform converts the 900-sample signal to the\n     frequency domain. The dominant frequency peak in the 0.67–3 Hz band (40–180 BPM) is the\n     estimated heart rate.\n   - **Peak detection (fallback).** If signal quality is below threshold (motion, poor contact,\n     bad lighting), the skill falls back to counting the R-peaks (systolic peaks) in the smoothed\n     waveform and computing inter-peak intervals. This is more robust to short-duration or\n     noisy signals.\n\n6. **Confidence scoring.** The ratio of the dominant-frequency peak power to total band power\n   is the `confidence` score (0–1). High confidence (>0.7) means a clean, single-dominant\n   frequency. Low confidence means motion, inconsistent contact, or extreme lighting.\n\n7. **Response.** The skill writes the result to `openclaw:resp`. The R1 Creation reads it via\n   `R1.ocReceive()` and displays the BPM.\n\n---\n\n## Command: `capture`\n\n### What the Creation sends\n\n```js\nR1.ocSend('heart-sense', 'capture', {\n  durationS: 30,   \u002F\u002F MEASURE_DURATION_S — seconds of video to capture\n  fps:       30,   \u002F\u002F target frame rate\n  ts:        Date.now(),  \u002F\u002F request timestamp (epoch ms)\n});\n```\n\n### What the skill does, step by step\n\n1. Receives the command from `openclaw:cmd`.\n2. Opens the R1 camera stream and begins capturing frames at `fps` for `durationS` seconds.\n3. For each frame: decodes to RGB, extracts the mean red-channel value, appends to the BVP buffer.\n4. (Optional) Streams intermediate `rppgFrame` plugin messages to the Creation for live display:\n   `{ type: \"rppgFrame\", bpm: number, quality: number }` — the Creation renders these on the\n   pulse-wave visualization while the user waits.\n5. After `durationS` seconds (or when the buffer has enough frames):\n   - Detrends and smooths the BVP buffer.\n   - Runs FFT; if `confidence \u003C HEART_SENSE_QUALITY_THRESHOLD`, runs peak detection instead.\n   - Computes `bpm`, `confidence`, and `signal_quality`.\n6. Writes the response to `openclaw:resp`.\n\n### ocReceive timeout\n\nThe Creation waits up to **45,000 ms** (45 seconds) for the response. The extra 15 seconds\nbeyond the 30-second capture window allows for signal processing time, especially on older\nhost hardware.\n\n---\n\n## Response Shape\n\nOpenClaw writes to `openclaw:resp` with this structure:\n\n```json\n{\n  \"status\": \"done\",\n  \"ts\": 1718000000000,\n  \"data\": {\n    \"bpm\": 72,\n    \"confidence\": 0.84,\n    \"signal_quality\": 0.76,\n    \"raw\": {\n      \"method\": \"fft\",\n      \"dominant_hz\": 1.2,\n      \"peak_power_ratio\": 0.84,\n      \"frame_count\": 897,\n      \"duration_ms\": 29900,\n      \"bvp_mean\": 187.4,\n      \"bvp_std\": 3.2\n    }\n  }\n}\n```\n\n### Field definitions\n\n| Field                    | Type   | Range   | Description                                                                     |\n|--------------------------|--------|---------|---------------------------------------------------------------------------------|\n| `bpm`                    | number | 40–180  | Estimated heart rate in beats per minute (integer)                              |\n| `confidence`             | number | 0–1     | Ratio of dominant-frequency peak power to total BVP band power                 |\n| `signal_quality`         | number | 0–1     | Overall quality score combining confidence + frame drop rate + motion rejection |\n| `raw.method`             | string | —       | `\"fft\"` or `\"peak_detection\"` — which algorithm produced the result             |\n| `raw.dominant_hz`        | number | —       | The dominant frequency found (Hz); multiply by 60 to get BPM                   |\n| `raw.peak_power_ratio`   | number | 0–1     | FFT peak power \u002F total power in band (same as `confidence` when FFT is used)   |\n| `raw.frame_count`        | number | —       | Frames actually captured (may be less than `durationS × fps` due to drops)     |\n| `raw.duration_ms`        | number | —       | Actual capture duration in ms                                                   |\n| `raw.bvp_mean`           | number | —       | Mean red-channel value across the session (useful for lighting diagnostics)     |\n| `raw.bvp_std`            | number | —       | Standard deviation of the BVP signal                                            |\n\n### Error response\n\n```json\n{\n  \"status\": \"error\",\n  \"ts\": 1718000000000,\n  \"error\": \"camera_unavailable\",\n  \"message\": \"Could not open camera stream. Check OpenClaw camera permissions.\"\n}\n```\n\nPossible `error` values: `camera_unavailable`, `too_few_frames`, `signal_flat`, `timeout`.\n\n### How the Creation uses the response\n\n```js\nconst resp  = await R1.ocReceive({ timeoutMs: 45000 });\nconst d     = resp.data || {};\nconst bpm     = typeof d.bpm     === 'number' ? Math.round(d.bpm)                          : null;\nconst quality = typeof d.quality === 'number' ? Math.round(R1.clamp(d.quality * 5, 0, 5)) : null;\n```\n\nIf the skill returns an error or the receive times out, the Creation falls back to a\nphysiologically plausible estimate anchored to the morning baseline (or 72 BPM if none exists),\nwith a small random variance. This fallback is always labeled as an estimate and is never\nstored as a high-confidence reading.\n\n---\n\n## Accuracy Disclaimer\n\nThis is a wellness estimation tool. Not a medical device. Accuracy varies with lighting\nand skin tone. Do not use for clinical decisions.\n\nAdditional factors that affect accuracy:\n\n- **Lighting:** Bright, consistent ambient light improves results. Fluorescent or flickering\n  lighting introduces 50\u002F60 Hz noise that can corrupt the BVP signal.\n- **Skin tone:** Darker skin tones have lower red-channel contrast for the BVP signal. The\n  skill applies adaptive gain, but accuracy may be lower. This is a known limitation of\n  camera-based rPPG and active research area.\n- **Contact pressure:** Too little contact = ambient light leakage. Too much pressure =\n  occludes capillaries and flattens the BVP signal. \"Gently resting\" is the correct placement.\n- **Motion:** Any finger movement during capture degrades the signal. The skill includes\n  motion-rejection heuristics but cannot fully compensate for sustained movement.\n- **Temperature:** Cold hands (vasoconstriction) reduce BVP amplitude. Room temperature or\n  warmer conditions give better results.\n- **Typical accuracy:** ±5–10 BPM compared to a pulse oximeter under good conditions.\n\n---\n\n## Configuration\n\nAll configuration is via environment variables in `~\u002F.openclaw\u002F.env`:\n\n```\n# Required: enables the skill\nHEART_SENSE_ENABLED=true\n\n# Capture settings\nHEART_SENSE_MIN_FRAMES=600          # Minimum frames before analysis (default: 600)\nHEART_SENSE_FFT_WINDOW=256          # FFT window size, power of 2 (default: 256)\nHEART_SENSE_BPM_MIN=40              # Minimum BPM to consider (default: 40)\nHEART_SENSE_BPM_MAX=180             # Maximum BPM to consider (default: 180)\nHEART_SENSE_QUALITY_THRESHOLD=0.4   # Confidence below which to use peak detection (default: 0.4)\n\n# Streaming (optional: sends live rppgFrame plugin messages to the Creation)\nHEART_SENSE_STREAM_LIVE=true        # Stream intermediate BPM estimates (default: true)\nHEART_SENSE_STREAM_INTERVAL_MS=500  # How often to stream a live estimate (default: 500)\n```\n\n---\n\n## Security Notes\n\n- This skill reads camera data locally on your machine. No video or frame data leaves your\n  local network. The BVP signal (a 1-D array of 900 numbers) and the final BPM result are\n  the only values written to `openclaw:resp`.\n- Camera access is restricted to the duration of the `capture` command. The skill does not\n  hold the camera open between measurements.\n- No biometric data is transmitted to any remote service. Heart rate readings are stored\n  only in the R1 Creation's `creationStorage.plain` (per-pluginId isolation, not accessible\n  from other Creations or via `localStorage`).\n- The skill does not request, read, or store any data other than the BVP signal and derived\n  BPM. No images or video frames are written to disk.\n- `HEART_SENSE_ENABLED=true` is required. Without it, the skill exits immediately and writes\n  an error to `openclaw:resp`. This prevents the skill from running if accidentally installed\n  on a shared OpenClaw instance.\n\n---\n\n## Troubleshooting\n\n**BPM result is always the same (e.g. 72)**\n\nThe Creation is falling back to its built-in estimate. OpenClaw is either not running or the\n`capture` command is not reaching the skill. Check:\n\n```bash\nopenclaw status\n# Should show: heart-sense ... loaded\n```\n\nVerify `HEART_SENSE_ENABLED=true` is set and the skill directory is at\n`~\u002F.openclaw\u002Fskills\u002Fheart-sense\u002F`.\n\n**\"camera_unavailable\" error**\n\nOpenClaw does not have camera access. On the host machine, ensure the OpenClaw daemon has\nbeen granted camera permission (macOS: System Settings > Privacy & Security > Camera; Linux:\ncheck `\u002Fdev\u002Fvideo*` permissions; Windows: Settings > Privacy > Camera > allow desktop apps).\n\n**Signal quality is always Low (1–2 bars)**\n\nCommon causes:\n\n- Finger is not covering the lens fully — ambient light is leaking in.\n- Pressing too hard — reduces capillary blood flow.\n- Bright flickering light source (TV, fluorescent) in the room — try a different location.\n- Cold hands — warm them briefly before measuring.\n\n**`npm install` fails for `@opencv-tsjs\u002Fopencv4nodejs`**\n\nThis package compiles native bindings. Install build tools first:\n\n```bash\n# macOS\nxcode-select --install\n\n# Ubuntu \u002F Debian\nsudo apt-get install build-essential cmake libopencv-dev\n\n# Windows\nnpm install --global windows-build-tools\n```\n\nThen retry `npm install` inside the skill directory.\n\n**Live BPM display never appears on the R1 during measurement**\n\nThe live streaming feature requires `HEART_SENSE_STREAM_LIVE=true` (default). If it is set\nand still not appearing, check that `PluginMessageHandler` is available in the Creation's\nWebView context. This feature requires RabbitOS 2.0.3 or later.\n\n**`ocReceive` times out (45s) on every measurement**\n\nThe host machine is too slow to process 900 frames within the timeout window. Options:\n\n1. Reduce `HEART_SENSE_MIN_FRAMES` to 450 (15 seconds of signal — less accurate but faster).\n2. Disable OpenCV-based motion rejection to reduce compute: set\n   `HEART_SENSE_QUALITY_THRESHOLD=0` (forces FFT only, no fallback).\n3. Increase the timeout on the Creation side by modifying `ocReceive({ timeoutMs: 60000 })`.\n","# HeartSense — rPPG Heart Rate Skill\n\nHeartSense estimates heart rate without any wearable. The user covers the R1's camera lens\nwith a fingertip. The skill captures ~30 seconds of video frames, extracts the subtle red-channel\nbrightness changes caused by blood pulsing through capillaries (rPPG — remote photoplethysmography),\nand converts that signal to beats per minute.\n\nThe R1 Creation (`heart-sense\u002Findex.html`) handles the UI — countdown ring, live pulse-wave\nvisualization, BPM display, morning-baseline comparison, and a guided HRV breathing-sync session.\nThis OpenClaw skill provides the compute: camera capture and signal processing.\n\n---\n\n## Commands\n\n| Command   | Params                                          | Returns                                    | Description                          |\n|-----------|-------------------------------------------------|--------------------------------------------|--------------------------------------|\n| `capture` | `{ durationS: number, fps: number, ts: number }` | `{ bpm, confidence, signal_quality, raw }` | Capture and analyze a rPPG session   |\n\n---\n\n## Prerequisites\n\n- **Node.js 18+** — the skill runs as a Node.js process under the OpenClaw daemon.\n- **OpenClaw daemon** — must be running on the host machine paired with your R1. The Creation\n  communicates with this skill via the shared-storage pub\u002Fsub bridge\n  (`openclaw:cmd` \u002F `openclaw:resp`).\n- **CPU-only signal processing** — no GPU required. rPPG peak detection and FFT run on CPU.\n  The `sharp` and `@opencv-tsjs\u002Fopencv4nodejs` packages handle frame decoding and channel\n  extraction; no CUDA or GPU driver is needed.\n- **Camera access** — OpenClaw must have permission to access the R1's rear camera stream.\n  On RabbitOS 2 this is granted when the user opens the Creation and the daemon receives the\n  `capture` command.\n\n---\n\n## Installation\n\n### 1. Place the skill\n\n```bash\ncp -r heart-sense\u002F ~\u002F.openclaw\u002Fskills\u002Fheart-sense\u002F\n```\n\nOr install via ClawHub when available:\n\n```bash\nclawhub install heart-sense\n```\n\n### 2. Install Node.js dependencies\n\n```bash\ncd ~\u002F.openclaw\u002Fskills\u002Fheart-sense\nnpm install sharp @opencv-tsjs\u002Fopencv4nodejs\n```\n\n`sharp` is used for fast frame-buffer decoding (JPEG\u002Fraw → pixel array). `@opencv-tsjs\u002Fopencv4nodejs`\nprovides the OpenCV bindings used for red-channel extraction, Gaussian smoothing, and optional\ncascade-based motion rejection.\n\n### 3. Set the enable flag\n\nAdd to your OpenClaw environment (`~\u002F.openclaw\u002F.env` or system env):\n\n```\nHEART_SENSE_ENABLED=true\n```\n\nOptional tuning variables:\n\n```\n# Minimum frames required before returning a result (default: 600 = 30s × 30fps)\nHEART_SENSE_MIN_FRAMES=600\n\n# FFT window size — must be power of 2 (default: 256)\nHEART_SENSE_FFT_WINDOW=256\n\n# BPM search range (default: 40–180)\nHEART_SENSE_BPM_MIN=40\nHEART_SENSE_BPM_MAX=180\n\n# Signal quality threshold below which the skill falls back to peak detection (0–1, default: 0.4)\nHEART_SENSE_QUALITY_THRESHOLD=0.4\n```\n\n### 4. Verify the skill\n\n```bash\nnode ~\u002F.openclaw\u002Fskills\u002Fheart-sense\u002Findex.js --test\n```\n\nExpected output is a JSON object with keys `bpm`, `confidence`, `signal_quality`, and `raw`.\n\n---\n\n## How rPPG Works\n\nRemote photoplethysmography (rPPG) measures pulse rate from a camera without contact sensors.\nHere is what happens step by step:\n\n1. **Illumination.** When light (ambient or camera flash) hits skin, the red channel of the\n   camera image is most sensitive to blood-volume changes. Oxygenated blood absorbs green and\n   blue light more than red, so the red channel fluctuates as each heartbeat pushes a bolus of\n   blood through capillaries.\n\n2. **Frame capture.** The skill requests 30 seconds of camera frames at 30 fps (900 frames).\n   For a fingertip measurement, the R1 rear camera is ideal: the lens is small, the flashlight\n   is close, and the fingertip blocks ambient-light noise entirely.\n\n3. **Red-channel extraction.** Each frame is decoded to an RGB array. The mean red-channel\n   value across all pixels in the frame is computed. This produces a 1-D time series of 900\n   samples — the blood-volume pulse (BVP) waveform.\n\n4. **Detrending and smoothing.** A linear trend is subtracted (removes slow brightness drift\n   from movement or lighting change). A Gaussian smoothing kernel removes high-frequency noise\n   above ~4 Hz (240 BPM, the physiological ceiling).\n\n5. **BPM estimation — two methods.**\n   - **FFT (primary).** A Fast Fourier Transform converts the 900-sample signal to the\n     frequency domain. The dominant frequency peak in the 0.67–3 Hz band (40–180 BPM) is the\n     estimated heart rate.\n   - **Peak detection (fallback).** If signal quality is below threshold (motion, poor contact,\n     bad lighting), the skill falls back to counting the R-peaks (systolic peaks) in the smoothed\n     waveform and computing inter-peak intervals. This is more robust to short-duration or\n     noisy signals.\n\n6. **Confidence scoring.** The ratio of the dominant-frequency peak power to total band power\n   is the `confidence` score (0–1). High confidence (>0.7) means a clean, single-dominant\n   frequency. Low confidence means motion, inconsistent contact, or extreme lighting.\n\n7. **Response.** The skill writes the result to `openclaw:resp`. The R1 Creation reads it via\n   `R1.ocReceive()` and displays the BPM.\n\n---\n\n## Command: `capture`\n\n### What the Creation sends\n\n```js\nR1.ocSend('heart-sense', 'capture', {\n  durationS: 30,   \u002F\u002F MEASURE_DURATION_S — seconds of video to capture\n  fps:       30,   \u002F\u002F target frame rate\n  ts:        Date.now(),  \u002F\u002F request timestamp (epoch ms)\n});\n```\n\n### What the skill does, step by step\n\n1. Receives the command from `openclaw:cmd`.\n2. Opens the R1 camera stream and begins capturing frames at `fps` for `durationS` seconds.\n3. For each frame: decodes to RGB, extracts the mean red-channel value, appends to the BVP buffer.\n4. (Optional) Streams intermediate `rppgFrame` plugin messages to the Creation for live display:\n   `{ type: \"rppgFrame\", bpm: number, quality: number }` — the Creation renders these on the\n   pulse-wave visualization while the user waits.\n5. After `durationS` seconds (or when the buffer has enough frames):\n   - Detrends and smooths the BVP buffer.\n   - Runs FFT; if `confidence \u003C HEART_SENSE_QUALITY_THRESHOLD`, runs peak detection instead.\n   - Computes `bpm`, `confidence`, and `signal_quality`.\n6. Writes the response to `openclaw:resp`.\n\n### ocReceive timeout\n\nThe Creation waits up to **45,000 ms** (45 seconds) for the response. The extra 15 seconds\nbeyond the 30-second capture window allows for signal processing time, especially on older\nhost hardware.\n\n---\n\n## Response Shape\n\nOpenClaw writes to `openclaw:resp` with this structure:\n\n```json\n{\n  \"status\": \"done\",\n  \"ts\": 1718000000000,\n  \"data\": {\n    \"bpm\": 72,\n    \"confidence\": 0.84,\n    \"signal_quality\": 0.76,\n    \"raw\": {\n      \"method\": \"fft\",\n      \"dominant_hz\": 1.2,\n      \"peak_power_ratio\": 0.84,\n      \"frame_count\": 897,\n      \"duration_ms\": 29900,\n      \"bvp_mean\": 187.4,\n      \"bvp_std\": 3.2\n    }\n  }\n}\n```\n\n### Field definitions\n\n| Field                    | Type   | Range   | Description                                                                     |\n|--------------------------|--------|---------|---------------------------------------------------------------------------------|\n| `bpm`                    | number | 40–180  | Estimated heart rate in beats per minute (integer)                              |\n| `confidence`             | number | 0–1     | Ratio of dominant-frequency peak power to total BVP band power                 |\n| `signal_quality`         | number | 0–1     | Overall quality score combining confidence + frame drop rate + motion rejection |\n| `raw.method`             | string | —       | `\"fft\"` or `\"peak_detection\"` — which algorithm produced the result             |\n| `raw.dominant_hz`        | number | —       | The dominant frequency found (Hz); multiply by 60 to get BPM                   |\n| `raw.peak_power_ratio`   | number | 0–1     | FFT peak power \u002F total power in band (same as `confidence` when FFT is used)   |\n| `raw.frame_count`        | number | —       | Frames actually captured (may be less than `durationS × fps` due to drops)     |\n| `raw.duration_ms`        | number | —       | Actual capture duration in ms                                                   |\n| `raw.bvp_mean`           | number | —       | Mean red-channel value across the session (useful for lighting diagnostics)     |\n| `raw.bvp_std`            | number | —       | Standard deviation of the BVP signal                                            |\n\n### Error response\n\n```json\n{\n  \"status\": \"error\",\n  \"ts\": 1718000000000,\n  \"error\": \"camera_unavailable\",\n  \"message\": \"Could not open camera stream. Check OpenClaw camera permissions.\"\n}\n```\n\nPossible `error` values: `camera_unavailable`, `too_few_frames`, `signal_flat`, `timeout`.\n\n### How the Creation uses the response\n\n```js\nconst resp  = await R1.ocReceive({ timeoutMs: 45000 });\nconst d     = resp.data || {};\nconst bpm     = typeof d.bpm     === 'number' ? Math.round(d.bpm)                          : null;\nconst quality = typeof d.quality === 'number' ? Math.round(R1.clamp(d.quality * 5, 0, 5)) : null;\n```\n\nIf the skill returns an error or the receive times out, the Creation falls back to a\nphysiologically plausible estimate anchored to the morning baseline (or 72 BPM if none exists),\nwith a small random variance. This fallback is always labeled as an estimate and is never\nstored as a high-confidence reading.\n\n---\n\n## Accuracy Disclaimer\n\nThis is a wellness estimation tool. Not a medical device. Accuracy varies with lighting\nand skin tone. Do not use for clinical decisions.\n\nAdditional factors that affect accuracy:\n\n- **Lighting:** Bright, consistent ambient light improves results. Fluorescent or flickering\n  lighting introduces 50\u002F60 Hz noise that can corrupt the BVP signal.\n- **Skin tone:** Darker skin tones have lower red-channel contrast for the BVP signal. The\n  skill applies adaptive gain, but accuracy may be lower. This is a known limitation of\n  camera-based rPPG and active research area.\n- **Contact pressure:** Too little contact = ambient light leakage. Too much pressure =\n  occludes capillaries and flattens the BVP signal. \"Gently resting\" is the correct placement.\n- **Motion:** Any finger movement during capture degrades the signal. The skill includes\n  motion-rejection heuristics but cannot fully compensate for sustained movement.\n- **Temperature:** Cold hands (vasoconstriction) reduce BVP amplitude. Room temperature or\n  warmer conditions give better results.\n- **Typical accuracy:** ±5–10 BPM compared to a pulse oximeter under good conditions.\n\n---\n\n## Configuration\n\nAll configuration is via environment variables in `~\u002F.openclaw\u002F.env`:\n\n```\n# Required: enables the skill\nHEART_SENSE_ENABLED=true\n\n# Capture settings\nHEART_SENSE_MIN_FRAMES=600          # Minimum frames before analysis (default: 600)\nHEART_SENSE_FFT_WINDOW=256          # FFT window size, power of 2 (default: 256)\nHEART_SENSE_BPM_MIN=40              # Minimum BPM to consider (default: 40)\nHEART_SENSE_BPM_MAX=180             # Maximum BPM to consider (default: 180)\nHEART_SENSE_QUALITY_THRESHOLD=0.4   # Confidence below which to use peak detection (default: 0.4)\n\n# Streaming (optional: sends live rppgFrame plugin messages to the Creation)\nHEART_SENSE_STREAM_LIVE=true        # Stream intermediate BPM estimates (default: true)\nHEART_SENSE_STREAM_INTERVAL_MS=500  # How often to stream a live estimate (default: 500)\n```\n\n---\n\n## Security Notes\n\n- This skill reads camera data locally on your machine. No video or frame data leaves your\n  local network. The BVP signal (a 1-D array of 900 numbers) and the final BPM result are\n  the only values written to `openclaw:resp`.\n- Camera access is restricted to the duration of the `capture` command. The skill does not\n  hold the camera open between measurements.\n- No biometric data is transmitted to any remote service. Heart rate readings are stored\n  only in the R1 Creation's `creationStorage.plain` (per-pluginId isolation, not accessible\n  from other Creations or via `localStorage`).\n- The skill does not request, read, or store any data other than the BVP signal and derived\n  BPM. No images or video frames are written to disk.\n- `HEART_SENSE_ENABLED=true` is required. Without it, the skill exits immediately and writes\n  an error to `openclaw:resp`. This prevents the skill from running if accidentally installed\n  on a shared OpenClaw instance.\n\n---\n\n## Troubleshooting\n\n**BPM result is always the same (e.g. 72)**\n\nThe Creation is falling back to its built-in estimate. OpenClaw is either not running or the\n`capture` command is not reaching the skill. Check:\n\n```bash\nopenclaw status\n# Should show: heart-sense ... loaded\n```\n\nVerify `HEART_SENSE_ENABLED=true` is set and the skill directory is at\n`~\u002F.openclaw\u002Fskills\u002Fheart-sense\u002F`.\n\n**\"camera_unavailable\" error**\n\nOpenClaw does not have camera access. On the host machine, ensure the OpenClaw daemon has\nbeen granted camera permission (macOS: System Settings > Privacy & Security > Camera; Linux:\ncheck `\u002Fdev\u002Fvideo*` permissions; Windows: Settings > Privacy > Camera > allow desktop apps).\n\n**Signal quality is always Low (1–2 bars)**\n\nCommon causes:\n\n- Finger is not covering the lens fully — ambient light is leaking in.\n- Pressing too hard — reduces capillary blood flow.\n- Bright flickering light source (TV, fluorescent) in the room — try a different location.\n- Cold hands — warm them briefly before measuring.\n\n**`npm install` fails for `@opencv-tsjs\u002Fopencv4nodejs`**\n\nThis package compiles native bindings. Install build tools first:\n\n```bash\n# macOS\nxcode-select --install\n\n# Ubuntu \u002F Debian\nsudo apt-get install build-essential cmake libopencv-dev\n\n# Windows\nnpm install --global windows-build-tools\n```\n\nThen retry `npm install` inside the skill directory.\n\n**Live BPM display never appears on the R1 during measurement**\n\nThe live streaming feature requires `HEART_SENSE_STREAM_LIVE=true` (default). If it is set\nand still not appearing, check that `PluginMessageHandler` is available in the Creation's\nWebView context. This feature requires RabbitOS 2.0.3 or later.\n\n**`ocReceive` times out (45s) on every measurement**\n\nThe host machine is too slow to process 900 frames within the timeout window. Options:\n\n1. Reduce `HEART_SENSE_MIN_FRAMES` to 450 (15 seconds of signal — less accurate but faster).\n2. Disable OpenCV-based motion rejection to reduce compute: set\n   `HEART_SENSE_QUALITY_THRESHOLD=0` (forces FFT only, no fallback).\n3. Increase the timeout on the Creation side by modifying `ocReceive({ timeoutMs: 60000 })`.\n",{"name":5,"author":24,"version":25,"metadata":26,"description":7},"rabbit-r1-skillz","1.0.0",{"openclaw":27},{"requires":28,"primaryEnv":34},{"npm":29,"bins":32},[30,31],"sharp","@opencv-tsjs\u002Fopencv4nodejs",[33],"node","HEART_SENSE_ENABLED","main","734489c70f6293d3b800cd956559034acaa9f563","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren","https:\u002F\u002Fgithub.com\u002Fajohnsonnow","structuredforgrowth.com","2026-09-04 21:06:25",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":53},[43,46,49],{"tool":44,"command":45},"npx","npx skills add ajohnsonnow\u002Fr1-warren --skill heart-sense",{"tool":47,"command":48},"bunx","bunx skills add ajohnsonnow\u002Fr1-warren --skill heart-sense",{"tool":50,"command":51},"pnpm","pnpm dlx skills add ajohnsonnow\u002Fr1-warren --skill heart-sense","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fheart-sense\u002FSKILL.md",true,[55,61,65],{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"card.jpg","ASSET","资产文件",19795,"https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fheart-sense\u002Fcard.jpg",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"icon.png",7440,"https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fheart-sense\u002Ficon.png",{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"index.html","REFERENCE","参考文档",67618,"https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fheart-sense\u002Findex.html",[72,79,86,93,100,107],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M75THZJQ1XYR8QDWB9RXC9QV","whisper-quiz","WhisperQuiz — voice-answered trivia game for Rabbit R1. Generates questions via the R1's built-in LLM, captures spoken answers via STT, and evaluates correctness with flexible LLM-based matching.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fwhisper-quiz\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M75THW5BJRSQQM3QP6M568FT","walk-cast","Walking podcast production skill. Receives raw audio metadata and transcript from the R1, removes long pauses, applies noise reduction and normalization, generates AI chapter titles and episode metadata via LLM, and uploads the final episode to your configured podcast RSS host (Spotify for Podcasters \u002F Anchor, Podbean, Buzzsprout, RSS.com, or any FTP-accessible feed).","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fwalk-cast\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M75THTANZTS2AMDDBP615RTA","voice-novel","Local machine skill for VoiceNovel — handles story export to disk.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-novel\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M75THQ175ZRJ3E0GPFW7QKM8","voice-guide","Environment description and navigation assistant for blind and low-vision users. Analyzes camera frames via a vision LLM, reads visible text, identifies scene categories (people\u002Fvehicles\u002Ffood\u002Fhazards\u002Fexits), performs 360° scans, retrieves GPS position, and sends emergency SMS alerts — all via audio feedback with zero screen dependency.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-guide\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":19},"01M75THKAJR69WV7QQYJ26X95C","voice-draft","Voice-driven document drafting for the Rabbit R1. Dictate stream-of-consciousness speech; the R1 formats it into Email, Blog Post, Report, Proposal, Meeting Notes, Creative Writing, Code Comments, Cover Letter, or Tweet Thread — then saves the result to a configured folder on your local machine via OpenClaw.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-draft\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":19},"01M75THGKGY2JY59MM9PREXCXX","voice-commit","Hands-free git and CI workflow voice controller for the Rabbit R1. Speak git\u002FCI commands and hear results — commit, push, status, PR management, test runs, and deploy, all voice-driven via OpenClaw.","https:\u002F\u002Fgithub.com\u002Fajohnsonnow\u002Fr1-warren\u002Fblob\u002Fmain\u002Fvoice-commit\u002FSKILL.md",[],[]]