Withings to Garmin Instant Sync

A real-time bridge between Withings scales and Garmin Connect

Being Sassed About My Watts per Kilogram Won’t Wait

This is a Side Quest that would have made no practical sense before GenAI. Now it’s a perfect example of AI-assisted coding solving a friction point in daily life.

The Spark

I’m deep in the Garmin ecosystem for fitness tracking, but have a Withings scale in my bathroom. There are great utilities for doing periodic syncs between Withings and Garmin Connect, but nothing I found works instantaneously.

I might be a little obsessed with my lack of Watts per kilogram on the bike (power-to-weight ratio) and wanted Garmin to have all the data it needs to calculate my (lack of) fitness in advance of a workout, without forcing a manual sync.

Yes, I know about MyFitnessPal. Really I saw a Vibe Coding integration mission. How well could Claude work from available code to access APIs, and cook something home-brewed?

The Journey – Part 1 – Local Version

Withings has webhooks that fire the moment you step off the scale. Garmin has an API. The plan Claude and I concocted was: Build a Flask app to catch the webhook, fetch the data, push it to Garmin.

Except.. Claude kept falling back to an old version of the Garmin libraries, which failed in annoying ways. Claude would occasionally try the same failed approach multiple times in a row. I ended up having to wade in and ask it to take a different approach a few times.

This is where I learned about claude.md files – a way to leave persistent instructions for Claude so it doesn’t keep circling back to the same dead ends. “Don’t try library version X, it breaks dependency Y” etc. (It looks like this is an Anthropic-specific version of Agents.md)

The Journey – Part 2 – Cloud Migration

I then updated this to run as an AWS Lambda, using SNS messages to notify me if there’s an error. In less than an hour, the whole system is now running in the cloud. See GitHub for details.

GitHub Side Note: Karpathy is basically my role model and his observations on the zeitgeist are so overwhelmingly on point. Of all the things I’ve pushed to GH in January, I consider this the closest to “github slop” and I expect going forward I might flip some of these personal projects to private.

Key Learning: Claude.md (or Agents.md)

The biggest learning was about productive collaboration with Claude (and, in theory, coding assistants in general).

Galton’s Goalie was all forward momentum. This was more about actively guiding the AI away from patterns it wants to repeat. The claude.md file became my “lessons learned” document that persisted across conversations. (Note it still made the same mistake of downgrading Garmin libraries during my port to AWS. I have more to learn about effective collab with Claude.)

In future I will ask Claude to memorialize claude.md changes more often, just like I would the readme.md on GitHub.

Try It Yourself

The full code is on GitHub: withings-garmin-webhook-sync

You’ll need:

  • Python 3.12+
  • A Withings account with a smart scale
  • A Garmin Connect account
  • Withings API credentials (free developer account)
  • AWS Account (AWS, AWS CLI, AWS SAM CLI).