360 Secure SkillHub
360 安全技能中心

Fitbit Health Skill

Fitbit CLI Skill:通过命令行调用 Fitbit Web API 获取用户资料、每日活动、步数、睡眠、心率与体重等健康数据,支持 OAuth 授权、自动刷新令牌、日期与选项参数,以及文本或 JSON 输出。

pb3975
pb3975
热度 89.27
最近更新 2026-05-11 15:50:57
分类:生活依赖:代码执行 / 读写文件 / 第三方 API应用场景:健康 / API 集成 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add fitbit-health
Metadata
name
fitbit
description
Query Fitbit health data (activity, sleep, heart rate, weight) via CLI. Use when answering health/fitness questions that require Fitbit data, or when the user asks about their steps, sleep, heart rate, or weight from Fitbit.
metadata
{"clawdbot":{"emoji":"💪","requires":{"bins":["fitbit"]}}}

Fitbit CLI

Retrieve health and fitness data from Fitbit's Web API.

Setup

  1. Register an app at https://dev.fitbit.com/apps
    • OAuth 2.0 Application Type: Personal
    • Callback URL: http://localhost:18787/callback
  2. Run fitbit configure and enter your Client ID
  3. Run fitbit login to authorize

Quick Reference

# Setup & auth
fitbit configure              # Set client ID (first time)
fitbit login                  # Authorize via browser
fitbit logout                 # Sign out
fitbit status                 # Check auth status

# Data
fitbit profile                # User profile info
fitbit activity [date]        # Daily activity summary
fitbit activity steps [date]  # Just steps
fitbit summary [date]         # Full daily summary
fitbit today                  # Today's summary (shortcut)

Options

All commands support:

  • --json — JSON output
  • --no-color — Plain text output
  • --verbose — Debug/HTTP details
  • --tz <zone> — Override timezone (e.g., America/Chicago)

Examples

# Get today's step count
fitbit activity steps

# Get yesterday's full summary as JSON
fitbit summary 2026-01-25 --json

# Check if authenticated
fitbit status

Notes

  • Dates default to today if omitted
  • Date format: YYYY-MM-DD or today
  • Tokens are stored in ~/.config/fitbit-cli/tokens.json (chmod 600)
  • Token refresh is automatic