Body composition analyzer

From vitaclaw/vitaclaw · View interactive version

Body composition analyzer is an AI agent skill from the GitHub repository vitaclaw/vitaclaw. Analyzes body composition metrics including body fat percentage, muscle mass, visceral fat, and BMI. Tracks trends over time and provides training and nutrition recommendations based on body composition goals. Use when the user logs body measurements, DEXA/BIA results, or asks about body composition

How to use this skill

Skill file

Body Composition Analyzer

Analyzes body composition metrics, classifies results, tracks trends over time, and provides evidence-based training and nutrition recommendations based on body composition goals.

Capabilities

1. Measurement Recording

Record and store body composition measurements with the following fields:

| Field | Type | Description |

|-------|------|-------------|

| date | ISO date | Date of measurement (YYYY-MM-DD) |

| weight_kg | float | Body weight in kilograms |

| body_fat_pct | float | Body fat percentage |

| muscle_mass_kg | float | Skeletal muscle mass in kilograms |

| visceral_fat_level | int | Visceral fat level (1-59 scale, varies by device) |

| bone_mass_kg | float | Estimated bone mineral content in kilograms |

| water_pct | float | Total body water percentage |

| BMI | float | Body Mass Index (auto-calculated if height is known) |

| waist_circumference_cm | float | Waist circumference in centimeters |

| hip_circumference_cm | float | Hip circumference in centimeters |

| measurement_method | enum | One of: scale, DEXA, BIA, caliper, tape |

| notes | string | Free-text notes (e.g., fasted, post-workout, dehydrated) |

When the user provides a measurement:

  1. Parse the values from user input (accept metric or imperial, convert internally to metric).
  2. Validate ranges (e.g., body fat 2-60%, weight 20-300 kg, visceral fat 1-59).
  3. Flag any values that seem out of range and confirm with the user before saving.
  4. Store the entry in the daily file and append to the longitudinal tracker.

2. Body Fat Classification

Classify the user's body fat percentage using the American Council on Exercise (ACE) categories:

| Category | Men | Women |

|----------|-----|-------|

| Essential fat | 2-5% | 10-13% |

| Athletic | 6-13% | 14-20% |

| Fitness | 14-17% | 21-24% |

| Average | 18-24% | 25-31% |

| Obese | >25% | >32% |

When reporting body fat classification:

3. BMI Calculation & Context

Calculate BMI using the standard formula:

BMI = weight(kg) / height(m)^2

Classify results using the WHO categories:

| Category | BMI Range |

|----------|-----------|

| Underweight | <18.5 |

| Normal weight | 18.5-24.9 |

| Overweight | 25-29.9 |

| Obese Class I | 30-34.9 |

| Obese Class II | 35-39.9 |

| Obese Class III | >=40 |

Important BMI limitations to always communicate:

4. Waist-to-Hip Ratio (WHR)

Calculate WHR:

WHR = waist_circumference_cm / hip_circumference_cm

Classify cardiovascular and metabolic risk:

| Risk Level | Men | Women |

|------------|-----|-------|

| Low | <0.90 | <0.80 |

| Moderate | 0.90-0.99 | 0.80-0.85 |

| High | >=1.0 | >0.85 |

Additional context:

5. Body Fat Estimation Methods

Navy Method

Estimate body fat from circumference measurements using the U.S. Navy formula:

Men:

%BF = 86.010 * log10(waist_cm - neck_cm) - 70.041 * log10(height_cm) + 36.76

Women:

%BF = 163.205 * log10(waist_cm + hip_cm - neck_cm) - 97.684 * log10(height_cm) - 78.387

Required measurements: waist, neck, height (and hip for women). Accuracy: +/- 3-4%.

DEXA Scan Interpretation Guide
BIA Scale Accuracy Notes
Skinfold Caliper Methods

3-Site Method (Jackson-Pollock):

7-Site Method (Jackson-Pollock):

6. Trend Analysis

When analyzing body composition trends over time:

Weight Change Rate
Body Fat Trajectory
Lean Mass Preservation During Cuts
Recomposition Tracking
Seasonal Patterns

7. Goal-Based Recommendations

Provide tailored recommendations based on the user's stated goal:

| Goal | Caloric Target | Protein | Training Focus |

|------|---------------|---------|----------------|

