{
  "schemaVersion": "1.0",
  "item": {
    "slug": "fitbit-analytics",
    "name": "Fitbit Analytics",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/kesslerio/fitbit-analytics",
    "canonicalUrl": "https://clawhub.ai/kesslerio/fitbit-analytics",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/fitbit-analytics",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=fitbit-analytics",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "README.md",
      "SETUP.md",
      "SKILL.md",
      "docs/PRIVACY.md",
      "docs/TERMS.md",
      "references/api.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/fitbit-analytics"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/fitbit-analytics",
    "agentPageUrl": "https://openagent3.xyz/skills/fitbit-analytics/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fitbit-analytics/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fitbit-analytics/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Quick Start",
        "body": "# Set Fitbit API credentials\nexport FITBIT_CLIENT_ID=\"your_client_id\"\nexport FITBIT_CLIENT_SECRET=\"your_client_secret\"\nexport FITBIT_ACCESS_TOKEN=\"your_access_token\"\nexport FITBIT_REFRESH_TOKEN=\"your_refresh_token\"\n\n# Generate morning briefing with Active Zone Minutes\npython scripts/fitbit_briefing.py\n\n# Fetch daily steps\npython scripts/fitbit_api.py steps --days 7\n\n# Get heart rate data\npython scripts/fitbit_api.py heartrate --days 7\n\n# Sleep summary\npython scripts/fitbit_api.py sleep --days 7\n\n# Generate weekly health report\npython scripts/fitbit_api.py report --type weekly\n\n# Get activity summary\npython scripts/fitbit_api.py summary --days 7"
      },
      {
        "title": "When to Use",
        "body": "Use this skill when:\n\nFetching Fitbit metrics (steps, calories, heart rate, sleep)\nAnalyzing activity trends over time\nSetting up alerts for inactivity or abnormal heart rate\nGenerating daily/weekly health reports"
      },
      {
        "title": "1. Daily Briefing",
        "body": "# Generate morning health briefing (includes Active Zone Minutes)\npython scripts/fitbit_briefing.py                    # Today's briefing\npython scripts/fitbit_briefing.py --date 2026-01-20  # Specific date\npython scripts/fitbit_briefing.py --format brief     # 3-line summary\npython scripts/fitbit_briefing.py --format json      # JSON output\n\n# Example output includes:\n# - Yesterday's activities (logged exercises)\n# - Yesterday's Active Zone Minutes (total, Fat Burn, Cardio, Peak)\n# - Today's activity summary (steps, calories, floors, distance)\n# - Heart rate (resting, average, zones)\n# - Sleep (duration, efficiency, awake episodes)\n# - Trends vs 7-day average\n\nExample JSON output:\n\n{\n  \"date\": \"2026-01-21\",\n  \"steps_today\": 8543,\n  \"calories_today\": 2340,\n  \"distance_today\": 6.8,\n  \"floors_today\": 12,\n  \"active_minutes\": 47,\n  \"resting_hr\": 58,\n  \"avg_hr\": 72,\n  \"sleep_hours\": 7.2,\n  \"sleep_efficiency\": 89,\n  \"awake_minutes\": 12,\n  \"yesterday_activities\": [\n    {\"name\": \"Run\", \"duration\": 35, \"calories\": 320}\n  ],\n  \"yesterday_azm\": {\n    \"activeZoneMinutes\": 61,\n    \"fatBurnActiveZoneMinutes\": 39,\n    \"cardioActiveZoneMinutes\": 22\n  }\n}\n\nNote: Cardio Load is NOT available via Fitbit API - it's a Fitbit Premium feature only visible in the mobile app."
      },
      {
        "title": "2. Data Fetching (CLI)",
        "body": "# Available commands:\npython scripts/fitbit_api.py steps --days 7\npython scripts/fitbit_api.py calories --days 7\npython scripts/fitbit_api.py heartrate --days 7\npython scripts/fitbit_api.py sleep --days 7\npython scripts/fitbit_api.py summary --days 7\npython scripts/fitbit_api.py report --type weekly"
      },
      {
        "title": "3. Data Fetching (Python API)",
        "body": "export PYTHONPATH=\"{baseDir}/scripts\"\npython - <<'PY'\nfrom fitbit_api import FitbitClient\n\nclient = FitbitClient()  # Uses env vars for credentials\n\n# Fetch data (requires start_date and end_date)\nsteps_data = client.get_steps(start_date=\"2026-01-01\", end_date=\"2026-01-16\")\nhr_data = client.get_heartrate(start_date=\"2026-01-01\", end_date=\"2026-01-16\")\nsleep_data = client.get_sleep(start_date=\"2026-01-01\", end_date=\"2026-01-16\")\nactivity_summary = client.get_activity_summary(start_date=\"2026-01-01\", end_date=\"2026-01-16\")\nPY"
      },
      {
        "title": "4. Analysis",
        "body": "export PYTHONPATH=\"{baseDir}/scripts\"\npython - <<'PY'\nfrom fitbit_api import FitbitAnalyzer\n\nanalyzer = FitbitAnalyzer(steps_data, hr_data)\nsummary = analyzer.summary()\nprint(summary)  # Returns: avg_steps, avg_resting_hr, step_trend\nPY"
      },
      {
        "title": "5. Alerts",
        "body": "python {baseDir}/scripts/alerts.py --days 7 --steps 8000 --sleep 7"
      },
      {
        "title": "Scripts",
        "body": "scripts/fitbit_api.py - Fitbit Web API wrapper, CLI, and analysis\nscripts/fitbit_briefing.py - Morning briefing CLI (text/brief/json output)\nscripts/alerts.py - Threshold-based notifications"
      },
      {
        "title": "Available API Methods",
        "body": "MethodDescriptionget_steps(start, end)Daily step countsget_calories(start, end)Daily calories burnedget_distance(start, end)Daily distanceget_activity_summary(start, end)Activity summaryget_heartrate(start, end)Heart rate dataget_sleep(start, end)Sleep dataget_sleep_stages(start, end)Detailed sleep stagesget_spo2(start, end)Blood oxygen levelsget_weight(start, end)Weight measurementsget_active_zone_minutes(start, end)Active Zone Minutes (AZM) breakdown"
      },
      {
        "title": "References",
        "body": "references/api.md - Fitbit Web API documentation\nreferences/metrics.md - Metric definitions and interpretations"
      },
      {
        "title": "Authentication",
        "body": "Fitbit API requires OAuth 2.0 authentication:\n\nCreate app at: https://dev.fitbit.com/apps\nGet client_id and client_secret\nComplete OAuth flow to get access_token and refresh_token\nSet environment variables or pass to scripts"
      },
      {
        "title": "Environment",
        "body": "Required:\n\nFITBIT_CLIENT_ID\nFITBIT_CLIENT_SECRET\nFITBIT_ACCESS_TOKEN\nFITBIT_REFRESH_TOKEN"
      },
      {
        "title": "Automation (Cron Jobs)",
        "body": "Cron jobs are configured in OpenClaw's gateway, not in this repo. Add these to your OpenClaw setup:"
      },
      {
        "title": "Daily Morning Briefing (8:00 AM)",
        "body": "openclaw cron add \\\n  --name \"Morning Fitbit Health Report\" \\\n  --cron \"0 8 * * *\" \\\n  --tz \"America/Los_Angeles\" \\\n  --session isolated \\\n  --wake next-heartbeat \\\n  --deliver \\\n  --channel telegram \\\n  --target \"<YOUR_TELEGRAM_CHAT_ID>\" \\\n  --message \"python3 /path/to/your/scripts/fitbit_briefing.py --format text\"\n\nNote: Replace /path/to/your/ with your actual path and <YOUR_TELEGRAM_CHAT_ID> with your Telegram channel/group ID."
      }
    ],
    "body": "Fitbit Analytics\nQuick Start\n# Set Fitbit API credentials\nexport FITBIT_CLIENT_ID=\"your_client_id\"\nexport FITBIT_CLIENT_SECRET=\"your_client_secret\"\nexport FITBIT_ACCESS_TOKEN=\"your_access_token\"\nexport FITBIT_REFRESH_TOKEN=\"your_refresh_token\"\n\n# Generate morning briefing with Active Zone Minutes\npython scripts/fitbit_briefing.py\n\n# Fetch daily steps\npython scripts/fitbit_api.py steps --days 7\n\n# Get heart rate data\npython scripts/fitbit_api.py heartrate --days 7\n\n# Sleep summary\npython scripts/fitbit_api.py sleep --days 7\n\n# Generate weekly health report\npython scripts/fitbit_api.py report --type weekly\n\n# Get activity summary\npython scripts/fitbit_api.py summary --days 7\n\nWhen to Use\n\nUse this skill when:\n\nFetching Fitbit metrics (steps, calories, heart rate, sleep)\nAnalyzing activity trends over time\nSetting up alerts for inactivity or abnormal heart rate\nGenerating daily/weekly health reports\nCore Workflows\n1. Daily Briefing\n# Generate morning health briefing (includes Active Zone Minutes)\npython scripts/fitbit_briefing.py                    # Today's briefing\npython scripts/fitbit_briefing.py --date 2026-01-20  # Specific date\npython scripts/fitbit_briefing.py --format brief     # 3-line summary\npython scripts/fitbit_briefing.py --format json      # JSON output\n\n# Example output includes:\n# - Yesterday's activities (logged exercises)\n# - Yesterday's Active Zone Minutes (total, Fat Burn, Cardio, Peak)\n# - Today's activity summary (steps, calories, floors, distance)\n# - Heart rate (resting, average, zones)\n# - Sleep (duration, efficiency, awake episodes)\n# - Trends vs 7-day average\n\n\nExample JSON output:\n\n{\n  \"date\": \"2026-01-21\",\n  \"steps_today\": 8543,\n  \"calories_today\": 2340,\n  \"distance_today\": 6.8,\n  \"floors_today\": 12,\n  \"active_minutes\": 47,\n  \"resting_hr\": 58,\n  \"avg_hr\": 72,\n  \"sleep_hours\": 7.2,\n  \"sleep_efficiency\": 89,\n  \"awake_minutes\": 12,\n  \"yesterday_activities\": [\n    {\"name\": \"Run\", \"duration\": 35, \"calories\": 320}\n  ],\n  \"yesterday_azm\": {\n    \"activeZoneMinutes\": 61,\n    \"fatBurnActiveZoneMinutes\": 39,\n    \"cardioActiveZoneMinutes\": 22\n  }\n}\n\n\nNote: Cardio Load is NOT available via Fitbit API - it's a Fitbit Premium feature only visible in the mobile app.\n\n2. Data Fetching (CLI)\n# Available commands:\npython scripts/fitbit_api.py steps --days 7\npython scripts/fitbit_api.py calories --days 7\npython scripts/fitbit_api.py heartrate --days 7\npython scripts/fitbit_api.py sleep --days 7\npython scripts/fitbit_api.py summary --days 7\npython scripts/fitbit_api.py report --type weekly\n\n3. Data Fetching (Python API)\nexport PYTHONPATH=\"{baseDir}/scripts\"\npython - <<'PY'\nfrom fitbit_api import FitbitClient\n\nclient = FitbitClient()  # Uses env vars for credentials\n\n# Fetch data (requires start_date and end_date)\nsteps_data = client.get_steps(start_date=\"2026-01-01\", end_date=\"2026-01-16\")\nhr_data = client.get_heartrate(start_date=\"2026-01-01\", end_date=\"2026-01-16\")\nsleep_data = client.get_sleep(start_date=\"2026-01-01\", end_date=\"2026-01-16\")\nactivity_summary = client.get_activity_summary(start_date=\"2026-01-01\", end_date=\"2026-01-16\")\nPY\n\n4. Analysis\nexport PYTHONPATH=\"{baseDir}/scripts\"\npython - <<'PY'\nfrom fitbit_api import FitbitAnalyzer\n\nanalyzer = FitbitAnalyzer(steps_data, hr_data)\nsummary = analyzer.summary()\nprint(summary)  # Returns: avg_steps, avg_resting_hr, step_trend\nPY\n\n5. Alerts\npython {baseDir}/scripts/alerts.py --days 7 --steps 8000 --sleep 7\n\nScripts\nscripts/fitbit_api.py - Fitbit Web API wrapper, CLI, and analysis\nscripts/fitbit_briefing.py - Morning briefing CLI (text/brief/json output)\nscripts/alerts.py - Threshold-based notifications\nAvailable API Methods\nMethod\tDescription\nget_steps(start, end)\tDaily step counts\nget_calories(start, end)\tDaily calories burned\nget_distance(start, end)\tDaily distance\nget_activity_summary(start, end)\tActivity summary\nget_heartrate(start, end)\tHeart rate data\nget_sleep(start, end)\tSleep data\nget_sleep_stages(start, end)\tDetailed sleep stages\nget_spo2(start, end)\tBlood oxygen levels\nget_weight(start, end)\tWeight measurements\nget_active_zone_minutes(start, end)\tActive Zone Minutes (AZM) breakdown\nReferences\nreferences/api.md - Fitbit Web API documentation\nreferences/metrics.md - Metric definitions and interpretations\nAuthentication\n\nFitbit API requires OAuth 2.0 authentication:\n\nCreate app at: https://dev.fitbit.com/apps\nGet client_id and client_secret\nComplete OAuth flow to get access_token and refresh_token\nSet environment variables or pass to scripts\nEnvironment\n\nRequired:\n\nFITBIT_CLIENT_ID\nFITBIT_CLIENT_SECRET\nFITBIT_ACCESS_TOKEN\nFITBIT_REFRESH_TOKEN\nAutomation (Cron Jobs)\n\nCron jobs are configured in OpenClaw's gateway, not in this repo. Add these to your OpenClaw setup:\n\nDaily Morning Briefing (8:00 AM)\nopenclaw cron add \\\n  --name \"Morning Fitbit Health Report\" \\\n  --cron \"0 8 * * *\" \\\n  --tz \"America/Los_Angeles\" \\\n  --session isolated \\\n  --wake next-heartbeat \\\n  --deliver \\\n  --channel telegram \\\n  --target \"<YOUR_TELEGRAM_CHAT_ID>\" \\\n  --message \"python3 /path/to/your/scripts/fitbit_briefing.py --format text\"\n\n\nNote: Replace /path/to/your/ with your actual path and <YOUR_TELEGRAM_CHAT_ID> with your Telegram channel/group ID."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/kesslerio/fitbit-analytics",
    "publisherUrl": "https://clawhub.ai/kesslerio/fitbit-analytics",
    "owner": "kesslerio",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/fitbit-analytics",
    "downloadUrl": "https://openagent3.xyz/downloads/fitbit-analytics",
    "agentUrl": "https://openagent3.xyz/skills/fitbit-analytics/agent",
    "manifestUrl": "https://openagent3.xyz/skills/fitbit-analytics/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/fitbit-analytics/agent.md"
  }
}