← 返回 Skills 市场
sanwebgit

Amazfit Health Log

作者 Sanweb · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
77
总下载
1
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install amazfit-health-log
功能描述
Fetches Amazfit GTR3 health data from HCGateway and writes a daily Obsidian log note. Use when user says "health log", "GTR3 data", "write health data", "fet...
使用说明 (SKILL.md)

Amazfit GTR3 Health Log Skill

Automatically fetches Amazfit GTR3 health data from HCGateway and writes a structured daily Obsidian note.

When Triggered

  • User says: "health log", "fetch GTR3 data", "write health data", "health log for yesterday/today/[date]"
  • Daily cron job runs at 06:00 (configurable)

Prerequisites

  • HCGateway is running at http://127.0.0.1:6644
  • Docker containers hcgateway_api + hcgateway_db are active
  • HCGateway Android app has completed at least one sync (auto-syncs every 2h)
  • Credentials stored in skills/amazfit-health-log/config.json

Execution

Step 1: Verify container status

docker ps --filter "name=hcgateway" --format "{{.Names}}: {{.Status}}"

If containers are not running:

sudo docker compose -f /home/docker/hcgateway/docker-compose.yml up -d

Step 2: Run the Python script

For yesterday (default):

python3 ~/.openclaw/workspace/skills/amazfit-health-log/scripts/fetch-health.py

For a specific date:

python3 ~/.openclaw/workspace/skills/amazfit-health-log/scripts/fetch-health.py 2026-04-06

Step 3: Confirm output

The script prints a summary and writes the note to:

\x3CVAULT_ROOT>/30 Bereiche/Gesundheit/Logs/GTR3/YYYY-MM-DD.md

Output Format (Note)

The generated note contains:

  • Frontmatter: date, weekday, tags, source, created timestamp
  • Summary table: steps, distance, sleep duration, resting HR, SpO2
  • Sleep section: period, duration, stage breakdown table (Deep / REM / Light / Awake)
  • Heart rate section: avg, min, max, resting HR
  • SpO2 section: daily average
  • Navigation links to previous and next day

Sleep Stage Decoding

Code Stage
1 Awake
4 Light
5 Deep
6 REM

Troubleshooting

No data for date:

  • Check that Zepp App → Health Connect sync is enabled
  • Open the HCGateway Android app and trigger a manual sync
  • Data is only available for the last 30 days

Containers unreachable:

sudo docker compose -f /home/docker/hcgateway/docker-compose.yml logs --tail=20

Changing credentials:

  • Edit skills/amazfit-health-log/config.json
  • Password changes invalidate all existing tokens (re-login required)

Cron Configuration (daily at 06:00)

For automatic daily execution:

0 6 * * * python3 /home/openclaw/.openclaw/workspace/skills/amazfit-health-log/scripts/fetch-health.py

Data Sources

