← Back to Directory
⚖️

Body Composition Tracker

Track smart scale data, analyze body composition trends, and get alerts when you hit goals

🤖 00 ↓  |  👤 00
beginner25 minutes🔄 8 swappable alternatives

🧂 Ingredients

🔌 APIs

smart_scale_data_weight_body_fat_muscle_mass_water_percentage

🔄 Alternatives:

Fitbit Broader activity trackingGarmin Advanced health metricsApple Health iOS ecosystem

store_historical_measurements_for_trend_analysis

🔄 Alternatives:

Airtable Better for structured data + APINotion Databases More flexible views

goal_alerts_and_milestone_notifications

🔄 Alternatives:

Ntfy Free, open-source push notificationsTelegram Free push via TelegramSlack Team notification channel

📋 Step-by-Step Build Guide

STEP 1

Authenticate with Withings API and pull body measurements via GET /measure

1. Authenticate with Withings API and pull body measurements via GET /measure

Authenticate with Withings API and pull body measurements via GET /measure

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 2

Store each weigh

2. Store each weigh-in with date, weight, body fat %, muscle mass, and water %

Store each weigh-in with date, weight, body fat %, muscle mass, and water %

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 3

Calculate 7

3. Calculate 7-day rolling average to smooth out daily fluctuations (water retention, meal timing)

Process the data and calculate the requested metrics.

Steps:
1. Validate input data — check for nulls, out-of-range values, duplicates
2. Apply the calculation/aggregation logic
3. Compare against benchmarks or previous periods if available
4. Format results with appropriate precision (2 decimal places for percentages, whole numbers for counts)

Include: current value, previous value, change (absolute and %), trend direction (↑↓→).
Flag any anomalies: values >2 standard deviations from the mean.

If insufficient data for a reliable calculation, state the minimum needed and return partial results.
STEP 4

Set goals

4. Set goals: target weight, target body fat %, target muscle mass

Set goals: target weight, target body fat %, target muscle mass

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 5

Daily at 10am

5. Daily at 10am: if a new measurement exists, log it and compare rolling average to previous week

Use the GitHub API to fetch the relevant data.

GET https://api.github.com/repos/{owner}/{repo}/{endpoint}
Headers: Authorization: Bearer {GITHUB_TOKEN}, Accept: application/vnd.github.v3+json

Parse the response and extract the key fields.
Handle pagination if results exceed one page (check Link header).
Rate limit: GitHub allows 5,000 requests/hour with auth. If you get 403, check X-RateLimit-Remaining header.

Format the output concisely with the most important information first.
STEP 6

Generate a weekly trend report

6. Generate a weekly trend report: weight change, body fat change, muscle mass change over the past 4 weeks

Compile the gathered data into a structured report.

Format as clean Markdown with:
- Title/date header
- Executive summary (2-3 sentences)
- Key metrics section with actual numbers
- Detailed sections with bullet points
- Action items or recommendations at the end

Keep it scannable — busy people read reports in 30 seconds.
Use emoji sparingly for visual anchors (📊 metrics, ✅ wins, ⚠️ concerns, 📋 action items).
Include data comparisons: "X this period vs Y last period (↑Z%)"

If any data source was unavailable, note it clearly: "⚠️ [Source] data unavailable — excluded from this report."
STEP 7

Alert when you hit a milestone (e.g., broke below 180 lbs rolling average, body

7. Alert when you hit a milestone (e.g., broke below 180 lbs rolling average, body fat under 15%)

Alert when you hit a milestone (e.g., broke below 180 lbs rolling average, body fat under 15%)

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.
STEP 8

Alert if trending wrong direction for 2+ consecutive weeks (early course correct

8. Alert if trending wrong direction for 2+ consecutive weeks (early course correction)

Monitor the data for anomalies and trigger alerts when thresholds are exceeded.

Detection rules:
1. Compare current values against defined thresholds
2. Check for sudden changes (>X% deviation from rolling average)
3. Look for pattern breaks (missing expected data, unusual timing)
4. Cross-reference multiple signals for higher confidence

For each detected anomaly:
- Severity: 🔴 Critical (immediate action) / 🟡 Warning (attention needed) / 🔵 Info (notable)
- What: specific metric and current value
- Why: what threshold or pattern was violated
- Context: recent trend, baseline comparison
- Suggested action: what to do about it

Suppress duplicate alerts — don't re-alert for the same issue within the configured cooldown period.

🤖 Example Agent Prompt

Authenticate with Withings API and pull body measurements via GET /measure

Steps:
1. Validate all required inputs are available
2. Execute the operation described above
3. Verify the result meets expected output format
4. Handle errors gracefully — retry transient failures, log and alert on persistent ones
5. Return structured output with status and any relevant data

If any required data is missing, request it from the user before proceeding.

Copy this prompt into your agent to get started.