← 返回 Skills 市场
zygzzp

iwatch-swim-tracker

作者 zygzzp · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
209
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install iwatch-swim-tracker
功能描述
当用户发送的图片为 Apple Watch 健身的泳池游泳记录,或用户消息包含「游泳」关键词并附带图片时触发。识别游泳训练截图,提取距离、配速、心率等结构化数据,保存训练记录并生成趋势分析报告。适用于游泳训练数据追踪、历史对比和个性化建议。
使用说明 (SKILL.md)

iWatch Swim Tracker

触发判断

满足以下任一条件时触发本技能:

  1. 当收到用户消息包含图片时,图片内容为 Apple Watch 健身 App 的泳池游泳训练记录截图。
  2. 当用户消息中包含「游泳」关键词并附带图片时。

数据提取

从截图中尽可能提取以下字段。能识别多少就提取多少,不确定的字段不要填。

必填字段

  • date: 训练日期 → 格式 YYYY-MM-DD
  • time_range: 训练时段 → 格式 HH:MM-HH:MM
  • pool_length: 泳池长度(米)
  • total_distance: 总距离(米)
  • laps: 趟数
  • strokes: 各泳姿距离 → {"freestyle": {"distance": N}, "breaststroke": {"distance": N}}
    • 自由泳=freestyle、蛙泳=breaststroke、仰泳=backstroke、蝶泳=butterfly、混合泳=medley、浮板=kickboard
  • duration: 体能训练时间 → 格式 H:MM:SS
  • duration_seconds: 时长转换为秒
  • avg_pace: 平均配速 → 格式 M:SS/100m
  • avg_pace_seconds: 平均配速转换为秒/100m
  • avg_heart_rate: 平均心率(次/分)

可选字段

  • active_calories: 动态千卡
  • total_calories: 总千卡数
  • effort_score: 耗能评分(1-10)
  • effort_level: 耗能等级,如「适中」「困难」等
  • session_number: 第 N 次游泳(如用户提供)
  • auto_sets: 自动组合数据

数据校验

  • 泳姿距离之和应等于总距离
  • 趟数 × 泳池长度 ≈ 总距离
  • 日期年份应为当前年份
  • 不确定的值不要猜,宁可不填

处理流程

Step 1:提取数据

从图片中提取上述字段,组装为 JSON 对象。

Step 2:保存数据

python3 {baseDir}/scripts/extract_swim_data.py '\x3Cjson_data>'

同一天的数据会自动覆盖更新。

Step 3:查询历史

python3 {baseDir}/scripts/query_history.py --days 14 --weeks 4 --date \x3CYYYY-MM-DD>

回复格式

🏊 游泳训练记录

📅 \x3Cdate> \x3Ctime_range>
🏊 总距离: \x3Ctotal_distance>m(\x3Claps>趟 × \x3Cpool_length>m池)
⏱️ 时长: \x3Cduration>
⚡ 平均配速: \x3Cavg_pace>
💓 平均心率: \x3Cavg_heart_rate> 次/分
🔥 消耗: \x3Cactive_calories> 动态千卡 / \x3Ctotal_calories> 总千卡

泳姿分布:
- 自由泳: \x3Cfreestyle_distance>m
- 蛙泳: \x3Cbreaststroke_distance>m
- 浮板: \x3Ckickboard_distance>m

📊 AI 分析:
\x3C基于本次数据和历史趋势,给出 2-3 句个性化分析和建议>

📈 近期趋势:
\x3C与最近几次训练的关键指标对比>
安全使用建议
This skill appears to do what it says: split screenshots, extract structured swim metrics, save them locally, and compute trends. Before installing, note two small items: (1) the image-splitting script requires Pillow (the skill mentions how to install it but the dependency isn't declared), so ensure your runtime has Pillow or can create a venv and install it; (2) extracted health data are stored as plain JSON under swim_data/ in the skill directory — if you care about privacy, plan where those files will live and whether you need encryption or cleanup. If you expect the vision extraction to run on a remote service, verify that no unintended personal data will be sent outside your environment; the included scripts themselves do not make network calls.
功能分析
Type: OpenClaw Skill Name: iwatch-swim-tracker Version: 1.0.0 The skill is a legitimate tool for extracting and analyzing Apple Watch swimming workout data from screenshots. It uses Python scripts (extract_swim_data.py, query_history.py, and split_screenshot.py) to process vision-extracted JSON data, store it in a local directory structure, and generate performance trends. No evidence of data exfiltration, malicious command execution, or harmful prompt injection was found.
能力评估
Purpose & Capability
Name/description (Apple Watch swim screenshot → extract/save/analyze) match the included scripts: split_screenshot.py (image segmentation), extract_swim_data.py (validate and save JSON), and query_history.py (trend/weekly analysis). Requested binary (python3) is appropriate for these scripts.
Instruction Scope
SKILL.md instructs using the included Python scripts and to feed JSON from vision extraction; it does not instruct reading unrelated system files or sending data to external endpoints. Note: SKILL.md refers to {baseDir} and to platform-provided vision extraction — those are implementation assumptions. Also, SKILL.md suggests installing Pillow for image splitting but does not declare that as a required dependency.
Install Mechanism
No install spec (instruction-only) and all code is local; there are no remote downloads, package installs, or execution of externally fetched code. The only runtime dependency is Python and optionally Pillow (local install via pip/venv as suggested).
Credentials
The skill requests no environment variables or credentials, which is appropriate. It writes user health data to local swim_data/ files within the skill directory — expected for a local tracker, but users should be aware that sensitive health data is stored on disk in plain JSON without encryption or access controls.
Persistence & Privilege
always:false and normal user-invocable behavior. The skill only creates/reads files under its swim_data directory and does not modify other skills or system-wide agent configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install iwatch-swim-tracker
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /iwatch-swim-tracker 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
iWatch Swim Tracker 1.0.0 – Initial Release - 新增 Apple Watch 泳池游泳训练截图智能识别与结构化数据提取。 - 支持自动保存训练记录,并校验字段完整性与合理性。 - 可按提取数据生成个性化趋势分析和训练建议。 - 实现 14 天/4 周历史记录对比功能。 - 支持多泳姿细分统计,生成标准化回复报告。
元数据
Slug iwatch-swim-tracker
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

iwatch-swim-tracker 是什么?

当用户发送的图片为 Apple Watch 健身的泳池游泳记录,或用户消息包含「游泳」关键词并附带图片时触发。识别游泳训练截图,提取距离、配速、心率等结构化数据,保存训练记录并生成趋势分析报告。适用于游泳训练数据追踪、历史对比和个性化建议。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 209 次。

如何安装 iwatch-swim-tracker?

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

iwatch-swim-tracker 是免费的吗?

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

iwatch-swim-tracker 支持哪些平台?

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

谁开发了 iwatch-swim-tracker?

由 zygzzp(@zygzzp)开发并维护,当前版本 v1.0.0。

💬 留言讨论