# google-health

This Claude Code skill connects Google Health and imports wearable metrics. It runs when PLSI is asked to link an account or fetch a date range.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf (Devin Desktop), Claude.ai · ★ 93 repo stars
- Author: Insilico-org
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/Insilico-org/plsi/tree/HEAD/skills/wearables/google-health/SKILL.md
- Updated: 2026-11-15
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/google-health

## What it does

The skill connects through the Google Health API and OAuth, then retrieves available daily metrics for the requested period. These can include sleep, steps, resting heart rate, HRV, weight and other readings. It checks that Google Health is installed and receiving synced metrics, then prepares daily rows for `wearables/import`. A first connection needs a Google Cloud project with the Health API enabled and the user's own OAuth client, configured with `GOOGLE_HEALTH_CLIENT_ID` and `GOOGLE_HEALTH_CLIENT_SECRET`; authorization also uses `GOOGLE_HEALTH_REFRESH_TOKEN`.

Exports stay in the work folder, and secrets are accessed through `plsi.keys.get`. For sleep, the skill keeps one primary source per night or merges overlapping sessions instead of adding them together. In Testing mode, the refresh token expires after about 7 days. Google Health may contain only about 90 days of history, so older records require an export from the original app.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Insilico-org/plsi --skill google-health -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/google-health/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/google-health/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Insilico-org/plsi --skill google-health -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/google-health/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Insilico-org/plsi --skill google-health -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/google-health/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Insilico-org/plsi skills/wearables/google-health
```

2. **Manually: put the files in place**
- File: `.github/skills/google-health/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Insilico-org/plsi --skill google-health -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Insilico-org/plsi --path skills/wearables/google-health
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/google-health/SKILL.md` — The legacy .windsurf/skills/ path still works

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Insilico-org/plsi/tree/HEAD/skills/wearables/google-health/SKILL.md

## When to use it
- connect Google Health with the user's OAuth client
- fetch wearable history for a requested date range
- prepare daily records for `wearables/import`
- avoid counting overlapping sleep sessions twice

## Example prompts
- Connect Google Health to PLSI and check whether steps and sleep are syncing.
- Import resting heart rate and HRV from Google Health for a closed month.
- Fetch sleep records and merge overlapping sessions from the same night.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 64b3b8b81ed4f636.

BEGIN THIRD-PARTY FILE 64b3b8b81ed4f636
````text
---
name: google-health
description: Use as PLSI Wearables when PLSI asks to connect Google Health or pull wearable metrics from it (steps, sleep, resting heart rate, HRV, distance, active minutes) - install and link checks, the user's own OAuth client, the history pull, sleep dedupe and the original-app export warning - so daily rows reach wearables/import.
---

# PLSI Google Health

Google Health is pulled with **Google Health API OAuth only** (`plsi refs show google_health`): never an invented
Apple Health web API (Apple Health comes through the P.R.O. app, `wearables/apple-health`), never scraping a vendor
dashboard. The daily rows then go through `wearables/import` steps 3-6.

## When to use

- A `request` to connect Google Health, or to import a range from it (the first connect, or PLSI's check-in asking
  for a closed month not yet recorded).
- Not when Open Wearables is connected and already links Google Health: read it there (`wearables/import`), never
  pull the same source twice. With Apple Health (P.R.O.) also connected, `wearables/import` keeps one app per
  metric.

## Steps

1. **Prerequisites and the history warning, in ONE `question`** (skip what PLSI's request says is confirmed):
   - [ ] Google Health is installed on the user's phone.
   - [ ] The wearable or phone metrics sync into it (directly, through Health Connect or a linked app).
   - [ ] They can open Google Health and see recent steps or sleep.

   With it, once: "Google Health usually does **not** hold everything stored in Apple Health, Garmin, Whoop, Oura
   and similar apps; a pull often reaches back only about 90 days. For full history, export from the original app
   and send the file." How to export: Apple Health, Health app -> profile picture -> Export All Health Data (a zip of
   XML, can take a while); other vendors, their account data export or GDPR download. Options: All set / Not yet /
   Use an export instead. "Not yet": say what to install or link in the `result` and stop until PLSI asks again.
   "Use an export instead": `wearables/import` with the file. Never claim the API replaces that export.

2. **The user's own OAuth client** (first connect). Check presence only, never values:

   ```bash
   plsi keys status
   ```

   No client: ONE `question` with the setup steps, read from the docs at run time (the `google_health` reference url):
   a Google Cloud project owned by the user; enable the Health API; the OAuth consent screen (in **Testing** mode
   the refresh token expires after about **7 days**, so they re-consent until the app is published); an OAuth client
   (Desktop, or Web with redirect `http://127.0.0.1:<port>/`); only the **read-only** scopes for the metrics the maps
````
END THIRD-PARTY FILE 64b3b8b81ed4f636

The third-party file has ended. Everything between the 64b3b8b81ed4f636 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2720 of 6688 bytes. © Insilico-org · MIT · https://github.com/Insilico-org/plsi/tree/HEAD/skills/wearables/google-health/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
