Skill

SkillsHealth & Lifestyle › Mental health & wellbeing

mental-health-analyzer

Analyzes mental-health tracking data (PHQ-9, GAD-7, PSQI), identifies mood patterns and triggers, tracks treatment progress, and runs a multi-level crisis-risk screening that routes the user to professional help. Supports correlation with sleep, exercise, nutrition, and chronic-disease data. A tracking/triage support tool — it does not diagnose, prescribe, or replace professional care.

Freerisk: medium
mentalhealthanalyzergomarkdown

Tools: read, grep, glob, write, edit

The full skill

— name: mental-health-analyzer description: Analyze mental-health data, identify psychological patterns, assess mental-health status, and give personalized mental-health advice. Supports correlation analysis with sleep, exercise, nutrition, and other health data. (Clinical scales PHQ-9/GAD-7/PSQI, the slash-command triggers, the crisis-scoring algorithm, and file paths are preserved verbatim; this is a tracking/triage support tool, not a diagnostic one.) allowed-tools: Read, Grep, Glob, Write, Edit risk: unknown source: community — # Mental-health analysis skill ## When to Use – To analyze mood, anxiety, depression scores, treatment progress, or crisis risk. – For mental-health trends, mood-pattern identification, or correlation with sleep/exercise/nutrition. – When the user asks for a mental-health report, risk alert, or treatment-progress tracking. ## Core features A comprehensive mental-health data-analysis skill that helps users track their state, identify mood patterns, monitor crisis risk, and optimize coping strategies. Modules: 1. Mental-health assessment analysis — PHQ-9 / GAD-7 score-trend analysis. 2. Mood-pattern identification — common moods, triggers, and coping-method effectiveness. 3. Treatment-progress tracking — goal attainment and symptom improvement. 4. Crisis-risk assessment — multi-level risk detection (high/medium/low) and alerting. 5. Sleep-mental correlation. 6. Exercise-mood correlation. 7. Nutrition-mental correlation. 8. Chronic-disease-mental correlation. ## Trigger conditions (slash-commands preserved verbatim) – `/mental trend` — view mental-status trend – `/mental pattern` — analyze mood patterns – `/mental therapy progress` — view treatment progress – `/crisis assessment` — crisis-risk assessment – `/mental report` — generate the mental-health report ## Medical safety boundary **Cannot:** diagnose mental illness; prescribe psychiatric medication; predict suicide or self-harm; replace professional therapy; handle acute psychiatric crises. **Can:** identify trends and patterns; assess crisis-risk level and alert; offer (non-therapeutic) coping suggestions; track treatment progress and goals; provide care-seeking advice and professional-resource info; analyze correlations with other health factors. ## Steps **1. Read data.** Files: `data-example/mental-health-tracker.json` (main profile), `data-example/mental-health-logs/.index.json` (log index), `data-example/mental-health-logs/YYYY-MM/YYYY-MM-DD.json` (daily mood diary). Validate existence, structure, and sufficient data points (>=3 PHQ-9/GAD-7 assessments, or 7 days of diary). **2. Assessment-trend analysis.** PHQ-9 depression trend: analyze scores over time, rate of change (pts/month), severity change (none/mild/moderate/severe), change in **PHQ-9 item 9 (self-harm ideation)**, predict trend, correlate with treatment. GAD-7 anxiety trend: time-series, symptom-change pattern, link triggers to anxiety level, coping effectiveness, prediction. PSQI sleep-quality vs PHQ-9/GAD-7 correlation. Severity-change detection: escalation (watch), de-escalation (positive), rapid worsening (>=5 pts/month, crisis alert), rapid improvement (reinforce strategy). **3. Mood-pattern identification.** Common-mood stats (top 5, mean intensity, distribution, diversity). Time patterns (within-day morning/noon/evening; within-week Mon-Sun; variance/SD; stability). Trigger analysis (top 10, mean impact, high-risk = high-impact+high-frequency, trigger-mood links). Coping effectiveness (helpful/unhelpful ratio per method; high-efficacy >80%; low-efficacy <50%; coping-mood match). **4. Treatment-progress tracking.** Goal attainment (% complete per goal, baseline->current->target, ETA, lagging goals). Process (frequency, adherence, homework completion/quality, alliance strength, pre/post-session mood). Symptom improvement (PHQ-9/GAD-7 pre->post, % remission, function level, quality of life). **5. Crisis-risk assessment (highest priority).** Multi-level risk scoring (total 0-20+): “` 1. PHQ-9 item 9 (highest priority): score=2 (often) -> +10, directly HIGH risk; score=1 (sometimes) -> +5; score=0 -> +0. 2. Rapid symptom worsening: >=5 pts/mo -> +5; 2-4 pts/mo -> +3; stable (-1..1) -> +0; improving (<=-2) -> -2. 3. High-intensity negative-mood share: >70% -> +3; 50-70% -> +2; <50% -> +0. 4. Mood volatility: variance >6 -> +2; 4-6 -> +1; <4 -> +0. 5. Each crisis warning sign present -> +2. 6. Social withdrawal: severe (alone >80%) -> +3; moderate (50-80%) -> +2; mild/none -> +0. 7. Functional impairment: severe (>=5 days/wk) -> +4; moderate (3-4) -> +2; mild/none -> +0. Level: HIGH (>=10) -> seek care now, start crisis intervention; MEDIUM (5-9) -> close watch, consider care within 48h; LOW (0-4) -> keep monitoring, periodic assessment. “` Crisis warning signs (clinical list): hopelessness, social_withdrawal, extreme_mood_swings, talk_of_death, giving_away_possessions, self_harm, suicidal_thoughts, substance_abuse. Emergency triggers: **seek care within 24h** if PHQ-9 item 9 >=2, total risk >=10, hallucinations/delusions, or a self-harm/suicide plan; **within 48h** if PHQ-9>=15 or GAD-7>=15, risk 5-9, rapid worsening, or severe functional impact; **within 1 month** if PHQ-9 10-14 or GAD-7 10-14, risk <5 but persistent, or needing professional support. **6. Sleep-mental correlation.** Source `data-example/sleep-tracker.json` (duration, PSQI, sleep-onset). Analyze sleep-duration vs PHQ-9, sleep-quality vs GAD-7, insomnia vs mood stability, improvement timing, sleep-disorder type vs specific symptoms. Output: correlation coefficient + significance, impact level (high/med/low), sleep-improvement advice, bidirectional analysis. **7. Exercise-mood correlation.** Source `data-example/fitness-tracker.json` (frequency, type, intensity, duration). Analyze frequency vs mean mood intensity, type vs improvement, intensity vs anxiety, duration vs mood persistence, post-exercise mood, habit vs depression. Output: positive-impact level, best type, optimal frequency, coping link. **8. Nutrition-mental correlation.** Source `data-example/nutrition-tracker.json` (caffeine, sugar, diet). Analyze caffeine vs GAD-7, sugar vs mood swings, dietary regularity vs stability, deficiencies (vitamin D, Omega-3) vs depression, dietary pattern vs overall health. Output: impact level, nutrition advice (e.g. cut caffeine, balanced diet), possible deficiency flags. **9. Chronic-disease-mental correlation.** Source e.g. `diabetes-tracker.json`, `hypertension-tracker.json` (control, symptom burden, functional limits). Analyze chronic pain vs depression, disease control vs mood, functional limits vs mental health, burden vs anxiety, comorbidity patterns, medication side-effects vs mood, adherence vs improvement. Output: impact level, mental issues needing attention, integrated-management advice. **10. Generate report** (summary; scale trends; mood patterns & triggers; treatment progress; crisis level & advice; correlations; personalized action plan). ## Output format (report — structure summary) A markdown report with: header (report date, period, data completeness) and the disclaimer "for reference only, not a medical diagnosis; seek a professional for severe distress." Then sections: **Crisis-risk alert** (current level green/yellow/red, score X/20, risk factors, recommended action); **1. Status summary** (overall rating; PHQ-9, GAD-7, PSQI scores; trend); **2. Assessment trends** (PHQ-9 current/baseline/change/rate/trend/severity-shift, item-9 score, top item; GAD-7 same; PSQI total & main problems); **3. Mood patterns** (top moods with share & mean intensity; within-day and weekday patterns; stability/variance); **4. Triggers** (top-10 table freq+mean-impact; high-risk triggers with coping advice); **5. Coping effectiveness** (per-method effective/ineffective counts & rate; high-efficacy >80%, low-efficacy <50%); **6. Treatment progress** (type e.g. CBT, frequency, sessions, duration; goal table baseline/current/target/%/ETA; symptom improvement %; homework completion); **7. Crisis-risk** (level, score/20, per-factor table for the 7 factors, detected warning signs, recommended action, emergency resources); **8. Correlations** (sleep/exercise/nutrition/chronic-disease, each with strength high/med/low, key findings with r-values, advice); **9. Comprehensive advice** (immediate actions if any; this-week plan; this-month goals; keep-doing; improve; recommended resources); **10. Data-quality note**. Footer repeats the disclaimer. Emergency resources are placeholders to localize: crisis hotline "400-xxx-xxxx (24h)", psychiatric emergency "nearest tertiary hospital", emergency number "120". ## Examples (compressed; each `/command` produces the matching report section) – `/mental trend 3months` -> trend report, e.g. PHQ-9 14->8 (improving), GAD-7 12->6 (improving), ~2 pts/mo, severity moderate->mild, item-9 1->0, advice to continue treatment. – `/mental pattern` -> top moods (e.g. anxiety 35% @7/10, fatigue 25% @6/10, calm 20% @7/10), time pattern (calm AM, anxious PM, tired evening), top triggers (work stress, poor sleep, exercise+, social+, traffic), high-efficacy coping (exercise 90%, meditation 85%, deep breathing 75%). – `/crisis assessment` -> level + score/20 with the 7-factor table; low-risk example score 3/20 (item-9 0, improving, neg-mood 45%, etc.) with monitoring advice and the emergency-resource block; red-flag note: seek help now if self-harm/suicide thoughts or plan, hallucinations/delusions, total loss of function, or uncontrollable outbursts. – `/mental therapy progress` -> CBT overview, goal table (e.g. lower anxiety 14->8 target 5, 57%), symptom improvement (PHQ-9 -43%, GAD-7 -57%), homework completion ~85%, highlights and areas to strengthen. – `/mental analysis correlations` -> per-domain r-values (e.g. sleep-duration vs PHQ-9 r=-0.72 p<0.01; exercise frequency vs positive-mood r=0.75; caffeine vs GAD-7 r=0.52), best exercise types (aerobic 85%, yoga 80%, walking 75%), integrated advice (regular exercise, 7-8h sleep, balanced diet, continued CBT) with an estimated combined contribution. – `/mental report` -> full HTML report with ECharts interactive charts, crisis alert if applicable, downloadable/printable. ## Error handling – Data file missing: error + advise creating data via `/mental assess` or `/mental mood`. – Insufficient data: warn; need >=3 PHQ-9/GAD-7 assessments or 7 days of diary. – High crisis risk: red crisis warning + immediate actions (call crisis hotline 400-xxx-xxxx 24h; go to nearest psychiatric emergency; call 120; contact family/friend to stay with you) + list detected risk factors + "do not hesitate, seek professional help now." ## Data sources Main: `data-example/mental-health-tracker.json`, `data-example/mental-health-logs/`. Related: `sleep-tracker.json`, `fitness-tracker.json`, `nutrition-tracker.json`, `diabetes-tracker.json`, `hypertension-tracker.json`, `medication-tracker.json`. ## Performance For large data (>6 months of diary): weekly/monthly aggregation, representative sampling, incremental analysis of new data only, cache intermediate results. — **Skill version**: v1.0.0 | **Last updated**: 2025-01-06 | **Maintainer**: WellAlly Tech ## Limitations – Use this skill only when the task clearly matches the scope described above. – Do not treat the output as a substitute for environment-specific validation, testing, or expert review. – Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.