Mental health analyzer
Analyze mental-health data, identify psychological patterns, assess mental-health status, and provide personalized mental-health advice. Supports correlation analysis with sleep, exercise, nutrition, and other health data.From its SKILL.md
npx -y skills add rbr7/MedClawMini --skill mental-health-analyzerAssembled 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
29.2 KB, ~7.2k tokens by cl100k_base, as published. Nobody here has run it
Mental Health Analysis Skill
Core Functions
The mental-health analysis skill provides comprehensive analysis of mental-health data, helping users track their psychological state, identify mood patterns, monitor crisis risk, and optimize coping strategies.
Main function modules:
- Mental-health assessment analysis - Trend analysis of scale scores such as PHQ-9 / GAD-7
- Mood pattern recognition - Identify common moods, triggers, and the effectiveness of coping styles
- Psychotherapy progress tracking - Goal attainment and symptom-improvement assessment
- Crisis risk assessment - Multi-level crisis-risk detection (high/medium/low) and early warning
- Sleep–mind correlation analysis - Correlation between sleep quality and psychological state
- Exercise–mood correlation analysis - Relationship between exercise and mood improvement
- Nutrition–mind correlation analysis - Effect of diet on mood and anxiety
- Chronic-disease–mind correlation analysis - Relationship between chronic illness and mental health
Triggers
The skill triggers automatically in the following cases:
- The user runs
/mental trendto view mental-state trends - The user runs
/mental patternto analyze mood patterns - The user runs
/mental therapy progressto view treatment progress - The user runs
/crisis assessmentto perform a crisis-risk assessment - The user runs
/mental reportto generate a mental-health report
Medical Safety Boundaries
What this skill must NOT do:
- ❌ Does not diagnose mental illness
- ❌ Does not prescribe psychiatric medication
- ❌ Does not predict suicide risk or self-harm behavior
- ❌ Does not replace professional psychotherapy
- ❌ Does not handle acute psychiatric crises
What this skill CAN do:
- ✅ Identify mental-health trends and patterns
- ✅ Assess crisis-risk level and raise early warnings
- ✅ Provide coping-strategy suggestions (non-therapeutic)
- ✅ Track treatment progress and goal attainment
- ✅ Provide care-seeking suggestions and professional-resource information
- ✅ Analyze the relationship between mental health and other health factors
Execution Steps
Step 1: Read data
Read the mental-health data files:
data-example/mental-health-tracker.json- main mental-health profiledata-example/mental-health-logs/.index.json- log indexdata-example/mental-health-logs/YYYY-MM/YYYY-MM-DD.json- daily mood journal
Data validation:
- Check whether the files exist
- Validate the integrity of the data structure
- Confirm there are enough data points to analyze (recommended: at least 3 PHQ-9/GAD-7 assessments, or 7 days of mood journaling)
Step 2: Mental-health assessment trend analysis
PHQ-9 depression-score trend analysis:
- Analyze PHQ-9 scores at different time points
- Compute the rate of score change (points/month)
- Identify severity changes (none/mild/moderate/severe)
- Detect changes in PHQ-9 item 9 (self-harm ideation)
- Predict future trend (improving/stable/worsening)
- Correlate with treatment progress
GAD-7 anxiety-score trend analysis:
- Analyze the time-series change in GAD-7 scores
- Identify patterns in anxiety-symptom change
- Relate triggers to anxiety level
- Assess the effectiveness of coping styles
- Predict anxiety trend
PSQI sleep quality vs. mental state:
- Correlation between PSQI score and PHQ-9/GAD-7 scores
- Effect of sleep disturbance on mood
- Relationship between sleep improvement and mental-state improvement
Severity-change detection:
- Identify severity escalation (needs attention)
- Identify severity de-escalation (positive signal)
- Detect rapid worsening (≥5 points/month, crisis warning)
- Detect rapid improvement (reinforce effective strategies)
Step 3: Mood pattern recognition
Common-mood statistics:
- Count the most common primary moods (top 5)
- Compute average mood intensity
- Identify the mood-distribution pattern
- Analyze mood diversity
Temporal pattern analysis:
- Mood pattern across the day (morning/midday/evening)
- Mood pattern across the week (Monday–Sunday)
- Degree of mood fluctuation (variance/standard deviation)
- Mood-stability assessment
Trigger analysis:
- Count high-frequency triggers (top 10)
- Compute the average impact of each trigger
- Identify high-risk triggers (high impact + high frequency)
- Relate triggers to mood types
Coping-effectiveness assessment:
- Compute the effectiveness of each coping style (helpful/unhelpful ratio)
- Identify highly effective coping strategies (>80% effective)
- Identify low-effectiveness coping strategies (<50% effective)
- Match coping styles to mood types
Step 4: Psychotherapy progress tracking
Treatment-goal attainment assessment:
- Compute the completion percentage of each goal
- Assess symptom improvement (baseline → current → goal)
- Estimate the time to reach each goal
- Identify lagging goals (need adjustment)
Treatment-process analysis:
- Treatment frequency and adherence
- Homework completion rate and quality
- Strength of the therapeutic alliance
- Mood change before vs. after sessions
Symptom-improvement assessment:
- PHQ-9/GAD-7 score change (before → after treatment)
- Symptom-remission percentage
- Improvement in functional level
- Change in quality of life
Step 5: Crisis risk assessment (priority: highest)
Multi-level risk detection mechanism:
Risk-level scoring (total 0-20+):
1. PHQ-9 item 9 detection (highest priority)
- Score = 2 (often): +10 points, classified directly as high risk
- Score = 1 (sometimes): +5 points
- Score = 0 (not at all): +0 points
2. Rapid symptom-worsening detection
- Rapid worsening (≥5 points/month): +5 points
- Worsening (2-4 points/month): +3 points
- Stable (-1 to 1 point/month): +0 points
- Improving (≤-2 points/month): -2 points
3. Proportion of high-intensity negative mood
- Proportion >70%: +3 points
- Proportion 50-70%: +2 points
- Proportion <50%: +0 points
4. Mood-fluctuation detection
- Variance >6 (large swings): +2 points
- Variance 4-6 (medium swings): +1 point
- Variance <4 (small swings): +0 points
5. Crisis-plan warning-sign detection
- Each warning sign present: +2 points
6. Social-withdrawal detection
- Severe withdrawal (alone >80% of time): +3 points
- Moderate withdrawal (alone 50-80% of time): +2 points
- Mild/no withdrawal: +0 points
7. Functional-impairment detection
- Severe impairment (≥5 days/week): +4 points
- Moderate impairment (3-4 days/week): +2 points
- Mild/no impairment: +0 points
Risk-level determination:
- High risk (≥10 points): seek care immediately, initiate crisis intervention
- Medium risk (5-9 points): monitor closely, consider care (within 48 hours)
- Low risk (0-4 points): continue monitoring, reassess regularly
Crisis warning-sign detection:
- hopelessness
- social_withdrawal
- extreme_mood_swings
- talk_of_death
- giving_away_possessions
- self_harm
- suicidal_thoughts
- substance_abuse
Emergency-action triggers:
Seek care immediately (within 24 hours):
- PHQ-9 item 9 score ≥2
- Total risk score ≥10
- Hallucinations or delusions present
- A self-harm or suicide plan exists
Seek care soon (within 48 hours):
- PHQ-9 ≥15 or GAD-7 ≥15
- Total risk score 5-9
- Rapid symptom worsening (≥5 points/month)
- Severe functional impact
Routine care (within 1 month):
- PHQ-9 10-14 or GAD-7 10-14
- Total risk score <5 but persistent symptoms
- Professional support needed
Step 6: Sleep–mind correlation analysis
Data sources:
- Read
data-example/sleep-tracker.json - Extract sleep duration, sleep quality (PSQI), time to fall asleep, etc.
Correlation analysis:
- Correlation between sleep duration and PHQ-9 score
- Correlation between sleep quality and GAD-7 score
- Relationship between insomnia symptoms and mood stability
- Temporal relationship between sleep improvement and mental-state improvement
- Association between sleep-disorder type and specific psychological symptoms
Analysis output:
- Correlation coefficients and statistical significance
- Degree of sleep's effect on mental state (high/medium/low)
- Sleep-improvement suggestions
- Bidirectional analysis of sleep and mood
Step 7: Exercise–mood correlation analysis
Data sources:
- Read
data-example/fitness-tracker.json - Extract exercise frequency, type, intensity, duration, etc.
Correlation analysis:
- Relationship between exercise frequency and average mood intensity
- Relationship between exercise type and mood-improvement effect
- Relationship between exercise intensity and anxiety level
- Relationship between exercise duration and mood persistence
- Post-exercise mood-change pattern
- Relationship between exercise habits and depressive symptoms
Analysis output:
- Degree of exercise's positive effect on mood
- Recommendation of the most effective exercise types
- Best exercise-frequency recommendation
- Relationship between exercise and coping styles
Step 8: Nutrition–mind correlation analysis
Data sources:
- Read
data-example/nutrition-tracker.json - Extract caffeine intake, sugar intake, eating habits, etc.
Correlation analysis:
- Relationship between caffeine intake and GAD-7 anxiety score
- Association between sugar intake and mood fluctuation
- Relationship between eating regularity and mood stability
- Specific nutrient deficiencies (vitamin D, omega-3) and depressive symptoms
- Dietary pattern and overall mental health
Analysis output:
- Degree of diet's effect on mental state
- Nutrition advice (e.g., reduce caffeine, balanced diet)
- Possible nutrient-deficiency flags
- Dietary-adjustment suggestions
Step 9: Chronic-disease–mind correlation analysis
Data sources:
- Read relevant chronic-disease data files (e.g.,
diabetes-tracker.json,hypertension-tracker.json) - Extract disease control, symptom burden, functional limitation, etc.
Correlation analysis:
- Relationship between chronic pain and depressive symptoms
- Relationship between disease control and mental state
- Relationship between functional limitation and mental health
- Relationship between disease burden and anxiety level
- Comorbidity-pattern recognition
- Effect of medication side effects on mood
- Relationship between medication adherence and symptom improvement
Analysis output:
- Degree of chronic disease's effect on mental health
- Psychological issues that need special attention
- Overall health-management suggestions
- Benefits of psychological support for disease management
Step 10: Generate report
The output includes:
- Mental-health status summary
- Assessment-scale trend analysis
- Mood patterns and triggers
- Treatment-progress assessment
- Crisis-risk level and recommendations
- Correlation analysis with other health factors
- Personalized recommendations and action plan
Output Format
Mental-health analysis report structure
# Mental Health Analysis Report
**Report date**: YYYY-MM-DD
**Analysis period**: YYYY-MM-DD to YYYY-MM-DD
**Data completeness**: Good
⚠️ **Important note**: This report is for reference only and does not constitute a medical diagnosis. If you are in serious psychological distress, please seek help from a professional mental-health clinician.
---
## Crisis Risk Warning
**Current risk level**: 🟢 Low risk | 🟡 Medium risk | 🔴 High risk
**Risk score**: X/20
**Risk factors**:
- [list detected risk factors]
**Recommended actions**:
- [provide specific recommendations based on risk level]
---
## 1. Mental-health status summary
[Overall rating: excellent/good/fair/needs improvement/crisis]
- PHQ-9 score: X (severity)
- GAD-7 score: X (severity)
- Sleep quality: X (PSQI)
- Overall trend: improving/stable/worsening
## 2. Mental-assessment trend analysis
### PHQ-9 depression-score trend
- Current score: X
- Baseline score: X
- Change: ±X
- Rate of change: X points/month
- Trend: improving/stable/worsening
- Severity change: [severity 1] → [severity 2]
**Chart description**:
- [line chart showing PHQ-9 score change]
- [mark severity thresholds: 5, 10, 15]
**Special attention**:
- Item 9 (self-harm ideation) score: X
- Highest-scoring item: [item name]
- Persistent issues: [list items]
### GAD-7 anxiety-score trend
- Current score: X
- Baseline score: X
- Change: ±X
- Rate of change: X points/month
- Trend: improving/stable/worsening
**Chart description**:
- [line chart showing GAD-7 score change]
- [mark severity thresholds: 5, 10, 15]
**Main anxiety symptoms**:
- Highest-scoring item: [item name]
- Main triggers: [list]
### PSQI sleep quality
- Total score: X
- Sleep quality: [rating]
- Main problems: [list problem components]
## 3. Mood pattern analysis
### Common moods
1. [mood 1] - X% of the time, average intensity X/10
2. [mood 2] - X% of the time, average intensity X/10
3. [mood 3] - X% of the time, average intensity X/10
**Chart description**:
- [pie chart of mood distribution]
- [radar chart of multi-dimensional mood]
### Temporal patterns
- Morning: primary mood [mood], average intensity X/10
- Afternoon: primary mood [mood], average intensity X/10
- Evening: primary mood [mood], average intensity X/10
### Weekly pattern
- Monday–Friday: primary mood [mood], average intensity X/10
- Weekend: primary mood [mood], average intensity X/10
### Mood stability
- Degree of fluctuation: high/medium/low
- Mood variance: X
**Chart description**:
- [line chart of mood-intensity over time]
- [visualization of fluctuation range]
## 4. Trigger analysis
### High-frequency triggers (top 10)
| Rank | Trigger | Count | Average impact |
|------|---------|-------|----------------|
| 1 | [trigger 1] | X | high/medium/low |
| 2 | [trigger 2] | X | high/medium/low |
| ... |
### High-risk triggers (high impact + high frequency)
- [trigger 1] - count X, high impact, suggestion: [coping suggestion]
- [trigger 2] - count X, high impact, suggestion: [coping suggestion]
**Chart description**:
- [bar chart of trigger frequency]
- [heatmap of triggers vs. mood types]
## 5. Coping-effectiveness assessment
### Coping-style ranking (by effectiveness)
| Coping style | Effective count | Ineffective count | Effectiveness | Rank |
|--------------|-----------------|-------------------|---------------|------|
| [coping style 1] | X | X | XX% | 1 |
| [coping style 2] | X | X | XX% | 2 |
| ... |
### Highly effective strategies (>80% effective)
- [strategy 1] - effectiveness XX%, recommended
- [strategy 2] - effectiveness XX%, recommended
### Low-effectiveness strategies (<50% effective)
- [strategy 1] - effectiveness XX%, consider adjusting or stopping
- [strategy 2] - effectiveness XX%, consider adjusting or stopping
**Chart description**:
- [bar chart of coping-style effectiveness ranking]
- [pie chart of effective/ineffective ratio]
## 6. Psychotherapy progress
### Treatment overview
- Treatment type: [CBT/psychodynamic/humanistic, etc.]
- Treatment frequency: [weekly/biweekly, etc.]
- Sessions completed: X
- Treatment duration: X months
### Treatment-goal progress
| Goal | Baseline | Current | Target | Progress | Estimated completion |
|------|----------|---------|--------|----------|----------------------|
| [goal 1] | X | X | X | XX% | YYYY-MM-DD |
| [goal 2] | X | X | X | XX% | YYYY-MM-DD |
**Overall progress rating**: [excellent/good/fair/needs improvement]
### Symptom improvement
- PHQ-9 change: X → X, improved XX%
- GAD-7 change: X → X, improved XX%
- Overall functional level: [improved/stable/worsened]
### Homework completion
- Average completion rate: XX%
- High-quality completion: XX%
- Areas to strengthen: [list]
## 7. Crisis risk assessment
### Risk level
**Current risk level**: 🟢 Low risk | 🟡 Medium risk | 🔴 High risk
**Risk score**: X/20
### Risk-factor analysis
| Risk factor | Points | Details |
|-------------|--------|---------|
| PHQ-9 item 9 | X | score X, [details] |
| Symptom change | X | [rapid worsening/worsening/stable/improving] |
| Mood intensity | X | high-intensity negative mood XX% |
| Mood fluctuation | X | swings [large/medium/small] |
| Warning signs | X | X warning signs present: [list] |
| Social withdrawal | X | [severe/moderate/mild/no] withdrawal |
| Functional impairment | X | [severe/moderate/mild/no] impairment |
### Detected warning signs
- [list if any]
### Recommended actions
- [provide specific actions based on risk level]
### Emergency resources
- Mental-health crisis hotline: [your local crisis line] (24 hours)
- Psychiatric emergency: nearest hospital emergency department
- Emergency services: [local emergency number]
## 8. Correlation analysis with other health factors
### Sleep–mind correlation
**Correlation strength**: high/medium/low
**Key findings**:
- Correlation between sleep duration and PHQ-9 score: r=X.XX
- Relationship between sleep quality and mood stability: [description]
- Main sleep problems: [list]
- Potential benefit of better sleep on mental state: [description]
**Suggestions**:
- [specific sleep-improvement suggestions]
### Exercise–mood correlation
**Correlation strength**: high/medium/low
**Key findings**:
- Relationship between exercise frequency and mood improvement: [description]
- Most effective exercise types: [list]
- Post-exercise mood change: [description]
**Suggestions**:
- [specific exercise suggestions]
### Nutrition–mind correlation
**Correlation strength**: high/medium/low
**Key findings**:
- Relationship between caffeine intake and anxiety: [description]
- Relationship between sugar intake and mood fluctuation: [description]
- Possible nutrient deficiencies: [list]
**Suggestions**:
- [specific nutrition suggestions]
### Chronic-disease–mind correlation
**Correlation strength**: high/medium/low
**Key findings**:
- Relationship between [chronic disease] and mental state: [description]
- Effect of disease burden on mental health: [description]
- Relationship between functional limitation and mood: [description]
**Suggestions**:
- [specific overall health-management suggestions]
## 9. Comprehensive recommendations
### Immediate actions (if applicable)
- [if there is an urgent issue, list actions to take immediately]
### This week's action plan
1. [action 1] - priority: high/medium/low
2. [action 2] - priority: high/medium/low
3. ...
### This month's goals
1. [goal 1]
2. [goal 2]
3. ...
### Things to keep doing
- [list what is going well; encourage continuation]
### Things to improve
- [list areas for improvement with specific suggestions]
### Recommended resources
- [books/apps/support groups/online resources, etc.]
## 10. Data-quality notes
- Data completeness: [excellent/good/fair/needs improvement]
- PHQ-9 assessments: X
- GAD-7 assessments: X
- Mood-journal entries: X
- Time span: X days
---
**Report generated**: YYYY-MM-DD HH:MM:SS
**Suggested next assessment**: YYYY-MM-DD
⚠️ **Disclaimer**: This report is generated automatically by the mental-health analysis skill, is for reference only, and does not constitute a medical diagnosis or treatment advice. If you have any mental-health concerns, please seek help from a professional mental-health or psychiatric clinician.
Usage Examples
Example 1: Trend analysis
User input:
/mental trend 3months
Skill execution:
- Read the last 3 months of PHQ-9 and GAD-7 assessment data
- Compute the rate of score change and trend
- Analyze severity changes
- Detect changes in PHQ-9 item 9
- Generate a trend report
Output:
# Mental-health trend analysis (last 3 months)
## Overall trend
- PHQ-9: 14 → 8, improved 6 points, trend: improving ✓
- GAD-7: 12 → 6, improved 6 points, trend: improving ✓
- Rate of change: about 2 points/month
## Severity change
- PHQ-9: moderate depression → mild depression ✓
- GAD-7: moderate anxiety → mild anxiety ✓
## Positive signals
- Continued symptom improvement
- PHQ-9 item 9 score: 1 → 0 ✓
- Good treatment response
## Suggestions
- Continue current treatment
- Maintain exercise and sleep habits
- Next assessment: in 1 month
Example 2: Mood pattern analysis
User input:
/mental pattern
Skill execution:
- Read mood-journal data
- Tally common moods and temporal patterns
- Analyze triggers and coping styles
- Generate a pattern-recognition report
Output:
# Mood pattern analysis
## Common moods (top 3)
1. Anxiety - 35%, average intensity 7/10
2. Fatigue - 25%, average intensity 6/10
3. Calm - 20%, average intensity 7/10
## Temporal pattern
- Morning: calm (intensity 7/10) 😌
- Afternoon: anxiety (intensity 7/10) 😰
- Evening: fatigue (intensity 6/10) 😴
## Main triggers (top 5)
1. Work stress - 12 times, high impact
2. Lack of sleep - 8 times, medium impact
3. Exercise - 6 times, positive impact
4. Socializing - 5 times, positive impact
5. Traffic congestion - 4 times, medium impact
## Highly effective coping strategies
1. Exercise - 90% effective ✓
2. Meditation - 85% effective ✓
3. Deep breathing - 75% effective ✓
## Suggestions
- When work stress is high in the afternoon, try deep breathing or a short walk
- Maintaining regular exercise has a marked positive effect on mood
- Better sleep helps reduce anxiety and fatigue
Example 3: Crisis risk assessment
User input:
/crisis assessment
Skill execution:
- Read the most recent PHQ-9/GAD-7 assessments
- Read the most recent mood journal
- Run the crisis-risk detection algorithm
- Compute risk score and level
- Generate a crisis-risk report
Output:
# Crisis risk assessment
## Current risk level: 🟢 Low risk
**Risk score**: 3/20
## Risk-factor analysis
| Risk factor | Points | Details |
|-------------|--------|---------|
| PHQ-9 item 9 | 0 | score 0, no self-harm ideation ✓ |
| Symptom change | -2 | improving trend ✓ |
| Mood intensity | 2 | high-intensity negative mood 45% |
| Mood fluctuation | 1 | moderate swings |
| Warning signs | 0 | none detected ✓ |
| Social withdrawal | 0 | good social activity ✓ |
| Functional impairment | 0 | normal function ✓ |
| **Total** | **3** | **low risk** ✓ |
## Recommended actions
- Continue monitoring your mental state
- Maintain healthy lifestyle habits
- Reassess regularly (once a month)
- Continue psychotherapy (if any)
## Emergency resources (backup)
- Mental-health crisis hotline: [your local crisis line] (24 hours)
- Psychiatric emergency: nearest hospital emergency department
- Emergency services: [local emergency number]
⚠️ If any of the following occur, seek professional help immediately:
- Thoughts or plans of self-harm or suicide
- Hallucinations or delusions
- Complete loss of functioning
- Uncontrollable emotional outbursts
Example 4: Treatment-progress analysis
User input:
/mental therapy progress
Skill execution:
- Read treatment records and goals
- Compute goal-completion percentages
- Analyze degree of symptom improvement
- Assess homework completion
- Generate a treatment-progress report
Output:
# Psychotherapy progress analysis
## Treatment overview
- Treatment type: CBT (cognitive behavioral therapy)
- Treatment frequency: weekly
- Sessions completed: 24
- Treatment duration: 5 months
## Treatment-goal progress
| Goal | Baseline | Current | Target | Progress | Estimated completion |
|------|----------|---------|--------|----------|----------------------|
| Reduce anxiety level | 14 | 8 | 5 | 57% | 2025-08-01 |
| Improve sleep quality | 10 | 6 | 4 | 60% | 2025-07-15 |
| Increase pleasant activities | 2/week | 5/week | 7/week | 50% | 2025-07-01 |
**Overall progress rating**: good ✓
## Symptom improvement
- PHQ-9 score: 14 → 8, improved 43% ✓
- GAD-7 score: 14 → 6, improved 57% ✓
- Overall functional level: markedly improved ✓
## Homework completion
- Average completion rate: 85%
- High-quality completion: 60%
- To strengthen: cognitive-restructuring practice
## Treatment highlights
- Marked improvement in anxiety symptoms
- Noticeable improvement in sleep quality
- Good results from behavioral activation
- Improved ability to identify cognitive distortions
## Keep doing
- Weekly psychotherapy
- Daily relaxation practice
- Behavioral activation (exercise, socializing)
- Thought records
## To strengthen
- Cognitive-restructuring practice
- Applying coping skills
- Maintaining sleep hygiene
Example 5: Correlation analysis
User input:
/mental analysis correlations
Skill execution:
- Read mental-health, sleep, exercise, nutrition, and chronic-disease data
- Compute correlation coefficients
- Analyze degree of effect
- Generate a correlation-analysis report
Output:
# Mental-health correlation analysis
## Sleep–mind correlation (strength: high)
### Key findings
- Sleep duration is negatively correlated with PHQ-9 score (r=-0.72, p<0.01)
- Sleep quality is positively correlated with mood stability (r=0.68, p<0.01)
- For each 1-point improvement in PSQI, PHQ-9 score drops by 1.2 points on average
### Effect of sleep problems
- Difficulty falling asleep → next-day anxiety up 40%
- Waking at night → next-day low mood up 35%
- Insufficient sleep → poor concentration, larger mood swings
### Suggestions
- Keep a regular schedule, in bed before 23:00
- Improve sleep hygiene: avoid afternoon caffeine
- Continue relaxation practice to aid sleep
## Exercise–mood correlation (strength: high)
### Key findings
- Exercise frequency is positively correlated with the share of positive mood (r=0.75, p<0.01)
- On exercise days, average mood intensity is 1.5 points higher than on non-exercise days
- Anxiety drops by 50% on average after exercise
### Most effective exercise types
1. Aerobic exercise (running, swimming) - 85% improvement
2. Yoga - 80% improvement
3. Outdoor walking - 75% improvement
### Suggestions
- Maintain 3-5 exercise sessions/week, 30+ minutes each
- Prioritize aerobic exercise
- Take an outdoor walk when anxious
## Nutrition–mind correlation (strength: medium)
### Key findings
- Caffeine intake is positively correlated with GAD-7 score (r=0.52, p<0.05)
- A high-sugar diet is positively correlated with mood fluctuation (r=0.48, p<0.05)
- Insufficient omega-3 intake may be related to depressive symptoms
### Suggestions
- Reduce caffeine intake (≤2 cups/day)
- Reduce added-sugar intake
- Consider omega-3 supplementation (consult a physician)
## Comprehensive recommendations
Based on the correlation analysis, the following lifestyle factors are most effective for improving mental health:
1. **Regular exercise** (3-5 times/week, 30+ minutes)
2. **Adequate sleep** (7-8 hours, in bed before 23:00)
3. **Balanced diet** (less caffeine and sugar)
4. **Continued treatment** (CBT psychotherapy)
The combined intervention across these four areas contributes about **75%** to improving your mental health.
Example 6: Full report generation
User input:
/mental report
Skill execution:
- Read all relevant data
- Run the full analysis pipeline
- Generate an interactive HTML report
- Include crisis warnings and recommendations
Output: Generates a complete mental-health analysis report as an HTML file, including:
- All charts (interactive ECharts visualizations)
- Crisis-risk warning (if applicable)
- Detailed analysis and recommendations
- Downloadable or printable
Error Handling
Data file not found
Error: mental-health data file not found
Suggestion: first use /mental assess or /mental mood to create data
Insufficient data
Warning: not enough data for trend analysis
Suggestion: at least 3 PHQ-9/GAD-7 assessments or 7 days of mood journaling are needed
Current data: X PHQ-9 assessments, X mood-journal entries
High crisis risk
🔴 Crisis warning: high-risk factors detected
Immediate actions:
1. Contact a mental-health crisis hotline: [your local crisis line] (24 hours)
2. Go to the nearest psychiatric emergency department
3. Call emergency services: [local emergency number]
4. Ask a family member or friend to stay with you
Detected risk factors:
- [list high-risk factors]
Do not hesitate seek professional help immediately!
Data-source Notes
Primary data sources:
data-example/mental-health-tracker.json- main mental-health datadata-example/mental-health-logs/- mood-journal logs
Related data sources:
data-example/sleep-tracker.json- sleep datadata-example/fitness-tracker.json- exercise datadata-example/nutrition-tracker.json- nutrition datadata-example/diabetes-tracker.json- diabetes data (if applicable)data-example/hypertension-tracker.json- hypertension data (if applicable)data-example/medication-tracker.json- medication data
Performance Optimization
For large datasets (e.g., >6 months of mood journaling), use the following strategies:
- Data aggregation: aggregate mood data by week/month
- Sampling analysis: randomly sample representative data points
- Incremental analysis: analyze only newly added data
- Cache intermediate results
Skill version: v1.0.0 Last updated: 2025-01-06 Maintainer: MedClawMini
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.