mental-health-analyzer — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited mental-health-analyzer (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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:
The skill triggers automatically in the following cases:
/mental trend to view mental-state trends/mental pattern to analyze mood patterns/mental therapy progress to view treatment progress/crisis assessment to perform a crisis-risk assessment/mental report to generate a mental-health reportWhat this skill must NOT do:
What this skill CAN do:
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 journalData validation:
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 progressGAD-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 trendPSQI 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 improvementSeverity-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)Common-mood statistics:
- Count the most common primary moods (top 5)
- Compute average mood intensity
- Identify the mood-distribution pattern
- Analyze mood diversityTemporal 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 assessmentTrigger 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 typesCoping-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 typesTreatment-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 sessionsSymptom-improvement assessment:
- PHQ-9/GAD-7 score change (before → after treatment)
- Symptom-remission percentage
- Improvement in functional level
- Change in quality of lifeMulti-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 regularlyCrisis warning-sign detection:
- hopelessness
- social_withdrawal
- extreme_mood_swings
- talk_of_death
- giving_away_possessions
- self_harm
- suicidal_thoughts
- substance_abuseEmergency-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 neededData sources:
data-example/sleep-tracker.jsonCorrelation 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 symptomsAnalysis 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 moodData sources:
data-example/fitness-tracker.jsonCorrelation 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 symptomsAnalysis 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 stylesData sources:
data-example/nutrition-tracker.jsonCorrelation 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 healthAnalysis output:
- Degree of diet's effect on mental state
- Nutrition advice (e.g., reduce caffeine, balanced diet)
- Possible nutrient-deficiency flags
- Dietary-adjustment suggestionsData sources:
diabetes-tracker.json, hypertension-tracker.json)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 improvementAnalysis 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 managementThe output includes:
# 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.User input:
/mental trend 3monthsSkill execution:
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 monthUser input:
/mental patternSkill execution:
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 fatigueUser input:
/crisis assessmentSkill execution:
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 outburstsUser input:
/mental therapy progressSkill execution:
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 hygieneUser input:
/mental analysis correlationsSkill execution:
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.User input:
/mental reportSkill execution:
Output: Generates a complete mental-health analysis report as an HTML file, including:
Error: mental-health data file not found
Suggestion: first use /mental assess or /mental mood to create dataWarning: 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🔴 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!Primary data sources:
data-example/mental-health-tracker.json - main mental-health datadata-example/mental-health-logs/ - mood-journal logsRelated 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 dataFor large datasets (e.g., >6 months of mood journaling), use the following strategies:
Skill version: v1.0.0 Last updated: 2025-01-06 Maintainer: MedClawMini
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.