agentsclimarketplace

Nutrition analyzer

Skill rbr7/MedClawMini/skills/nutrition-analyzer

Analyze nutrition data, identify dietary patterns, assess nutritional status, and provide personalized nutrition advice. Supports correlation analysis with exercise, sleep, and chronic-disease data.From its SKILL.md

Install
npx -y skills add rbr7/MedClawMini --skill nutrition-analyzer

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

20.9 KB, ~6.2k tokens by cl100k_base, as published. Nobody here has run it

Nutrition Analyzer Skill

Analyze diet and nutrition data, identify nutritional patterns, assess nutritional status, and provide personalized improvement advice.

Functions

1. Nutrition-trend analysis

Analyze trends in nutrient intake; identify what is improving or needs attention.

Analysis dimensions:

  • Macronutrient trends (protein, carbs, fat, fiber, calories)
  • Micronutrient trends (vitamins, minerals)
  • Calorie-source distribution change
  • Meal patterns (timing, frequency)
  • Food-category preferences

Output:

  • Trend direction (improving/stable/declining)
  • Magnitude and percentage of change
  • Trend significance
  • Improvement suggestions

2. Nutrient-intake assessment

Assess whether nutrient intake meets recommended standards (RDA/AI).

Assessment content:

  • Macronutrient assessment:

    • Protein amount and quality
    • Carbohydrate-type distribution (refined vs. complex)
    • Fat-type distribution (saturated/monounsaturated/polyunsaturated/trans)
    • Dietary-fiber intake
  • Vitamin assessment:

    • Vitamins A, C, D, E, K
    • B vitamins (B1, B2, B3, B6, B12, folate, pantothenic acid, biotin)
    • Comparison with RDA
    • Deficiency-risk assessment
  • Mineral assessment:

    • Macrominerals: calcium, phosphorus, magnesium, sodium, potassium, chloride, sulfur
    • Trace minerals: iron, zinc, copper, manganese, iodine, selenium, chromium, molybdenum
    • Comparison with RDA
    • Deficiency-risk assessment
  • Special-nutrient assessment:

    • Omega-3 fatty acids (EPA, DHA, ALA)
    • Choline
    • Coenzyme Q10
    • Phytochemicals (flavonoids, carotenoids, etc.)

Output:

  • Attainment rate for each nutrient
  • Grading: deficient/insufficient/adequate/excess
  • Deficiency-risk identification
  • Priority improvement suggestions

3. Nutritional-status assessment

Comprehensively assess the user's nutritional status.

Assessment content:

  • Overall nutritional-quality score:

    • Nutrient-density score
    • Food-variety score
    • Balanced-diet score
  • Nutritional-pattern recognition:

    • Dietary-pattern type (Mediterranean, DASH, vegetarian, etc.)
    • Eating-time pattern (frequency, eating window)
    • Snacking pattern
  • Nutritional-risk identification:

    • Deficiency risk (e.g., vitamin D, iron)
    • Excess risk (e.g., vitamin A, sodium)
    • Unhealthy habits (high sugar, high fat, high sodium)

Output:

  • Nutritional-status grade (excellent/good/fair/poor)
  • Main nutritional problems
  • Risk-factor list
  • Improvement priorities

4. Correlation analysis

Analyze the correlation between nutrition and other health metrics.

Supported correlations:

  • Nutrition ↔ weight:

    • Calorie intake vs. weight change
    • Macronutrient ratio vs. weight management
    • Eating time vs. metabolism
  • Nutrition ↔ exercise:

    • Effect of intake on exercise performance
    • Exercise-day vs. rest-day nutritional needs
    • Protein intake vs. muscle recovery
  • Nutrition ↔ sleep:

    • Caffeine intake vs. sleep quality
    • Dinner time vs. sleep-onset time
    • Specific nutrients (e.g., magnesium, tryptophan) vs. sleep
  • Nutrition ↔ blood pressure:

    • Sodium intake vs. blood pressure
    • Potassium/sodium ratio vs. blood pressure
    • DASH-diet adherence vs. blood-pressure control
  • Nutrition ↔ blood glucose:

    • Carbohydrate type vs. glucose swings
    • Dietary fiber vs. glucose control
    • Eating time vs. glucose curve

