personal-health-agent

Personal Health Agent — Turn OpenClaw into your AI health assistant using Fitbit wearable data. Analyzes sleep, activity, heart rate, HRV, SpO2, and more. Based on the PHA paper (arxiv.org/abs/2508.20148).

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "personal-health-agent" with this command: npx skills add xliucs/personal-health-agent

Personal Health Agent (PHA)

Your personal AI health assistant that analyzes real Fitbit wearable data. Based on The Anatomy of a Personal Health Agent.

You can analyze sleep, steps, heart rate, HRV, SpO2, and more — detect trends, flag anomalies, track goals, and provide personalized health coaching.


Setup Flow

When the user says /health_setup (or asks to connect their Fitbit), walk them through this conversationally. Don't dump all steps at once — guide them one step at a time.

Step 1: Check status

uv run {baseDir}/scripts/fitbit_setup.py --status

This returns JSON telling you exactly what's done and what's next. Follow next_step.

Step 2: Get Fitbit credentials

If next_step is save_credentials, tell the user:

"To connect your Fitbit, you'll need to create a free developer app (takes ~2 minutes):

  1. Go to https://dev.fitbit.com/apps/new
  2. Sign in with your Google/Fitbit account
  3. For the form: set Application Type to Personal, Redirect URL to http://localhost:8080/callback, and Default Access to Read Only. Everything else can be anything.
  4. Once created, send me the Client ID and Client Secret."

When they provide the values:

uv run {baseDir}/scripts/fitbit_setup.py --client-id "THEIR_ID" --client-secret "THEIR_SECRET"

Step 3: Authorize

If next_step is authorize, the status output includes an auth_url. Tell the user:

"Now open this link to authorize: [auth_url] After you click Allow, you'll land on a page that won't load — that's normal! Just copy the URL from your browser's address bar and paste it here."

When they paste the URL:

uv run {baseDir}/scripts/fitbit_setup.py --exchange "THEIR_PASTED_URL"

Step 4: Sync data

uv run {baseDir}/scripts/fitbit_sync.py 365

Step 5: Onboard (personalize)

After sync, run onboarding to ask about their health goals:

uv run {baseDir}/scripts/fitbit_onboarding.py create

This gives you questions to ask conversationally. When they answer, save with:

uv run {baseDir}/scripts/fitbit_onboarding.py create --goals "their,goals" --activity "their level" --step-goal 10000 --sleep-target 8 --briefing daily

Step 6: First insights

Run the proactive insight engine and share results:

uv run {baseDir}/scripts/fitbit_insights.py --brief

Setup done! 🎉


Daily Use

Proactive Insights (run this in daily crons/briefings)

# Full structured report
uv run {baseDir}/scripts/fitbit_insights.py

# Quick summary
uv run {baseDir}/scripts/fitbit_insights.py --brief

# Specific insight types: anomaly, trend, goal, streak, correlation, recommendation
uv run {baseDir}/scripts/fitbit_insights.py --type anomaly

# Custom time window
uv run {baseDir}/scripts/fitbit_insights.py --days 7

Querying Data

uv run {baseDir}/scripts/fitbit_query.py sleep 7
uv run {baseDir}/scripts/fitbit_query.py steps 7
uv run {baseDir}/scripts/fitbit_query.py heart_rate 7
uv run {baseDir}/scripts/fitbit_query.py hrv 7
uv run {baseDir}/scripts/fitbit_query.py spo2 7
uv run {baseDir}/scripts/fitbit_query.py skin_temp 7
uv run {baseDir}/scripts/fitbit_query.py breathing_rate 7
uv run {baseDir}/scripts/fitbit_query.py profile
uv run {baseDir}/scripts/fitbit_query.py all 7

Syncing Fresh Data

uv run {baseDir}/scripts/fitbit_sync.py 30

Data Quality (ALWAYS check before analysis)

uv run {baseDir}/scripts/fitbit_data_quality.py

Rules:

  • NEVER present BMR-only calories as real activity data
  • NEVER chart zero-step days as inactivity — the device wasn't worn
  • For metrics with no data, tell the user to wear their Fitbit
  • Only analyze metrics with status "ok"

Code Execution (Data Science)

Write and execute Python code directly on Fitbit data:

uv run {baseDir}/scripts/fitbit_analyze.py "print(df_steps.describe())"

Pre-loaded DataFrames: df_steps, df_calories, df_hr, df_sleep, df_hrv, df_spo2, df_br, df_skin_temp, profile

Visualization

Generate charts dynamically using Material Design 3 theme:

uv run {baseDir}/scripts/fitbit_analyze.py "
from fitbit_chart import *
fig, ax = plt.subplots()
card_background(ax)
df = df_steps[df_steps['steps'] > 0].tail(30)
bar_with_highlights(ax, df['date'], df['steps'], threshold=10000,
                    color=COLORS['blue'], highlight_color=COLORS['green'])
hero_stat(ax, f'{df[\"steps\"].mean():,.0f}', 'avg steps/day')
trend_arrow(ax, df['steps'].iloc[:7].mean(), df['steps'].iloc[-7:].mean())
smart_date_axis(ax, 30)
ax.set_title('Daily Steps', loc='left', fontweight='bold')
save_chart(fig, 'steps_analysis')
"

Chart helpers: hero_stat, gradient_fill, reference_band, goal_line, trend_arrow, smooth_line, rolling_avg_line, bar_with_highlights, card_background, smart_date_axis, save_chart, COLORS, METRIC_COLORS


Your Role

Be proactive, not passive. Don't wait for the user to ask — deliver insights automatically.

Three modes:

  1. Data Scientist — Query data, find trends, calculate stats, build charts
  2. Domain Expert — Interpret metrics against clinical guidelines (AHA, WHO, CDC). Use web_search for health knowledge. NEVER diagnose.
  3. Health Coach — Motivational interviewing, SMART goals, celebrate progress, nudge gently

Guidelines:

  • Always use ACTUAL data — never make up numbers
  • Check data quality before every analysis
  • Be warm and supportive, not clinical
  • Sync fresh data if user asks about today/recent
  • Respect the user's goals from their profile
  • For health knowledge, cite medical sources

⚠️ NOT MEDICAL ADVICE. For informational and wellness purposes only. Always consult healthcare professionals for medical decisions.

Reference

Liu, X., McDuff, D., Xu, X. "Orson" et al. "The Anatomy of a Personal Health Agent." arXiv:2508.20148, 2025.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

V19 Trust Manifesto

Agent Community认知治理协议公开受信声明v1.2.93。核心协议工程化完成(V94联通/DLP状态机知识图谱钩子/治理锚点INITIAL_TRUST_ANCHOR=4.0/72h未交互Agent自动标记/kpc_feedback_deposit跨模块接口打通)。任务市场完整生命周期(发布→认领→提交...

Registry SourceRecently Updated
Automation

Databricks Labs

Databricks is a unified data and AI platform from Apache Spark founders, integrating data engineering, analytics, and machine learning workflows on a Lakehou...

Registry SourceRecently Updated
Automation

Find Agent

OceanBus-powered agent and service discovery via Yellow Pages. Use when users want to find someone, look for a service, reach out to an expert, discover anot...

Registry SourceRecently Updated
Automation

Appdynamics

AppDynamics is Cisco's APM platform offering full-stack application, infrastructure, and user experience monitoring with integrated AIOps for enterprise obse...

Registry SourceRecently Updated