| name | mental-health |
| description | Comprehensive mental health monitoring with automatic cross-dimensional correlation analysis. Tracks mood, anxiety, stress using validated scales (PHQ-9, GAD-7, PSS). Provides crisis risk screening, CBT techniques, and automatically analyzes correlations with sleep, exercise, nutrition, and chronic conditions. Triggers on: mental health, mood, anxiety, stress, depression, feeling sad, worried, overwhelmed, panic, therapy, emotional, burnout. |
| allowed-tools | ["bash","glob","read"] |
| version | 1.0.0 |
Mental Health — Your Emotional Wellness Companion
Compassionate mental health monitoring with automatic correlation analysis to identify how sleep, exercise, nutrition, and physical health affect your emotional well-being.
Cross-Dimensional Correlation Analysis (Automatic)
This analysis runs automatically when mental health concerns are detected. No manual trigger needed.
Sleep ↔ Mental Health
| Correlation | Typical r-value | Clinical Significance | Action |
|---|
| Sleep duration ↔ PHQ-9 | -0.6 to -0.8 | Strong negative | Each 1-hour increase → 0.5-1 point PHQ-9 reduction |
| Sleep quality ↔ GAD-7 | -0.6 to -0.7 | Strong negative | PSQI improvement → anxiety reduction |
| Sleep latency ↔ Next-day mood | 0.5 to 0.6 | Moderate positive | Longer latency → worse mood |
| REM sleep ↔ Emotional regulation | -0.5 to -0.6 | Moderate negative | REM disruption → emotional dysregulation |
Recommendations based on correlation:
- If r < -0.7: Sleep is primary driver → Prioritize sleep intervention (CBT-I, sleep hygiene)
- If r = -0.4 to -0.7: Moderate influence → Address sleep as part of comprehensive plan
- If r > -0.4: Weak influence → Focus on other factors (exercise, therapy, medication)
Exercise ↔ Mental Health
| Correlation | Typical r-value | Clinical Significance | Action |
|---|
| Exercise frequency ↔ PHQ-9 | -0.5 to -0.7 | Strong negative | Each session/week → 1-2 point PHQ-9 reduction |
| Exercise intensity ↔ Anxiety | -0.4 to -0.6 | Moderate negative | Moderate intensity optimal |
| Outdoor exercise ↔ Mood | -0.5 to -0.6 | Moderate negative | Nature exposure amplifies benefit |
| Exercise consistency ↔ Stability | -0.6 to -0.7 | Strong negative | Regular schedule → mood stability |
Exercise Prescription for Mental Health:
- Depression: Aerobic exercise, 3-5 sessions/week, 30-45 min, moderate intensity (60-75% HRmax)
- Anxiety: Mind-body exercises (yoga, tai chi), 2-3 sessions/week + walking daily
- Stress: Any enjoyable activity, focus on consistency over intensity
Nutrition ↔ Mental Health
| Nutrient | Correlation | Mechanism | Recommendation |
|---|
| Omega-3 (EPA+DHA) | r = -0.4 to -0.6 | Anti-inflammatory, neurotransmitter function | 1-2g daily (fish, supplement) |
| Vitamin D | r = -0.4 to -0.5 | Neuroprotection, serotonin synthesis | 1000-2000 IU daily, sun exposure |
| B vitamins (B6, B9, B12) | r = -0.3 to -0.5 | Methylation, neurotransmitter synthesis | Leafy greens, legumes, animal products |
| Magnesium | r = -0.4 to -0.5 | GABA activation, muscle relaxation | 300-400 mg daily (nuts, seeds, greens) |
| Zinc | r = -0.3 to -0.4 | Neurotransmitter modulation | 10-15 mg daily (meat, shellfish, legumes) |
| Caffeine | r = 0.4 to 0.6 (anxiety) | Adenosine blockade, cortisol elevation | Limit to ≤400mg/day, avoid after 2 PM |
| Sugar/Refined carbs | r = 0.4 to 0.5 (mood swings) | Blood glucose fluctuations | Choose complex carbs, fiber |
| Alcohol | r = 0.5 to 0.6 (depression) | GABA/glutamate disruption, sleep fragmentation | Limit to ≤1 drink/day, avoid when depressed |
Chronic Conditions ↔ Mental Health
| Condition | Correlation | Bidirectional? | Management Implication |
|---|
| Chronic pain | r = 0.6 to 0.8 | Yes | Treat both simultaneously |
| Diabetes | r = 0.4 to 0.6 | Yes | Depression screening essential |
| Hypertension | r = 0.3 to 0.5 | Partial | Stress management helps both |
| Thyroid disorders | r = 0.5 to 0.7 | Yes (thyroid → mood) | Rule out thyroid dysfunction |
| IBS/Gut issues | r = 0.5 to 0.6 | Yes | Gut-brain axis, consider probiotics |
| Autoimmune conditions | r = 0.4 to 0.6 | Partial | Inflammation link, anti-inflammatory diet |
Medication Side Effects ↔ Mental Health
| Medication Class | Potential Effect | Monitoring |
|---|
| Corticosteroids | Mood swings, anxiety, insomnia | Monitor mood during taper |
| Beta-blockers | Fatigue, depression (controversial) | Assess if temporal relationship |
| Hormonal contraceptives | Mood changes (individual) | Track cycle + mood |
| Stimulants | Anxiety, sleep disruption | Dose timing, consider adjustment |
| Statins | Muscle pain → secondary depression | Address pain, consider alternative |
Integrated Intervention Framework
When Sleep is Primary Driver (r < -0.7 with sleep)
Week 1-2: Sleep Foundation
- Sleep restriction therapy (limit time in bed to actual sleep time)
- Stimulus control (bed only for sleep)
- Consistent wake time (anchor point)
Week 3-4: Sleep Optimization
- Pre-sleep routine (60-min wind-down)
- Light exposure management (morning light, evening dim)
- Caffeine/alcohol timing
Expected Outcome: 2-4 point PHQ-9 reduction with 1-2 hour sleep improvement
When Exercise is Primary Driver (r < -0.7 with exercise)
Week 1-2: Activation
- Behavioral activation (schedule 1 pleasant activity/day)
- 10-min walk daily (minimum viable dose)
- Focus on enjoyment, not performance
Week 3-4: Building
- Increase to 30 min, 3x/week
- Add social component (walk with friend)
- Track mood before/after each session
Week 5-8: Consolidation
- 150 min/week moderate exercise
- Add resistance training 2x/week
- Maintain consistency over intensity
Expected Outcome: 3-5 point PHQ-9 reduction with consistent exercise
When Nutrition is Primary Driver (r > 0.5 with dietary factors)
Week 1-2: Elimination
- Remove caffeine (if anxiety) or alcohol (if depression)
- Reduce added sugars
- Regular meal timing
Week 3-4: Addition
- Omega-3 supplementation (1-2g EPA+DHA)
- Increase vegetables (5 servings/day)
- Protein at each meal (satiety, neurotransmitter precursors)
Week 5-8: Optimization
- Mediterranean diet pattern
- Mindful eating practices
- Address emotional eating triggers
Expected Outcome: 2-3 point PHQ-9 reduction with dietary improvement
When Chronic Condition is Primary Driver
Integrated Approach:
- Optimize physical condition management (medication adherence, lifestyle)
- Address condition-specific mental health impacts (pain → depression, diabetes distress)
- Coordinate care between PCP, specialists, and mental health provider
- Consider condition-specific interventions (CBT for chronic pain, diabetes education)
Expected Outcome: Variable; focus on quality of life, acceptance, coping
Enhanced Output Format
# Mental Health Report — March 20, 2026
## 🚨 Crisis Screening
**Risk Level**: 🟢 Low (Score: 3/20)
- ✅ No suicidal ideation (PHQ-9 Item 9 = 0)
- ✅ Symptom trend: Improving
- ✅ Social connection: Good
---
## 📊 Assessment Results
### PHQ-9 (Depression)
| Date | Score | Severity | Trend |
|------|-------|----------|-------|
| Mar 20 | 6 | Mild | ↓ Improving |
| Feb 20 | 9 | Mild | → Stable |
| Jan 20 | 12 | Moderate | ↑ Worsening |
### GAD-7 (Anxiety)
| Date | Score | Severity |
|------|-------|----------|
| Mar 20 | 5 | Mild |
| Feb 20 | 8 | Mild |
---
## 🔗 Automatic Correlation Analysis
### Key Finding: Sleep Duration ↔ Depression
**Correlation**: r = -0.78 (Strong Negative)
**Interpretation**: When you sleep <7 hours, PHQ-9 averages 4 points higher
**Action Plan**:
- Priority #1: Increase sleep to 7-8 hours/night
- Expected impact: 3-4 point PHQ-9 reduction
- Strategy: CBT-I techniques, consistent wake time, no screens after 9 PM
### Secondary Finding: Exercise ↔ Anxiety
**Correlation**: r = -0.52 (Moderate Negative)
**Interpretation**: Exercise days show 30% lower GAD-7 scores
**Action Plan**:
- Maintain 3x/week exercise routine
- Add 10-min walk on non-exercise days
- Track mood before/after each session
### Nutrition Factor: Caffeine ↔ Sleep
**Correlation**: r = 0.61 (Moderate Positive)
**Interpretation**: Afternoon caffeine → 45 min longer sleep latency
**Action Plan**:
- No caffeine after 12 PM (moved from 2 PM)
- Switch to decaf/herbal tea after noon
- Reassess in 2 weeks
---
## 📋 Integrated Treatment Plan
### This Week
- [ ] Sleep: Consistent wake time at 7 AM (±30 min)
- [ ] Exercise: 3 walks (30 min each)
- [ ] Nutrition: No caffeine after 12 PM
- [ ] Therapy: Complete 3 thought records
### Next 2 Weeks
- [ ] Sleep: Implement pre-sleep routine (60 min, no screens)
- [ ] Exercise: Add 1 yoga session
- [ ] Nutrition: Omega-3 supplementation (1g EPA+DHA)
### Follow-Up
- PHQ-9/GAD-7 reassessment: April 3, 2026
- If PHQ-9 ≥10 or GAD-7 ≥10: Consider therapy referral
---
## ⚠️ When to Seek Professional Help
**Immediate (24 hours):**
- PHQ-9 Item 9 ≥1 (suicidal thoughts)
- Risk score ≥10
- Unable to function (work, self-care)
**Soon (1-2 weeks):**
- PHQ-9 ≥15 or GAD-7 ≥15
- Symptoms worsening despite self-help
- Significant impairment in daily life
**Routine (1 month):**
- PHQ-9 10-14 or GAD-7 10-14
- Interested in therapy or medication
- Recurrent episodes
---
## 📚 Resources
**Self-Help:**
- MoodGYM (online CBT program)
- Headspace/Calm (meditation apps)
- CBT Thought Diary (app)
**Crisis Support:**
- National Suicide Prevention Lifeline: 988 (US)
- Crisis Text Line: Text HOME to 741741
- Local emergency: 911
---
**Disclaimer**: This assessment is for informational purposes only and does not constitute mental health diagnosis or treatment. Always consult qualified mental health professionals for diagnosis and treatment. In case of crisis, contact emergency services immediately.
Safety Protocols
Mandatory Crisis Screening
Every session must assess:
- PHQ-9 Item 9 (suicidal ideation)
- Recent self-harm behavior
- Specific suicide plan
- Access to lethal means
- Protective factors (family, beliefs, future orientation)
Referral Thresholds
| Situation | Action | Timeline |
|---|
| Active suicidal ideation with plan | Emergency evaluation | Immediate |
| PHQ-9 ≥20 or GAD-7 ≥20 | Psychiatric evaluation | Within 1 week |
| PHQ-9 15-19 or GAD-7 15-19 | Therapy + consider medication | Within 2 weeks |
| PHQ-9 10-14 or GAD-7 10-14 | Therapy recommended | Within 1 month |
| No improvement after 4 weeks self-help | Professional consultation | Reassess approach |
Documentation Requirements
Every session documents:
- PHQ-9 and GAD-7 scores
- Risk assessment level
- Safety plan (if elevated risk)
- Follow-up plan
- Referrals made (if any)
Version: v2.0 (with automatic correlation analysis)
Created: March 2026
Maintainer: Family Doctor Team
PHQ-9 (Depression Screening)
| Score | Severity | Action |
|---|
| 0-4 | None-minimal | Self-care |
| 5-9 | Mild | Lifestyle changes, monitoring |
| 10-14 | Moderate | Consider therapy |
| 15-19 | Moderately severe | Therapy recommended |
| 20-27 | Severe | Seek professional help |
Item 9 (Suicidal Ideation): Score ≥1 requires immediate attention.
GAD-7 (Anxiety Screening)
| Score | Severity |
|---|
| 0-4 | Minimal |
| 5-9 | Mild |
| 10-14 | Moderate |
| 15-21 | Severe |
PSS-10 (Perceived Stress)
| Score | Level |
|---|
| 0-13 | Low |
| 14-26 | Moderate |
| 27-40 | High |
Crisis Risk Assessment
Risk Factors (0-20 Scale)
- PHQ-9 Item 9 ≥2: +10 points (immediate risk)
- Symptom deterioration ≥5 pts/month: +5
- High negative emotions (>70%): +3
- Major life stressor: +2
- Social isolation: +2
- Substance use increase: +3
- Hopelessness: +5
Risk Levels
| Score | Level | Action |
|---|
| ≥10 | 🔴 High | 24-hour professional help |
| 5-9 | 🟡 Moderate | 48-hour consultation |
| <5 | 🟢 Low | Continue monitoring |
CBT Techniques
Thought Records
- Situation: What happened?
- Automatic thoughts: What went through my mind?
- Emotions: How did I feel? (0-100%)
- Evidence for: Facts supporting thought
- Evidence against: Facts contradicting thought
- Alternative thought: Balanced perspective
- Re-rate emotions: After reconsideration
Behavioral Activation
- Schedule pleasant activities
- Activity monitoring
- Graded task assignments
- Social engagement
Anxiety Management
- Deep breathing (4-7-8 technique)
- Progressive muscle relaxation
- Grounding techniques (5-4-3-2-1 senses)
- Worry time scheduling
Output Example
# Mental Health Report — March 20, 2026
## 🚨 Crisis Screening
**Risk Level**: 🟢 Low (Score: 3/20)
- ✅ No suicidal ideation (PHQ-9 Item 9 = 0)
- ✅ Symptom trend: Improving
- ✅ Social connection: Good
---
## 📊 Assessment Results
### PHQ-9 (Depression)
| Date | Score | Severity |
|------|-------|----------|
| Mar 20 | 6 | Mild |
| Feb 20 | 9 | Mild |
| Jan 20 | 12 | Moderate |
**Trend**: ⬇️ Improving (-6 points in 2 months) ✓
### GAD-7 (Anxiety)
| Date | Score | Severity |
|------|-------|----------|
| Mar 20 | 8 | Mild |
| Feb 20 | 11 | Moderate |
**Trend**: ⬇️ Improving (-3 points) ✓
### PSS-10 (Stress)
Score: 16/40 (Moderate stress)
Primary stressors: Work demands, financial concerns
---
## 🎭 Mood Pattern Analysis
### This Week
| Day | Mood (1-10) | Notes |
|-----|-------------|-------|
| Mon | 6 | Work stress |
| Tue | 7 | Good sleep |
| Wed | 5 | Deadline pressure |
| Thu | 7 | Exercise |
| Fri | 8 | Weekend anticipation |
| Sat | 8 | Social activity |
| Sun | 6 | Sunday blues |
**Average**: 6.7/10 | **Trend**: Stable
### Correlations Detected
- **Sleep ↔ Mood**: r = +0.68 (good sleep = better mood)
- **Exercise ↔ Mood**: r = +0.72 (strong positive)
- **Work stress ↔ Anxiety**: r = +0.55 (moderate)
---
## 💡 Recommendations
### For Depression Symptoms (PHQ-9 = 6)
1. Continue behavioral activation (3 activities/week)
2. Maintain exercise routine (proven mood booster)
3. Practice thought records for negative thinking
4. Consider therapy if score >10 or persists >2 weeks
### For Anxiety (GAD-7 = 8)
1. Daily deep breathing practice (10 min)
2. Worry time: 15 min at 6 PM (contain worry)
3. Limit caffeine to <200mg/day
4. Progressive muscle relaxation before bed
### For Stress (PSS = 16)
1. Work boundaries: No email after 7 PM
2. Mindfulness: 10-min daily practice
3. Social support: 2 social activities/week
4. Time management: Prioritize, delegate
---
## 📋 Action Plan
### Today
- [ ] Complete one pleasant activity
- [ ] Practice 4-7-8 breathing (3 cycles)
### This Week
- [ ] Daily mood tracking
- [ ] 3 exercise sessions
- [ ] Connect with friend/family
### Professional Support
- If PHQ-9 >10 or GAD-7 >10 for 2+ weeks: Consider therapy
- If suicidal thoughts: Call crisis line immediately
- If functioning impaired: Seek psychiatric consultation
---
## 🆘 Crisis Resources
**Emergency** (24/7):
- US: 988 (Suicide & Crisis Lifeline)
- UK: Samaritans at 116 123
- International: Find at findahelpline.com
**Remember**: Mental health challenges are common and treatable. You don't have to face them alone.