
health-data
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.
- Installs
- 393
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/glebis/claude-skills --skill health-data- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads health-data automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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
1. Python Script (Recommended for Common Queries)
Use scripts/health_query.py for pre-built queries with automatic formatting:
# 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.
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:
python ~/.claude/skills/health-data/scripts/health_query.py daily
Returns: steps, calories, heart rate (avg/min/max), exercise minutes, distance, activity ring status.
Weekly Trends
Compare week-over-week performance:
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:
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:
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:
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:
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:
{
"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):
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:
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):
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:
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;
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 templatesfhir_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/:
python import_health.py --status
No data for date range: Check available date range:
SELECT MIN(start_date), MAX(start_date) FROM health_records;
Outlier values: Filter physiologically valid ranges (e.g., heart rate 40-200 bpm):
WHERE value BETWEEN 40 AND 200
FAQ
What does the health-data skill do?
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.
How do I install health-data?
Run npx skills add https://github.com/glebis/claude-skills --skill health-data in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/health-data/ (personal) or .claude/skills/health-data/ (project).
Which AI agents can use health-data?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is health-data safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains health-data?
It is published by glebis in glebis/claude-skills. It has 393 recorded installs.
More from glebis/claude-skills
google-image-search
glebis/claude-skills
Search and download images via Google Custom Search API with LLM-powered selection. This skill should be used when finding images for articles, presentations, research documents, or enriching Obsidian notes with relevant visuals. Supports simple queries, batch processing from JSON config, automatic config generation from terms, and full note enrichment with automatic image insertion below headings.
pdf-generation
glebis/claude-skills
Professional PDF generation from markdown using Pandoc with Eisvogel template and EB Garamond fonts. Use when converting markdown to PDF, creating white papers, research documents, marketing materials, or technical documentation. Supports both English and Russian documents with professional typography and color-coded themes. Mobile-optimized layout (6x9) by default for Telegram bot context, desktop/print layout (A4) for other contexts.
firecrawl-research
glebis/claude-skills
This skill should be used when the user requests to research topics using FireCrawl, enrich notes with web sources, search and scrape information, or write scientific/academic papers. It extracts research topics from markdown files, creates research documents with scraped sources, generates BibTeX bibliographies from research results, and provides Pandoc/MyST templates for academic writing with citation management.
deep-research
glebis/claude-skills
This skill should be used when conducting comprehensive research on any topic using the OpenAI Deep Research API. It automates prompt enhancement through interactive clarifying questions, saves research parameters, and executes deep research with web search capabilities. Use when the user asks for in-depth analysis, investigation, research summaries, or topic exploration.
presentation-generator
glebis/claude-skills
Generate interactive HTML presentations with neobrutalism styling, ASCII art decorations, and Agency brand colors. Outputs HTML (interactive with navigation), PNG (individual slides via Playwright), and PDF. References brand-agency skill for colors and typography. Use when creating presentations, slide decks, pitch materials, or visual summaries.
decision-toolkit
glebis/claude-skills
Generate structured decision-making tools — step-by-step guides, bias checkers, scenario explorers, and interactive dashboards. Use when facing significant choices requiring systematic analysis. Supports multiple cognitive styles and output formats.
Popular education & science skills
teach
mattpocock/skills
Teach the user a new skill or concept, within this workspace.
scaffold-exercises
mattpocock/skills
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
paper-context-resolver
lllllllama/rigorpilot-skills
Rigor Paper Context helper for README-first deep learning repo reproduction. Use only when the README and repository files leave a narrow reproduction-critical gap and the task is to resolve a specific paper detail such as dataset split, preprocessing, evaluation protocol, checkpoint mapping, or runtime assumption from primary paper sources while recording conflicts. Do not use for general paper summary, repo scanning, environment setup, command execution, title-only paper lookup, or replacing README guidance by default.
caveman-learn
juliusbrussee/caveman
Act on a Caveman learn report - review the ranked token sinks, apply cost-lowering fixes with per-edit consent, and report what those fixes returned. Use when asked to lower an agent's token cost, what caveman has saved, to trim a heavy CLAUDE.md, or to offload re-pasted context into cavemem.
gsap-plugins
greensock/gsap-skills
Official GSAP skill for GSAP plugins — registration, ScrollToPlugin, ScrollSmoother, Flip, Draggable, Inertia, Observer, SplitText, ScrambleText, SVG and physics plugins, CustomEase, EasePack, CustomWiggle, CustomBounce, GSDevTools. Use when the user asks about a GSAP plugin, scroll-to, flip animations, draggable, SVG drawing, or plugin registration.
teach-impeccable
pbakaus/impeccable
DEPRECATED: Use /impeccable teach instead. This command has been folded into the impeccable skill.