Type HCGateway Endpoint Source
Steps /fetch/steps com.huami.watch.hmwatchmanager
Sleep /fetch/sleepSession com.huami.watch.hmwatchmanager
Heart Rate /fetch/heartRate com.huami.watch.hmwatchmanager
Resting HR /fetch/restingHeartRate com.huami.watch.hmwatchmanager
SpO2 /fetch/oxygenSaturation com.huami.watch.hmwatchmanager
Distance /fetch/distance com.huami.watch.hmwatchmanager
安全使用建议
This skill appears to do exactly what it says: authenticate to a HCGateway instance, gather Amazfit metrics, and write a daily Markdown note into your Obsidian vault. Before installing or enabling it, consider the following: - Config/credentials: You must provide base_url, username and password in skills/amazfit-health-log/config.json. Those credentials are stored as plaintext in that file by design — if you are concerned about storing secrets on disk, put the file on an encrypted partition or use a secrets manager and adjust the script. - Verify base_url: Ensure the configured base_url points to a trusted local HCGateway (e.g., http://127.0.0.1:6644). If you change base_url to a remote host, the script will send your HCGateway credentials to that remote host — review that risk carefully. - File writes: The script will create the configured vault/log directory and write daily .md files. Confirm the vault_path/log_dir are correct to avoid overwriting or creating files in an unexpected location. - Privileged actions in docs: The troubleshooting steps suggest running sudo docker compose with an absolute path (/home/docker/hcgateway/docker-compose.yml). That command is related to starting a local HCGateway container but is system-level and user-specific — do not run such commands unless you understand them and the paths match your system. - Paths in docs: The README examples use different home paths (~/ vs /home/openclaw). Update cron and paths to match your environment before enabling automated runs. - Audit and run locally: If you want extra assurance, inspect scripts/fetch-health.py (already included) and run it manually the first time to confirm behavior. Running it in a user account with limited permissions is a good precaution. If you accept these tradeoffs (local HCGateway usage, plaintext local config), the skill is coherent and suitable for the described task.
功能分析
Type: OpenClaw Skill Name: amazfit-health-log Version: 1.0.1 The skill automates fetching Amazfit GTR3 health data from a local HCGateway and writing it to an Obsidian vault. While the Python script (scripts/fetch-health.py) appears to perform its stated task using standard libraries and lacks evidence of intentional malice, the SKILL.md instructions direct the AI agent to perform high-risk actions, including executing 'sudo docker' commands for service management. These risky capabilities, combined with the requirement for broad filesystem and network access to handle credentials and logs, represent a significant attack surface for potential prompt-injection or privilege escalation, placing it in the suspicious category.
能力评估
Purpose & Capability
The name/description (Amazfit → HCGateway → Obsidian note) matches the included files. The script authenticates to a configured base_url and calls /api/v2/fetch/* endpoints, then writes a markdown file into the user's vault. Requested config fields (base_url, username, password, vault_path, log_dir) are exactly what this functionality needs.
Instruction Scope
SKILL.md instructions stay within the stated purpose (verify Docker containers, run the Python script, optionally enable a cron). Two points to notice: (1) the troubleshooting steps advise running 'sudo docker compose -f /home/docker/hcgateway/docker-compose.yml up -d' — a specific absolute path and use of sudo that may not match a user's install and implies privileged system actions; (2) cron and example paths in the docs use different home paths (/home/openclaw vs ~/.openclaw), which are user-specific and may need adjustment. Otherwise the runtime steps only read the skill's config, call the local HCGateway, and write files to the configured vault.
Install Mechanism
No install spec; this is instruction + a single Python script using standard-library modules (urllib, zoneinfo). Nothing is downloaded from external URLs and no archives are extracted, so install risk is low.
Credentials
The skill requests credentials via a config.json (base_url, username, password). That is proportionate to authenticating to HCGateway. Be aware the credentials are intended to be stored in plaintext in skills/.../config.json per the docs; this is expected for a local utility but has confidentiality implications. There are no other unrelated environment variables or secrets requested.
Persistence & Privilege
The skill is not force-installed (always:false) and does not modify other skills or global agent settings. It can be invoked autonomously (disable-model-invocation:false) which is the platform default; that alone is not a red flag given the skill's limited scope and local-only network usage.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install amazfit-health-log
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /amazfit-health-log 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Updated config.example.json (configuration example). - No code or documentation changes in the skill logic or usage. - Version remains at 1.0.0 in documentation.
v1.0.0
amazfit-health-log 1.0.0 (initial release) - Automatically fetches daily health data from an Amazfit GTR3 via HCGateway. - Writes a structured Obsidian note summarizing steps, sleep, heart rate, SpO2, and distance. - Supports triggering by user command or daily cron (default 06:00). - Includes troubleshooting steps and detailed output format. - Requires running HCGateway containers and pre-configured credentials.
元数据
Slug amazfit-health-log
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Amazfit Health Log 是什么?

Fetches Amazfit GTR3 health data from HCGateway and writes a daily Obsidian log note. Use when user says "health log", "GTR3 data", "write health data", "fet... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 77 次。

如何安装 Amazfit Health Log?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install amazfit-health-log」即可一键安装,无需额外配置。

Amazfit Health Log 是免费的吗?

是的,Amazfit Health Log 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Amazfit Health Log 支持哪些平台?

Amazfit Health Log 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Amazfit Health Log?

由 Sanweb(@sanwebgit)开发并维护,当前版本 v1.0.1。

💬 留言讨论