Garmin Connect

Connect to Garmin Connect and query personal health/fitness data — steps, sleep, heart rate, HRV, body battery, training readiness…

You say
Buy it · $79 Read it before you buy $79 Written by dsebastien · unverified publisher
Context cost
11.2k tokensestimated from the bundle, loaded when it triggers
Bundle
3 files · 44.9 kB1 script among them — read before you run
Licence
MITpaid listing
Last change
no release on file
Servers it uses
Noneruns standalone

What it does

Connect to Garmin Connect and query personal health/fitness data — steps, sleep, heart rate, HRV, body battery, training readiness, activities (runs, walks, gym, cycling, swimming). Use when the user asks about their Garmin data, watch data, sleep, workouts, runs, rides, HRV, recovery, training status, or any fitness metric. Supports ad-hoc analytical questions like "how many times did I go to the gym this week?", "how did I sleep last night?", "what's my running pace trend?", "how's my HRV trending?".

Installed, it changes the agent in these ways.

What this skill changes about the agent is not written down here yet. The listing was collected from its source, and the description is in its own SKILL.md.

Workflow

Runs a procedure end to end.

fitnessgarminwearableshealth

The skill itself

This is the whole product. A skill is instructions the model reads, so there is nothing behind the listing you cannot see first — the front matter loads with every session, and the body below it loads when the skill triggers.