Output:

  • Correlation coefficient (-1 to 1)
  • Correlation strength (weak/medium/strong)
  • Statistical significance
  • Causal-relationship inference
  • Practical suggestions

5. Personalized recommendations

Generate personalized improvement advice from the user's data.

Recommendation types:

  • Nutrient adjustment:

    • Increase deficient nutrients
    • Reduce excess nutrients
    • Optimize nutrient ratios
  • Food choices:

    • Recommend specific food categories
    • Food-swap suggestions (healthier options)
    • Food-pairing suggestions (to aid absorption)
  • Eating habits:

    • Adjust eating times
    • Adjust meal frequency
    • Cooking-method suggestions
  • Supplement suggestions (for reference only):

    • Based on deficiency risk
    • Dose and timing
    • Interaction warnings

Basis:

  • DRIs/RDA standards
  • The user's nutrition history
  • The user's health status and goals
  • Evidence-based nutrition

Usage

Triggers

Trigger this skill when the user requests:

  • Nutrition-trend analysis
  • Nutrient-intake assessment
  • Nutritional-status assessment
  • Nutrition-improvement advice
  • Correlation analysis between nutrition and other health metrics

Execution Steps

Step 1: Determine the analysis scope

Clarify the requested analysis type and time range:

  • Type: trend/assessment/correlation/advice
  • Time range: week/month/quarter/custom
  • Depth: macronutrients/micronutrients/comprehensive

Step 2: Read data

Primary data sources:

  1. data-example/nutrition-tracker.json - main nutrition data
  2. data-example/nutrition-logs/YYYY-MM/YYYY-MM-DD.json - daily food records

Related data sources:

  1. data-example/profile.json - weight, BMI, etc.
  2. data-example/fitness-tracker.json - exercise data
  3. data-example/sleep-tracker.json - sleep data
  4. data-example/hypertension-tracker.json - blood-pressure data
  5. data-example/diabetes-tracker.json - blood-glucose data

Step 3: Data analysis

Run the appropriate algorithm for the analysis type:

Trend analysis:

  • Linear regression for trend slope
  • Moving average to smooth fluctuation
  • Statistical-significance test

RDA-attainment calculation:

rda_achievement = (actual_intake / rda_value) * 100

status_classification:
- < 50%: severe deficiency
- 50-75%: insufficient
- 75-100%: approaching target
- 100-150%: adequate (ideal range)
- > 150%: excess (watch the safe upper limit, UL)

Nutrient-density score:

nutrient_density_score = (
    (vitamins_achieved / total_vitamins) * 40 +
    (minerals_achieved / total_minerals) * 30 +
    (fiber_achieved / fiber_rda) * 30
)

Correlation analysis:

  • Pearson correlation
  • Lagged-correlation analysis (accounting for delayed effects)
  • Multivariate regression

Step 4: Generate the report

Output the analysis report in the standard format (see "Output Format").


Output Format

Nutrition-trend analysis report

# Nutrient-Intake Trend Analysis Report

## Analysis period
2025-03-20 to 2025-06-20 (3 months, 90 days of records)

## Macronutrient trends

### Calorie intake
- **Trend**: ⬇️ declining
- **Start**: avg 2100 kcal/day
- **Current**: avg 1950 kcal/day
- **Change**: -150 kcal/day (-7.1%)
- **Interpretation**: a moderate reduction, consistent with the weight-loss goal

### Protein
- **Trend**: ➡️ stable
- **Average**: 82 g/day (range: 70-95 g)
- **Target**: 80 g/day
- **On-target rate**: 93% (84/90 days)
- **Interpretation**: stable protein intake, largely on target

### Dietary fiber
- **Trend**: ⬆️ improving
- **Start**: avg 18 g/day
- **Current**: avg 22 g/day
- **Change**: +4 g/day (+22%)
- **Target**: 30 g/day
- **Interpretation**: marked increase, but more is needed

