Agent skill

Health Data

by glebis in glebis/claude-skills

Query Apple Health SQLite database for vitals, activity, sleep, and workouts.

MITAuto-check passedProductivity & Automation

Install Health Data

skills CLI
$ npx skills add glebis/claude-skills --skill health-data -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install glebis/claude-skills health-data --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/glebis/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/health-data .claude/skills/health-data && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
health-data
GitHub stars
391
Token cost
~1.7k tokens
SKILL.md length
393 words
Files
5 (incl. scripts, references)
Skills in repo
92
Repo updated
First seen
Licence
MIT

At a glance

Query Apple Health SQLite database for vitals, activity, sleep, and workouts.

  • Works in 2 steps: Python Script (Recommended for Common… → Direct SQL (For Custom/Ad-hoc Queries)
  • Tasks that involve Health and fitness tracking
  • SKILL.md covers Database Location, Query Methods, Pre-built Queries and Output Formats, plus 5 more sections
  • Runs Python scripts from its folder; calls python and sqlite3

What it does

Health Data is an agent skill from glebis/claude-skills. Query Apple Health SQLite database for vitals, activity, sleep, and workouts. Supports Markdown, JSON, and FHIR R4 output formats. This skill should be used when analyzing health metrics, generating health reports, answering questions about fitness or sleep patterns, or exporting health data in standard formats.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `.claude-plugin/plugin.json`, `references/fhir_mappings.md` and `references/schema.md`).

It sits in Productivity & Automation, covering Health and fitness tracking and Clinical and healthcare research. It works with SQLite and SQL. The repository describes itself as: Collection of Claude Code skills for enhanced AI workflows. The licence is MIT.

When your agent uses it

  • Tasks that involve Health and fitness tracking
  • Tasks that involve Clinical and healthcare research

Example prompts

  • “/health-data”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Python Script (Recommended for Common Queries)
  2. Direct SQL (For Custom/Ad-hoc Queries)

What it can do on your machine

Read from SKILL.md and the folder at commit 3b88261. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • sqlite3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Health Data loads about 1.7k tokens when it runs, and up to ~6.2k if it reads all its reference files. Until then it costs about 81 tokens; SKILL.md has 393 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from glebis/claude-skills at commit 3b88261, republished under its MIT licence (© glebis). 393 words, ~1,711 tokens.

Download SKILL.mdSave it as .claude/skills/health-data/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
health-data
description
Query Apple Health SQLite database for vitals, activity, sleep, and workouts. Supports Markdown, JSON, and FHIR R4 output formats. This skill should be used when analyzing health metrics, generating health reports, answering questions about fitness or sleep patterns, or exporting health data in standard formats.

Apple Health Data Query Skill

Query and analyze health data from the local SQLite database containing 6.3M+ records across 43 health metrics.

Database Location

~/data/health.db

Query Methods

Use scripts/health_query.py for pre-built queries with automatic formatting:

bash
# Daily summary
python ~/.claude/skills/health-data/scripts/health_query.py --format markdown daily --date 2025-11-29

# Weekly trends
python ~/.claude/skills/health-data/scripts/health_query.py --format json weekly --weeks 4

# Sleep analysis
python ~/.claude/skills/health-data/scripts/health_query.py --format fhir sleep --days 7

# Latest vitals
python ~/.claude/skills/health-data/scripts/health_query.py vitals

# Activity rings
python ~/.claude/skills/health-data/scripts/health_query.py --format json activity --days 30

# Workout history
python ~/.claude/skills/health-data/scripts/health_query.py workouts --days 30 --type Running

# Custom SQL
python ~/.claude/skills/health-data/scripts/health_query.py --format json query "SELECT * FROM workouts LIMIT 5"

Output formats: markdown, json, fhir, ascii

2. Direct SQL (For Custom/Ad-hoc Queries)

For flexible queries, run SQL directly against the database. See references/schema.md for table structures and query templates.

bash
sqlite3 ~/data/health.db "SELECT AVG(value) FROM health_records WHERE record_type LIKE '%HeartRate%' AND start_date LIKE '2025-11%'"

Pre-built Queries

Daily Health Summary

Get today's key metrics:

bash
python ~/.claude/skills/health-data/scripts/health_query.py daily

Returns: steps, calories, heart rate (avg/min/max), exercise minutes, distance, activity ring status.

Compare week-over-week performance:

bash
python ~/.claude/skills/health-data/scripts/health_query.py weekly --weeks 4

Returns: average daily steps, resting HR, exercise minutes, workout count per week.

Sleep Analysis

Analyze sleep patterns:

bash
python ~/.claude/skills/health-data/scripts/health_query.py sleep --days 14

Returns: nightly duration, sleep stages (Core, Deep, REM), average sleep hours.

Latest Vitals

Get most recent vital readings:

bash
python ~/.claude/skills/health-data/scripts/health_query.py vitals

Returns: Heart Rate, HRV, Resting HR, Blood Oxygen, Respiratory Rate with timestamps.

Activity Rings