SKILL.md9.6 kB · 191 lines
--- name: garmin-connect description: Connect to Garmin Connect and query personal health/fitness data — steps, sleep, heart rate, HRV, body battery, training readiness, activities (runs, walks, gym, cycling, swimming). Use when the user asks about their Garmin data, watch data, sleep, workouts, runs, rides, HRV, recovery, training status, or any fitness metric. Supports ad-hoc analytical questions like "how many times did I go to the gym this week?", "how did I sleep last night?", "what's my running pace trend?", "how's my HRV trending?". license: MIT compatibility: Requires Bun runtime, a Garmin Connect account, internet access to connectapi.garmin.com, sso.garmin.com, and thegarth.s3.amazonaws.com. Credentials read from GARMIN_EMAIL and GARMIN_PASSWORD env vars. ---
8# Garmin Connect
9
10Query your Garmin Connect account from the CLI. Zero npm dependencies, single-file Bun script. Auth uses the mobile JSON login API (the flow Garmin actually supports for third-party clients as of March 2026) and caches tokens locally — MFA is re-prompted only when the ~1-year OAuth1 token expires.
11
12## When to use
13
14Use this skill whenever the user asks a question that requires data from their Garmin watch/account. Examples:
15
16- "How did I sleep last night?"
17- "How many gym sessions this week?"
18- "What's my average resting HR this month?"
19- "Show me my last run"
20- "What's my training readiness today?"
21- "Did I hit my step goal yesterday?"
22
23For single metrics, call one subcommand. For analytical questions, pull summary or weekly and reason over the JSON.
24
25## Usage pattern
26
271. **First run**: user sets env vars and invokes login. If MFA is on, two-phase.
282. **Subsequent runs**: any subcommand. Tokens auto-refresh.
293. **Answer the question**: parse the JSON output and respond conversationally.
30
31Always prefer --pretty when piping into your own context — compact JSON is for piping into other tools.
32
33## Environment setup (one-time)
34
35```bash
36export GARMIN_EMAIL="your@email.com"
37export GARMIN_PASSWORD="yourpassword"
38# Optional: persist in ~/.config/garmin-api/env and source from shell rc.
39```
40
41First login with MFA:
42
43```bash
44# Phase 1 — triggers the email/app MFA prompt and exits with code 2.
45bun run scripts/garmin.ts login
46# → "[auth] MFA required (email) — code sent."
47
48# Phase 2 — supply the code (≤10 minutes after phase 1).
49GARMIN_MFA=123456 bun run scripts/garmin.ts login
50# → "[auth] authenticated as <displayName> — tokens cached."
51```
52
53Without MFA: bun run scripts/garmin.ts login completes in one call.
54
55## Subcommands
56
57```bash
58# Identity
59bun run scripts/garmin.ts whoami --pretty
60
61# Single-date queries (default: today)
62bun run scripts/garmin.ts daily 2026-04-14 --pretty
63bun run scripts/garmin.ts sleep 2026-04-14 --pretty
64bun run scripts/garmin.ts hrv 2026-04-14 --pretty
65bun run scripts/garmin.ts readiness 2026-04-14 --pretty
66bun run scripts/garmin.ts training 2026-04-14 --pretty
67
68# Bundle for one day (daily + sleep + hrv + readiness + training + activities)
69bun run scripts/garmin.ts summary 2026-04-14 --pretty
70
71# Activity list (date range, inclusive)
72bun run scripts/garmin.ts activities --from 2026-04-08 --to 2026-04-14 --pretty
73bun run scripts/garmin.ts activities --from 2026-04-08 --to 2026-04-14 --limit 100
74
75# 7-day window ending on <date> (default today)
76bun run scripts/garmin.ts weekly 2026-04-14 --pretty
77```
78
79All commands print JSON to stdout. Errors (including MFA prompts) go to stderr.
80
81## Analytical patterns
82
83When the user asks an analytical question, pick the smallest query that contains the answer, then reason over the JSON.
84
85| User question | Command | What to extract |
86|---|---|---|
87| "How did I sleep last night?" | sleep <yesterday> | dailySleepDTO.sleepScores, stage durations, total sleep time |
88| "Steps today?" | daily <today> | totalSteps, dailyStepGoal |
89| "Gym this week?" | activities --from <mon> --to <sun> | count entries where activityType.typeKey matches strength_training\|fitness_equipment\|indoor_cardio |
90| "Runs this month?" | activities --from <month-start> --to <today> | filter typeKey starts with running |
91| "Resting HR trend?" | weekly <today> | per-day daily.restingHeartRate |
92| "HRV status?" | hrv <today> | hrvSummary.status, weeklyAvg, lastNightAvg |
93| "Recovery?" | readiness <today> + training <today> | readiness score + training status |
94| "Last workout?" | activities --from <7-days-ago> --to <today> --limit 1 | most recent entry |
95
96For "this week" / "this month": compute the date range yourself before calling. Garmin's API is always date-explicit.
97
98## Activity type keys (partial)
99
100Common activityType.typeKey values to filter on:
101
102- running, treadmill_running, trail_running, track_running, indoor_running
103- walking, hiking, casual_walking
104- cycling, road_biking, mountain_biking, indoor_cycling, virtual_ride
105- strength_training, fitness_equipment, indoor_cardio
106- swimming, lap_swimming, open_water_swimming
107- yoga, pilates, stretching
108- other
109
110## Failure modes
111
112| Symptom | Cause | Fix |
113|---|---|---|
114| MFA_REQUIRED exit code 2 | Phase 1 of login succeeded | Re-run with GARMIN_MFA=<code> within 10 min |
115| 401 Unauthorized on preauthorized | OAuth1 consumer secret rotated (auto-recovers) | On next run the script refetches from OAUTH_CONSUMER_URL and retries once. If it still fails, see *Self-repair* below. |
116| 404 Not Found on login | Endpoint moved | See *Self-repair* below. |
117| 429 or 403 on login | Cloudflare rate limit or UA block | Wait 10+ minutes |
118| No valid cached tokens | First run or cache cleared | Run login subcommand |
119
120## Self-repair (for Claude)
121
122This skill is designed to be patched in place when Garmin changes its auth or API surface. The compatibility surface is ~6 GET endpoints + the auth flow, and all of them live in scripts/garmin.ts. When something breaks, follow this escalation:
123
124### Step 1 — Check if consumer creds rotated
125
126Symptom: 401 Unauthorized on /oauth-service/oauth/preauthorized with "Invalid signature for signature method HMAC-SHA1".
127
128The script already auto-refreshes from https://thegarth.s3.amazonaws.com/oauth_consumer.json (24h cache, retry-on-401). If that URL itself stops working:
129
1301. Check the [garth repo](https://github.com/matin/garth) for the current canonical source of the consumer pair. Look at garth/client.py or the sso.py constants.
1312. If thegarth.s3.amazonaws.com is dead, find the new host in garth's OAUTH_CONSUMER_URL. Update the OAUTH_CONSUMER_URL constant in scripts/garmin.ts.
1323. As a last resort, inspect the current Garmin Connect mobile app traffic (mitmproxy + a rooted Android emulator) and read the pair off the first OAuth1-signed request.
133
134### Step 2 — Check if the login endpoint moved
135
136Symptom: 404 Not Found on /sso/mobile/api/login or /sso/mobile/api/mfa/verifyCode.
137
1381. Install the latest garth: uvx --with garth python3 -c "import garth.sso as s, inspect; print(inspect.getsource(s.login))"
1392. Compare the URL constants, method, body shape, and clientId / service query params against loginInit() / loginComplete() in scripts/garmin.ts.
1403. Port any deltas. Things to watch: SSO_CLIENT_ID, SSO_SERVICE_URL, the JSON body field names (rememberMe, captchaToken, mfaVerificationCode, etc.), and the responseStatus.type values (SUCCESSFUL, MFA_REQUIRED).
141
142### Step 3 — Check if the User-Agent fingerprint is being blocked
143
144Symptom: 403 immediately, even from a fresh IP.
145
1461. Garmin cycles accepted mobile UAs. Current values:
147 - SSO endpoints expect an iPhone Safari UA (SSO_MOBILE_UA constant).
148 - Connectapi endpoints expect GCM-iOS-5.22.1.4 (CONNECTAPI_UA constant).
1492. Check garth's http.py for the current USER_AGENT dict. Update the constants in scripts/garmin.ts to match.
150
151### Step 4 — Check if an API endpoint path or response shape changed
152
153Symptom: 404 on one of the data endpoints (e.g. /usersummary-service/usersummary/daily/...), or JSON.parse failure.
154
1551. Log into Garmin Connect in a browser, open DevTools → Network tab.
1562. Find the equivalent request (the web app also hits connectapi.garmin.com via a CSRF-protected proxy; the path is the part after /gc-api/).
1573. Update the path in the corresponding method on the Api object in scripts/garmin.ts.
1584. Update references/endpoints.md with the new path.
159
160### Step 5 — Verify with a fresh login
161
162After any change:
163
164```bash
165rm -f ~/.config/garmin-api/tokens.json ~/.config/garmin-api/consumer.json
166bun run scripts/garmin.ts login
167# Phase 2 if MFA: GARMIN_MFA=xxxxxx bun run scripts/garmin.ts login
168bun run scripts/garmin.ts whoami --pretty
169bun run scripts/garmin.ts summary $(date +%F) --pretty | head -40
170```
171
172If all three succeed, the skill is healthy again.
173
174### What NOT to do
175
176- Don't add new npm dependencies — the whole point is a zero-dep single file.
177- Don't try to impersonate the web app's connect-csrf-token session flow — it's more brittle than the mobile SSO flow and couples you to cookies.
178- Don't hardcode a user-specific value (displayName, ticket, token). They go in ~/.config/garmin-api/tokens.json.
179
180## Files
181
182- scripts/garmin.ts — the CLI (single file, zero deps beyond Bun)
183- references/endpoints.md — Garmin endpoints this skill calls
184- README.md — human-facing intro and setup
185
186## Not in scope
187
188- Writing data back to Garmin (activity uploads, settings, etc.)
189- Syncing to external systems — that's a downstream concern
190- Non-Garmin data sources (Apple Watch, Whoop, Oura, etc.)
191
In the file
SKILL.md1,367 words
Files3
LicenceMIT
Why you can read it

Nothing in a skill executes. The client loads the text and the model follows it, so a skill can be audited the way a runbook is — by reading it.

What it costs in context

Skills are not billed by the call. They are paid for in context: every token the instructions occupy is a token your code, your diff and your conversation cannot use. Here is what this one takes and when it takes it.

≈190
always loaded
The name and description, so the model knows the skill exists and when to reach for it.
11,035
on trigger
The instruction body and 2 supporting files, read only when the skill fires.
5.6%
of a 200k window
Ten skills this size would take about 56% of the window before you open a file.
050k100k150k200k context window

11.2k tokens, estimated from the bundle at four bytes to the token, held for the rest of the session once it triggers. Heavy. Teams tend to install this one per project rather than globally, and load it only when the job comes up.

Servers bill, skills cost

A server charges by the month. A skill charges once per session, in context, and then keeps charging it for as long as the session lives.

Before and after

The same question, put to the same model twice: once as it comes, and once with these instructions loaded.

No worked example has been published for this skill yet.

Adoption
Installsnone yet
Ratingno reviews yet

The procedure it runs

The procedure has not been published here. It is in the skill’s own SKILL.md, which its author has not sent to the marketplace yet.

Prose, not code

These steps are written for a model to follow, not executed by a runtime. It can still be told to skip one, and it will say so when it does.

Servers it uses

None. This skill calls no MCP servers at all.

Everything it needs is in the instructions, so it works in a project with nothing connected — the model reads the file and changes how it works with what it can already reach.

It writes no files and reaches no network. All it changes is how the model reasons and writes.

What it asks for
Writes filesno
Network accessno

Read from the allowed-tools line of this skill’s own SKILL.md. A skill grants no permissions of its own — it can only ask for tools your client already has.

What it will not do

Every skill is narrow, and the useful ones say where they stop. These are the jobs this one is the wrong tool for.

What this skill is not for has not been published here. Nothing is implied by that: it is a section the author has not filled in.

What is in the bundle

3 files, 44.9 kB on disk. Mostly text — the instructions the model reads — with 1 script in it that your client would run only if the instructions tell it to.

  • SKILL.md9.6 kB
  • references/endpoints.md5.3 kB
  • scripts/garmin.ts30.0 kB
What is not in it

A skill installs nothing and depends on nothing: it is a folder your client reads. This one carries 1 script beside the text, so the bundle is 3 files you can review in full before installing. The MIT licence covers the templates and examples as well as the instructions.

Install

Installing copies the bundle into your project. Nothing runs at install time — the files sit on disk until the model reads them.

$79 once
Garmin Connect · MIT · dsebastien
one-time
Price$79 once
LicenceMIT — the author’s, unchanged by this purchase
Paid throughStripe, once, on the card you add at the checkout
Keeps workingfor good — the files are yours once they are on disk
Updatesevery update its author ships, delivered through this account

You can read the whole bundle before paying — the SKILL.md above is the product, not a preview of it. What the money buys is the delivery: the folder packaged and handed to your machine by key, every update its author ships, and our support if it does not do what this listing says. The terms of use are MIT, set by the author and unchanged by buying it here.

Payment runs through Stripe, on a page like this one rather than a redirect. Once there is an account it joins the same mcprush invoice as everything else you run, so there is never a second card to enter.

Which clients pick it up on their own

A skill is a folder of text. A client with a skills folder reads it without being told; everywhere else the same text works, it is just handed to the model rather than found.

Claude Code.claude/skills/
Claude Desktop
ChatGPT
Cursor.cursor/skills/
VS Code.github/skills/
Codex CLI.agents/skills/
Gemini CLI.gemini/skills/
Grok.grok/skills/
Zed.agents/skills/
Windsurf.windsurf/skills/
Agent SDK.claude/skills/
HTTP / API
This release
Versionnot versioned
Publishedno release date on file
Price$79
Referencedsebastien/garmin-connect

Versions

Its author publishes no version number, so there is nothing here to pin to: what you install is the folder as it stands today. Instructions change more often than APIs do — a skill can be rewritten entirely without anything it depends on moving.

v
  • No earlier releases have been published to the marketplace.
Pinning

Nothing to pin to: this skill carries no version number of its own. What you install is what the folder holds on the day you install it.

Reviews

no reviews yet · no installs yet

Nobody has reviewed this skill yet. The rating is the mean of the reviews written here, so there is none until somebody writes the first.

Who can post

Only accounts that have had the skill installed for fourteen days, so a review is written after living with it rather than after reading it. Publishers may reply once.

Who wrote it

DS
dsebastien

Publishes on mcprush.

0 servers listed1 skill listednot claimed
Profile
Publisher
Servers0