### Fat
- **Trend**: ⬇️ declining
- **Start**: avg 75 g/day
- **Current**: avg 68 g/day
- **Change**: -7 g/day (-9.3%)
- **Target**: ≤65 g/day
- **Interpretation**: reduced fat intake, near target

**Fat-type distribution change**:
| Fat type | Start | Current | Target | Trend |
|----------|-------|---------|--------|-------|
| Saturated | 25g | 20g | <20g | ⬇️ improving |
| Monounsaturated | 30g | 32g | >35g | ⬆️ slight increase |
| Polyunsaturated | 15g | 12g | 15-20g | ⬇️ needs increase |
| Trans | 2g | 0.5g | 0g | ⬇️ improving |

## Vitamin-status trends

### Vitamin D
- **Trend**: ⬆️ increasing (supplement started)
- **Start**: avg 2 μg/day (from food)
- **Current**: avg 52 μg/day (incl. 2000 IU supplement)
- **RDA**: 15 μg/day
- **Serum-level change**:
  - Baseline (2025-05): 18 ng/mL
  - Current (2025-06): 22 ng/mL
  - Target: 30-100 ng/mL
- **Interpretation**: ✅ supplement working, keep monitoring

### Vitamin C
- **Trend**: ⬆️ improving
- **Start**: avg 65 mg/day
- **Current**: avg 85 mg/day
- **RDA**: 100 mg/day
- **On-target rate**: 65% → 85%
- **Suggestion**: add citrus, kiwi, strawberries, etc.

### B vitamins
- **Vitamin B12**: ✅ adequate (avg 2.5 μg, RDA 2.4 μg)
- **Folate**: ⚠️ insufficient (avg 320 μg, RDA 400 μg)
- **B6**: ✅ adequate (avg 1.5 mg, RDA 1.3 mg)

## Mineral trends

### Calcium
- **Trend**: ➡️ stable
- **Average**: 850 mg/day
- **RDA**: 1000 mg/day
- **On-target rate**: 85%
- **Main sources**: dairy 40%, tofu 25%, leafy greens 20%

### Iron
- **Trend**: ✅ adequate
- **Average**: 12 mg/day
- **RDA**: 8 mg/day (men)
- **On-target rate**: 150%
- **Main sources**: meat, eggs, legumes, leafy greens

### Sodium
- **Trend**: ⬇️ improving
- **Start**: avg 2800 mg/day
- **Current**: avg 2100 mg/day
- **Target**: <2300 mg/day (ideal <1500 mg)
- **Interpretation**: ✅ general target met, ⚠️ ideal target still needs work

### Potassium
- **Trend**: ⬆️ improving
- **Start**: avg 2800 mg/day
- **Current**: avg 3200 mg/day
- **Target**: 3500-4700 mg/day
- **Potassium/sodium ratio**: 1.0 → 1.5 (target >2)
- **Suggestion**: keep adding fruit and vegetables

## Special-nutrient trends

### Omega-3
- **Trend**: ⬆️ increasing (fish-oil supplement)
- **Start**: avg 150 mg/day
- **Current**: avg 850 mg/day (incl. supplement)
- **Recommended**: 500-1000 mg/day
- **Status**: ✅ on target

### Choline
- **Trend**: ➡️ stable
- **Average**: 350 mg/day
- **AI (adequate intake)**: 425 mg/day
- **On-target rate**: 82%
- **Main sources**: eggs (60%), meat (25%), legumes (15%)

## Dietary-pattern analysis

### Food-category distribution
| Food category | Share | Change | Rating |
|---------------|-------|--------|--------|
| Fruit & vegetables | 35% | +8% | ✅ increased |
| Whole grains | 20% | +5% | ✅ improved |
| Refined grains | 15% | -7% | ✅ reduced |
| Protein sources | 20% | stable | ✅ adequate |
| Added fats | 8% | -3% | ✅ reduced |
| Added sugar | 2% | -2% | ✅ reduced |