Track ring completion:

bash
python ~/.claude/skills/health-data/scripts/health_query.py activity --days 30

Returns: daily ring values/goals, completion percentages, perfect day count.

Workout History

Review exercise sessions:

bash
python ~/.claude/skills/health-data/scripts/health_query.py workouts --days 30 --type Running

Returns: workout type, duration, distance, calories, summary by type.

Output Formats

Markdown (default)

Human-readable tables and lists. Best for reports and summaries.

JSON

Structured data for programmatic use:

json
{
  "date": "2025-11-29",
  "metrics": {
    "steps": 8542,
    "active_calories": 450.5,
    "heart_rate": {"avg": 72.3, "min": 52, "max": 145}
  }
}
FHIR R4

Healthcare interoperability format. Outputs as FHIR Bundle with Observation resources using LOINC codes. See references/fhir_mappings.md for code mappings.

ASCII

Terminal-friendly output with bar charts and statistics:

============================================================
  DAILY SUMMARY - 2025-11-29
============================================================

METRICS
----------------------------------------
  steps                      2620
  active_calories           234.5
  heart_rate           avg:  67.5  min:  52  max: 108

ACTIVITY RINGS
----------------------------------------
  move       [███████░░░░░░░░░░░░░]  36.7% (238/650)
  exercise   [░░░░░░░░░░░░░░░░░░░░]   0.0% (0/35)
  stand      [████████████████████] 100.0% (10/10)

Common SQL Patterns

For ad-hoc queries, use these patterns from references/schema.md:

Heart rate by hour (circadian pattern):

sql
SELECT strftime('%H', start_date) as hour, ROUND(AVG(value), 1) as avg_hr
FROM health_records
WHERE record_type = 'HKQuantityTypeIdentifierHeartRate'
AND value BETWEEN 40 AND 200
GROUP BY hour ORDER BY hour;

Steps per day this month:

sql
SELECT DATE(start_date) as day, SUM(value) as steps
FROM health_records
WHERE record_type = 'HKQuantityTypeIdentifierStepCount'
AND start_date >= DATE('now', 'start of month')
GROUP BY day ORDER BY day;

Sleep quality (deep + REM hours):

sql
SELECT DATE(start_date) as night,
       ROUND(SUM(duration_minutes)/60.0, 1) as quality_hours
FROM sleep_sessions
WHERE sleep_stage IN ('Deep', 'REM')
GROUP BY night ORDER BY night DESC LIMIT 14;

Workout summary:

sql
SELECT REPLACE(workout_type, 'HKWorkoutActivityType', '') as type,
       COUNT(*) as count, ROUND(SUM(duration_minutes)) as total_min
FROM workouts
WHERE start_date >= DATE('now', '-30 days')
GROUP BY type ORDER BY count DESC;
Show full SKILL.md (146 more words)Show less

Record Types Available

The database contains 43 health metric types including:

Vitals: Heart Rate, HRV, Resting HR, Blood Oxygen, Respiratory Rate, Blood Pressure

Activity: Steps, Distance, Active Calories, Basal Calories, Flights Climbed, Exercise Time, Stand Time

Mobility: Walking Speed, Step Length, Walking Asymmetry, Stair Speed, Walking Steadiness

Body: Weight, BMI, Body Fat %

Audio: Environmental Noise, Headphone Exposure

Other: VO2 Max, Time in Daylight, UV Exposure

Data Coverage

  • Records: 6.3M+ measurements
  • Date range: 2015-10-13 to present
  • Workouts: 1,435 sessions
  • Sleep sessions: 40,514 records
  • Activity days: 1,875 daily summaries

Resources

scripts/
  • health_query.py - Main query tool with Markdown/JSON/FHIR output
references/
  • schema.md - Database schema, record type mappings, SQL query templates
  • fhir_mappings.md - LOINC codes and FHIR R4 templates

Troubleshooting

Database not found: Ensure ~/data/health.db exists. Run the import script from /Users/server/apple_health_export/:

bash
python import_health.py --status

No data for date range: Check available date range:

sql
SELECT MIN(start_date), MAX(start_date) FROM health_records;

Outlier values: Filter physiologically valid ranges (e.g., heart rate 40-200 bpm):

sql
WHERE value BETWEEN 40 AND 200

© glebis, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in health-data of glebis/claude-skills.

  • SKILL.md
  • .claude-plugin/plugin.json
  • references/fhir_mappings.md
  • references/schema.md
  • scripts/health_query.py

Open the folder on GitHubat commit 3b88261

Compare with similar skills