| Fat loss | -300 to -500 kcal deficit | 1.6-2.2 g/kg body weight | Resistance training + moderate cardio |

| Muscle gain | +200 to +400 kcal surplus | 1.6-2.2 g/kg body weight | Progressive overload, compound lifts |

| Recomposition | ~maintenance calories | 2.0-2.4 g/kg body weight | Resistance training priority |

| Maintenance | TDEE | 1.2-1.6 g/kg body weight | Mixed training modalities |

Additional guidance per goal:

8. Body Composition Score (0-100)

Calculate a composite body composition health score using the following weighted components:

| Component | Weight | Description |

|-----------|--------|-------------|

| Body Fat Range | 30% | How close body fat % is to optimal range for age and sex |

| Muscle Mass | 25% | Skeletal muscle mass relative to height and sex norms |

| Visceral Fat | 20% | Visceral fat level (lower is better; <10 is healthy) |

| WHR | 15% | Waist-to-hip ratio relative to low-risk thresholds |

| Trend Direction | 10% | Whether metrics are moving toward or away from goals |

Scoring methodology:

The final score is the weighted sum. Present alongside a brief interpretation:

9. Measurement Consistency Guide

To ensure reliable and comparable measurements over time, advise the user to follow these standardization practices:

Timing
Conditions
Frequency

Output Format

Measurement Entry Response

When a user logs a new measurement, respond with:

## Body Composition Entry - [DATE]

**Measurements:**
- Weight: [X] kg ([change from last] kg)
- Body Fat: [X]% ([classification]) ([change from last]%)
- Muscle Mass: [X] kg ([change from last] kg)
- Visceral Fat: Level [X] ([risk level])
- BMI: [X] ([classification])
- WHR: [X] ([risk level])

**Composition Score:** [X]/100 ([interpretation])

**Trend (last [N] entries):**
- Weight: [direction] ([rate]/week)
- Body Fat: [direction] ([rate]/month)
- Lean Mass: [preserved/declining]

**Notes:** [any flags, alerts, or observations]

Progress Report

When the user requests a progress report, provide:

## Body Composition Progress Report
**Period:** [start date] to [end date]

### Summary
- Starting weight: [X] kg -> Current: [X] kg (net: [+/-X] kg)
- Starting body fat: [X]% -> Current: [X]% (net: [+/-X]%)
- Starting muscle mass: [X] kg -> Current: [X] kg (net: [+/-X] kg)
- Composition Score: [start] -> [current]

### Analysis
[Narrative analysis of trends, rate of change, lean mass preservation, etc.]

### Recommendations
[Goal-specific recommendations based on current trajectory]

Goal Tracking

When tracking toward a specific goal:

## Goal Progress: [Goal Name]
**Target:** [specific target, e.g., 15% body fat]
**Current:** [current value]
**Gap:** [difference]
**Estimated time to goal:** [weeks/months at current rate]
**On track:** [Yes/No/Needs adjustment]

Data Persistence

Daily File

Store each measurement entry in the user's daily file at the standard daily file path, under a ## Body Composition section.

Longitudinal Tracker

Maintain a persistent body composition tracking file at items/body-composition.md with the following structure:

# Body Composition Tracker

## Profile
- Height: [X] cm
- Sex: [M/F]
- Age: [X]
- Activity level: [sedentary/lightly active/moderately active/very active/extremely active]

## Current Goals
- Primary: [goal]
- Target body fat: [X]%
- Target weight: [X] kg

## Measurement History

| Date | Weight (kg) | BF% | Muscle (kg) | Visceral | BMI | WHR | Method | Score | Notes |
|------|-------------|-----|-------------|----------|-----|-----|--------|-------|-------|
| [date] | [val] | [val] | [val] | [val] | [val] | [val] | [method] | [score] | [notes] |

## Milestones
- [date]: [milestone achieved, e.g., "Reached 'Fitness' body fat range"]

When writing to this file:

  1. Read the existing file first to preserve previous entries.
  2. Append new measurement rows to the history table.
  3. Update the "Current Goals" section if the user changes goals.
  4. Add milestones when the user crosses a classification boundary or reaches a target.

Alerts and Safety

Body Dysmorphia Awareness

Extremely Low Body Fat Warning

Rapid Weight Loss Alert

Muscle Loss During Deficit

Medical Disclaimer

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.