### Eating-time pattern
- **Average eating window**: 12.5 hours (07:30 - 20:00)
- **Eating frequency**: avg 4.2 times/day
- **Most common meal times**:
  - Breakfast: 07:30 (90% of days)
  - Lunch: 12:15 (95% of days)
  - Dinner: 18:45 (98% of days)
  - Snack: 15:30 (60% of days)

### Diet-quality scores
- **Nutrient-density score**: 7.2/10 (up from 6.5)
- **Food-variety score**: 6.8/10
- **Balanced-diet score**: 7.5/10
- **Overall score**: 7.2/10 → **good**

## Insights and Suggestions

### Key insights

1. **Fiber keeps improving but is still low**
   - From 18 g to 22 g, still below the 30 g target
   - Affects: satiety, gut health, glucose control
   - Suggestion: at least 5 g of fiber per meal

2. **Improved fat quality**
   - Saturated fat down, trans fat nearly eliminated
   - Polyunsaturated fat slightly low; add omega-3 foods
   - Suggestion: add oily fish, nuts, flaxseed

3. **Sodium improved but K/Na ratio still low**
   - Sodium down 33%, potassium up 14%
   - K/Na ratio 1.0 → 1.5, still below the 2.0 target
   - Suggestion: keep adding high-potassium foods (banana, orange, potato, spinach)

4. **Vitamin-D supplement is effective**
   - Serum level 18 → 22 ng/mL (4 weeks, +4 ng)
   - Expected to reach target range in 3-4 months
   - Suggestion: continue supplementing, monitor regularly

### Priority action plan

#### Priority 1: raise fiber to 30 g/day (2 weeks)

**Specific actions**:
1. Breakfast: whole grains (oats/whole-wheat bread) + fruit (9 g)
2. Lunch: brown rice/whole-wheat noodles + 2 servings of vegetables (8 g)
3. Dinner: sweet potato/mixed grains + 2 servings of vegetables (8 g)
4. Snack: fruit + nuts (5 g)
**Total**: 30 g ✅

#### Priority 2: optimize K/Na ratio to 2.0 (4 weeks)

**Specific actions**:
1. Reduce processed foods (main sodium source)
2. 2-3 servings/day of high-potassium fruit (banana, orange, kiwi)
3. Choose spinach, potato, mushrooms, tomatoes
4. Use herbs/spices instead of salt

#### Priority 3: maintain vitamin-D supplementation (long term)

**Monitoring plan**:
- Recheck serum level in 3 months
- Target: 40-60 ng/mL
- Adjust dose based on results

## Nutrition-goal progress

| Goal | Start | Current | Target | Progress | Status |
|------|-------|---------|--------|----------|--------|
| Calories | 2100 | 1950 | 1800-2000 | 100% | ✅ met |
| Protein | 75g | 82g | 80g | 100% | ✅ met |
| Dietary fiber | 18g | 22g | 30g | 73% | ⚠️ in progress |
| Vitamin D | 18 ng/mL | 22 ng/mL | 30-100 | 20% | ⚠️ improving |
| Sodium | 2800mg | 2100mg | <2300 | 100% | ✅ met |
| Omega-3 | 150mg | 850mg | 500-1000mg | 100% | ✅ met |

---

**Report generated**: 2025-06-20
**Analysis period**: 2025-03-20 to 2025-06-20 (90 days)
**Records**: 90 days
**Nutrition Analyzer version**: v1.0

Data Structure

Food-record data