Health Data next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Health Data compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Health Data this skillglebis/claude-skills391—~1.7kAutomated safety check: PassMIT
Coachfelixrieseberg/claude-coach1991 repos~4.9kAutomated safety check: PassMIT
Pp Nutritionmvanhorn/printing-press-library2.1k—~3.9kAutomated safety check: NotesApache-2.0
Wahoo CloudLeoYeAI/openclaw-master-skills2.2k—~1.9kAutomated safety check: PassMIT
Pp Intervals Icumvanhorn/printing-press-library2.1k—~3kAutomated safety check: NotesApache-2.0
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Coach

    felixrieseberg/claude-coach

    Create personalized triathlon, marathon, and ultra-endurance training plans.

    199 GitHub starsUsed in 1 repo~4.9k tokens
    Productivity & AutomationAuto-check passed
  • Pp Nutrition

    mvanhorn/printing-press-library

    One agent-native CLI over USDA FoodData Central and NutritionValue.org - with cross-source enrichment, protein-density comparison, nutrient ranking, and a local SQLite cache no other nutrition tool…

    2.1k GitHub stars~3.9k tokensUpdated yesterday
    Productivity & AutomationAuto-check: notes
  • Wahoo Cloud

    LeoYeAI/openclaw-master-skills

    Wahoo Fitness Cloud API — fetch workouts, download FIT files, parse power/HR/cadence/GPS into local SQLite for analysis

    2.2k GitHub stars~1.9k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Pp Intervals Icu

    mvanhorn/printing-press-library

    The first intervals.icu CLI with a local training database — offline search, SQL Trigger phrases: sync my intervals.icu data, what's my form, compare my power this season, show my wellness trends…

    2.1k GitHub stars~3k tokensUpdated yesterday
    DatabasesAuto-check: notes
  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Cursor BYOK Database Schema

    leookun/cursor-byok

    Guides SQLite schema changes in the Cursor BYOK server, keeping SQLx migrations, the Rust store, API contracts and fixtures aligned.

    3.2k GitHub stars~1.3k tokensUpdated yesterday
    DatabasesAuto-check passed

More from glebis/claude-skills

All 92 skills in this repo
  • Runs a human-first workflow for labeling PII spans in a transcript, then scores inter-annotator agreement and drafts an adjudicated gold set.

    391 GitHub stars~1.3k tokensUpdated 2 days ago
    Auto-check passed
  • Automates a dedicated, logged-in Chrome instance per profile without ever closing the user's own open tabs or browser windows.

    391 GitHub stars~973 tokensUpdated 2 days ago
    Auto-check passed
  • Deep Research

    glebis/claude-skills

    This skill should be used when conducting comprehensive research on any topic using the OpenAI Deep Research API.

    391 GitHub stars~2.6k tokensUpdated 2 days ago
    Auto-check: notes
  • Elimination Research

    glebis/claude-skills

    This skill should be used for elimination-style research where the user wants to choose from a shortlist of products, tools, services, vendors, or other options using explicit criteria, numeric…

    391 GitHub stars~1.6k tokensUpdated 2 days ago
    Auto-check passed
  • Narrated HTML Presentations

    glebis/claude-skills

    Generates a self-contained HTML presentation with article and slides modes, ElevenLabs voiceover narration and optional GPT Image 2 illustrations.

    391 GitHub stars~2.3k tokensUpdated 2 days ago
    Auto-check: notes
  • Writes fictional but realistic coaching or therapy session transcripts for evals, demos and few-shot examples, in several modalities and export formats.

    391 GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Health Data

What does Health Data do?

Query Apple Health SQLite database for vitals, activity, sleep, and workouts. Health Data is an agent skill from glebis/claude-skills. Query Apple Health SQLite database for vitals, activity, sleep, and workouts.

When should I use Health Data?

Health Data fits situations like: tasks that involve Health and fitness tracking; tasks that involve Clinical and healthcare research.

How do I install Health Data in Claude Code?

Run `npx skills add glebis/claude-skills --skill health-data -a claude-code`. Or copy the skill folder (health-data in glebis/claude-skills) into .claude/skills/health-data in your project. Claude Code loads it when a task matches its description.

How do I install Health Data in Codex?

Run `npx skills add glebis/claude-skills --skill health-data -a codex`. Or copy the skill folder (health-data in glebis/claude-skills) into .agents/skills/health-data in your project. Codex loads it when a task matches its description.

Can I use Health Data in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add glebis/claude-skills --skill health-data -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/health-data, .gemini/skills/health-data, .github/skills/health-data and .opencode/skills/health-data in your project.

What does Health Data need to run?

Going by SKILL.md and its folder, Health Data needs Python for the scripts in its folder and the command-line tools its instructions call (python and sqlite3). Our summary lists: Python 3.

Does Health Data access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Health Data safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Health Data use?

Health Data is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Health Data use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.4k tokens, read only when the agent opens those files.

What are the alternatives to Health Data?

Skills that share tags, products or a category with Health Data: Coach (felixrieseberg/claude-coach, 199 stars), Pp Nutrition (mvanhorn/printing-press-library, 2.1k stars), Wahoo Cloud (LeoYeAI/openclaw-master-skills, 2.2k stars) and Pp Intervals Icu (mvanhorn/printing-press-library, 2.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Health Data?

glebis (a GitHub user) maintains it in glebis/claude-skills, which has 391 GitHub stars. The repository holds 92 skills in this directory. The repository was last updated on October 8, 2026.

Source: glebis/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.