← 返回 Skills 市场
iamtonyzhou

Garmin Sync Cn To Global

作者 IamTonyZHOU · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ 安全检测通过
215
总下载
0
收藏
0
当前安装
6
版本数
在 OpenClaw 中安装
/install garmin-sync-cn-to-global
功能描述
Sync activities from Garmin China to Garmin Global using local timestamps and distance to avoid duplicates in a one-way sync process.
使用说明 (SKILL.md)

garmin-sync-cn-to-global

Sync activities from Garmin China (garmin.cn) to Garmin Global/International (garmin.com).

Usage

# Install dependencies
pip install garth

# Set credentials (once, stored in ~/.config/garmin-sync/credentials.json)
garmin-sync set-credentials --email your_email --password your_password

# Sync new activities from CN to Global
garmin-sync sync --new-only

Options

  • --new-only - Only sync records newer than last sync time (recommended for cron jobs)

Behavior

  • Silent when no new activities: If there are no activities to sync (and no failed retries), the script exits silently with no output. This is useful for cron jobs where you only want to be notified when there's actual work to do.
  • English output: All output is in English for consistency.

Requirements

  • Python 3.x
  • garth library (pip install garth)

Notes

  • One-way sync: CN → Global (not bidirectional)
  • Uses startTimeLocal + distance to detect duplicates (activity IDs differ between servers)
  • Skips conflicts automatically
  • Same email/password works for both Garmin CN and Garmin Global accounts

Security Considerations

  • Credentials are stored in plaintext at ~/.config/garmin-sync/credentials.json
  • Set restrictive file permissions after first run: chmod 600 ~/.config/garmin-sync/credentials.json
  • Consider using a dedicated/sandbox account for testing
  • Review the code before running with your primary credentials
安全使用建议
This skill appears to do exactly what it says: log into Garmin CN and Garmin Global, download .fit files from CN and upload them to Global, tracking state and failed records. Before installing/running: 1) Review the code yourself (or run it in a sandbox/VM) because it requires your Garmin email/password and stores them on disk. 2) Prefer using a dedicated/test Garmin account rather than your primary account. 3) If you use set-credentials, the script saves credentials in plaintext at ~/.config/garmin-sync/credentials.json but save_credentials sets mode 600; still treat the file as sensitive. 4) The SKILL.md shows a 'garmin-sync' CLI but the bundle only contains sync.py — you may need to run it directly (python sync.py ...) or create an entrypoint wrapper. 5) Verify the 'garth' package you install is the correct/official package; inspect its code or pin a known-good version. If you need help verifying the package or running the tool in an isolated environment, consider doing that before supplying real credentials.
功能分析
Type: OpenClaw Skill Name: garmin-sync-cn-to-global Version: 1.1.0 The skill is a legitimate utility for syncing Garmin activity data between Chinese and Global accounts using the 'garth' library. It handles credentials by storing them locally in ~/.config/garmin-sync/credentials.json and correctly applies restricted file permissions (chmod 600) to mitigate risk; no evidence of data exfiltration, malicious execution, or prompt injection was found in sync.py or SKILL.md.
能力评估
Purpose & Capability
The name/description (sync CN → Global) aligns with the code and runtime instructions: the script logs into garmin.cn and garmin.com, downloads activity archives from CN and uploads to Global using timestamps+distance to detect duplicates. Minor mismatch: SKILL.md shows a 'garmin-sync' CLI (garmin-sync sync / set-credentials) but the bundle only includes sync.py and no install/entrypoint; that means the documented command may not exist until the user installs/wraps the script.
Instruction Scope
SKILL.md instructions are scoped to installing the 'garth' dependency, storing credentials, and running the sync. The script reads/writes only under ~/.config/garmin-sync and /tmp and calls Garmin APIs; it does not access unrelated system paths. Security-relevant behavior is explicit: credentials are stored in plaintext and the README notes this and recommends chmod 600 and using a sandbox account.
Install Mechanism
There is no install spec in the bundle (instruction-only), so nothing is written to disk by an installer. The code file is included but not packaged as a CLI; the SKILL.md assumes a 'garmin-sync' command while the repo only provides sync.py. Dependency installation is limited to 'pip install garth' (a public PyPI package) — no downloads from unknown URLs or archive extraction are present.
Credentials
The skill requests no environment variables or unrelated credentials. It requires your Garmin email/password(s), which is proportionate to logging into Garmin accounts to perform the sync. The main concern is storing those passwords in plaintext under ~/.config/garmin-sync/credentials.json (the code sets file mode 600 when saving via save_credentials).
Persistence & Privilege
The skill does not request 'always' privilege and will not run autonomously by default. It writes its own state and failed-record files under ~/.config/garmin-sync and temporary zips to /tmp (deleted after use), which is appropriate for its purpose and within expected scope.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install garmin-sync-cn-to-global
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /garmin-sync-cn-to-global 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
- Adds a new --new-only option to sync only records newer than the last sync time (recommended for cron jobs). - Script now exits silently if there are no new activities to sync and no failed retries. - All output is now consistently in English. - Documentation updated with new options and behavior details.
v1.0.4
支持为CN和Global账号设置不同的用户名密码
v1.0.3
优化:没有新数据时静默退出,不输出通知
v1.0.2
新增失败重试和只同步新数据功能
v1.0.1
- Added a new "Security Considerations" section to documentation, including credential storage details and recommended file permissions. - Clarified usage instructions for installing dependencies and where credentials are stored. - Improved and reorganized notes for better clarity on sync direction and duplicate detection.
v1.0.0
Initial release of garmin-sync-cn-to-global. - Syncs activities from Garmin China (garmin.cn) to Garmin Global (garmin.com). - Stores credentials securely for future use. - Detects duplicates using start time and distance, not activity ID. - Automatically skips conflicting activities. - Requires Python 3.x and the garth library. - One-way sync only: China to Global.
元数据
Slug garmin-sync-cn-to-global
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 6
常见问题

Garmin Sync Cn To Global 是什么?

Sync activities from Garmin China to Garmin Global using local timestamps and distance to avoid duplicates in a one-way sync process. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 215 次。

如何安装 Garmin Sync Cn To Global?

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

Garmin Sync Cn To Global 是免费的吗?

是的,Garmin Sync Cn To Global 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Garmin Sync Cn To Global 支持哪些平台?

Garmin Sync Cn To Global 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Garmin Sync Cn To Global?

由 IamTonyZHOU(@iamtonyzhou)开发并维护,当前版本 v1.1.0。

💬 留言讨论