{
  "date": "2025-06-20",
  "meals": [
    {
      "type": "breakfast",
      "time": "07:30",
      "foods": ["eggs", "milk", "whole-wheat bread"],
      "calories": 450,
      "macronutrients": {
        "protein_g": 20,
        "carbs_g": 55,
        "fat_g": 15,
        "fiber_g": 5,
        "saturated_fat_g": 5,
        "monounsaturated_fat_g": 6,
        "polyunsaturated_fat_g": 3,
        "trans_fat_g": 0.1
      },
      "micronutrients": {
        "vitamin_a_mcg": 150,
        "vitamin_c_mg": 5,
        "vitamin_d_mcg": 1.5,
        "vitamin_e_mg": 1,
        "vitamin_k_mcg": 5,
        "thiamine_mg": 0.3,
        "riboflavin_mg": 0.4,
        "niacin_mg": 4,
        "vitamin_b6_mg": 0.1,
        "folate_mcg": 30,
        "vitamin_b12_mcg": 0.6,
        "calcium_mg": 250,
        "iron_mg": 2,
        "magnesium_mg": 40,
        "phosphorus_mg": 200,
        "zinc_mg": 2,
        "selenium_mcg": 10,
        "potassium_mg": 350,
        "sodium_mg": 300
      },
      "special_nutrients": {
        "omega_3_g": 0.1,
        "choline_mg": 150
      }
    }
  ],
  "daily_summary": {
    "total_calories": 2000,
    "total_macronutrients": {
      "protein_g": 80,
      "carbs_g": 250,
      "fat_g": 65,
      "fiber_g": 30
    },
    "rda_achievement": {
      "protein": 100,
      "vitamin_c": 85,
      "vitamin_d": 35,
      "calcium": 90,
      "iron": 75
    },
    "goal_achieved": true
  }
}

Algorithm Notes

RDA-attainment calculation

def calculate_rda_achievement(actual_intake, rda_value, ul_value=None):
    """
    Calculate RDA-attainment rate and status

    Args:
    - actual_intake: actual intake
    - rda_value: recommended dietary allowance
    - ul_value: tolerable upper intake level (optional)

    Returns:
    - achievement_rate: attainment percentage
    - status: status label
    """
    achievement_rate = (actual_intake / rda_value) * 100

    if ul_value and actual_intake > ul_value:
        status = "exceeds_ul"
        category = "excess (dangerous)"
    elif achievement_rate < 50:
        status = "severe_deficiency"
        category = "severe deficiency"
    elif achievement_rate < 75:
        status = "insufficient"
        category = "insufficient"
    elif achievement_rate < 100:
        status = "approaching_target"
        category = "approaching target"
    elif achievement_rate <= 150:
        status = "adequate"
        category = "adequate"
    else:
        status = "high_intake"
        category = "high"

    return {
        'achievement_rate': round(achievement_rate, 1),
        'status': status,
        'category': category
    }

Nutrient-density score

def calculate_nutrient_density_score(meal_data):
    """
    Compute a food nutrient-density score (0-10)

    Factor weights:
    - Vitamin attainment: 40%
    - Mineral attainment: 30%
    - Dietary fiber: 20%
    - Limiting nutrients (saturated fat, sodium, added sugar): 10%
    """
    score = 0

    # Vitamin score
    vitamin_achievements = [
        meal_data['micronutrients'][v] / RDA[v]
        for v in ['vitamin_a', 'vitamin_c', 'vitamin_d', 'vitamin_e', 'vitamin_k']
    ]
    vitamin_score = min(sum(vitamin_achievements) / len(vitamin_achievements), 1.5) * 10
    score += min(vitamin_score, 10) * 0.40

    # Mineral score
    mineral_achievements = [
        meal_data['micronutrients'][m] / RDA[m]
        for m in ['calcium', 'iron', 'magnesium', 'zinc']
    ]
    mineral_score = min(sum(mineral_achievements) / len(mineral_achievements), 1.5) * 10
    score += min(mineral_score, 10) * 0.30

    # Dietary-fiber score
    fiber_score = min(meal_data['macronutrients']['fiber_g'] / 5, 2) * 10
    score += min(fiber_score, 10) * 0.20

    # Limiting-nutrient penalty
    penalty = 0
    if meal_data['macronutrients']['saturated_fat_g'] > 10:
        penalty += 2
    if meal_data['micronutrients']['sodium_mg'] > 600:
        penalty += 2
    if meal_data.get('added_sugars_g', 0) > 10:
        penalty += 2

    score = max(0, score - penalty * 0.10)

    return round(score, 1)

Healthy Eating Index score

def calculate_healthy_eating_index(daily_data):
    """
    Compute a Healthy Eating Index (adapted from HEI-2015)

    Score range: 0-100
    """
    score = 0

    # Adequacy components (max 50)
    # 1. Fruit (5)
    fruit_servings = daily_data['fruit_servings']
    score += min(fruit_servings, 2.5) * 2

    # 2. Vegetables (5)
    veg_servings = daily_data['vegetable_servings']
    score += min(veg_servings, 3) * 1.67

    # 3. Whole grains (10)
    whole_grains_oz = daily_data['whole_grains_oz']
    score += min(whole_grains_oz, 3) * 3.33

    # 4. Dairy (10)
    dairy_servings = daily_data['dairy_servings']
    score += min(dairy_servings, 3) * 3.33

    # 5. Protein (5)
    protein_oz = daily_data['protein_oz']
    score += min(protein_oz, 5) * 1

    # 6. Seafood/plant protein (5)
    plant_protein_oz = daily_data['plant_protein_oz']
    score += min(plant_protein_oz, 2) * 2.5

    # 7. Fatty-acid ratio (10)
    fat_ratio = daily_data['unsaturated_fat_g'] / max(daily_data['saturated_fat_g'], 1)
    score += min(fat_ratio, 2.5) * 4

    # Moderation components (max 40, reverse-scored)
    # 8. Refined grains (10, less is better)
    refined_grains_oz = daily_data['refined_grains_oz']
    score += max(10 - refined_grains_oz * 2, 0)

    # 9. Sodium (10, less is better)
    sodium_g = daily_data['sodium_mg'] / 1000
    score += max(10 - sodium_g * 2, 0)

    # 10. Added sugar (10, less is better)
    added_sugars_pct = daily_data['added_sugars_g'] / (daily_data['total_calories'] / 100)
    score += max(10 - added_sugars_pct * 10, 0)

    # 11. Saturated fat (10, less is better)
    saturated_fat_pct = daily_data['saturated_fat_g'] / (daily_data['total_calories'] / 100)
    score += max(10 - saturated_fat_pct * 10, 0)

    return round(score, 1)

Medical Safety Boundaries

⚠️ Important note

This analysis is for health reference only and does not constitute a medical diagnosis or a nutrition prescription.

Scope of analysis

Can do:

  • Statistics and analysis of nutrition data
  • Trend identification and visualization
  • RDA-attainment calculation
  • Deficiency-risk assessment
  • General nutrition suggestions
  • Supplement-interaction checks

Cannot do:

  • Diagnose nutritional-deficiency diseases
  • Prescribe supplements
  • Replace a registered dietitian
  • Manage severe malnutrition
  • Assess food allergies

Danger-sign detection

Detect the following danger signs during analysis:

  1. Nutrient excess:

    • Vitamin A > 3000 μg (long-term)
    • Vitamin D > 100 μg (long-term)
    • Iron > 45 mg (long-term)
    • Selenium > 400 μg
    • Sodium > 2300 mg (sustained)
  2. Nutrient deficiency:

    • Vitamin D < 10 μg/day (serum <12 ng/mL)
    • Vitamin B12 < 1.5 μg/day (vegetarians)
    • Iron < 6 mg/day (women of childbearing age)
    • Calcium < 500 mg/day
  3. Abnormal energy intake:

    • Sustained <1200 kcal/day (possible malnutrition)
    • Sustained >3500 kcal/day (possible overweight)
  4. Abnormal dietary pattern:

    • Dietary fiber <10 g/day
    • Added sugar >25% of calories
    • Saturated fat >15% of calories

Recommendation tiers

Level 1: general advice

  • Based on DRIs/RDA standards
  • For the general population
  • No medical supervision needed

Level 2: informational advice

  • Based on user data and health status
  • Must be combined with personal context
  • Consult a dietitian

Level 3: medical advice

  • Involves disease management or supplements
  • Requires physician confirmation
  • Do not self-adjust medication doses

Reference Resources


Skill version: v1.0 Created: 2026-01-06 Maintainer: MedClawMini

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,679. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.