Health trend analyzer
Analyze trends and patterns in health data over time. Correlate changes in medications, symptoms, vital signs, lab results, and other indicators. Identify concerning trends and improvements and provide data-driven insights. Use when users ask about health trends, patterns, or changes over time. Supports multi-dimensional analysis (weight/BMI, symptoms, medication adherence, lab results, mood and sleep), correlation analysis, change detection, and interactive HTML visualization.From its SKILL.md
npx -y skills add rbr7/MedClawMini --skill health-trend-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
14.5 KB, ~3.4k tokens by cl100k_base, as published. Nobody here has run it
Health Trend Analyzer
Analyze trends and patterns in health data over time; identify changes and correlations and provide data-driven health insights.
Core Functions
1. Multi-dimensional trend analysis
- Weight/BMI trend: track weight and BMI over time, assess the health trend
- Symptom patterns: identify recurring symptoms, frequency changes, potential triggers
- Medication adherence: analyze medication patterns, identify missed-dose patterns and room for improvement
- Lab-result trends: track changes in biochemistry (cholesterol, glucose, blood pressure, etc.)
- Mood and sleep: correlate mood state with sleep quality, identify mental-health trends
2. Correlation-analysis engine
- Medication–symptom correlation: identify whether a new medication relates to symptom changes
- Lifestyle effects: correlate diet/sleep with symptoms and mood
- Treatment-effect assessment: measure whether treatment led to improvement
- Cycle–symptom correlation: cycle correlations in women's health tracking
3. Change detection
- Significant changes: warn about rapid weight change, new symptoms, medication changes
- Worsening patterns: early detection of declining health
- Improvement detection: highlight positive health changes
- Threshold alerts: warn when approaching dangerous levels (radiation, extreme BMI)
4. Predictive insights
- Risk assessment: identify risk factors from trends
- Preventive advice: suggest preventive measures based on patterns
- Early warning: predict before a problem becomes serious
Usage
Triggers
Use this skill when the user mentions scenarios such as:
General queries:
- ✅ "What has changed in my health recently?"
- ✅ "Analyze my health trends"
- ✅ "How has my condition changed?"
- ✅ "Health-status summary"
Specific dimensions:
- ✅ "What is my weight/BMI trend?"
- ✅ "Analyze my symptom patterns"
- ✅ "How is my medication adherence?"
- ✅ "What changed in my lab values?"
- ✅ "My mood and sleep trends"
Correlation analysis:
- ✅ "What are my symptoms related to?"
- ✅ "Are my medications working?"
- ✅ "How does sleep relate to my mood?"
Time range:
- Defaults to the past 3 months
- Supports: "past 1 month", "past 6 months", "past 1 year"
- Supports: "Jan 2025 to now", "last 90 days"
Execution Steps
Step 1: Determine the analysis time range
Extract the time range from user input, or use the default (3 months).
Step 2: Read health data
Read the following data sources:
// 1. Personal profile (BMI, weight)
const profile = readFile('data/profile.json');
// 2. Symptom records
const symptomFiles = glob('data/symptoms/**/*.json');
const symptoms = readAllJson(symptomFiles);
// 3. Mood records
const moodFiles = glob('data/mood/**/*.json');
const moods = readAllJson(moodFiles);
// 4. Diet records
const dietFiles = glob('data/diet/**/*.json');
const diets = readAllJson(dietFiles);
// 5. Medication logs
const medicationLogs = glob('data/medication-logs/**/*.json');
// 6. Women's-health data (if applicable)
const cycleData = readFile('data/cycle-tracker.json');
const pregnancyData = readFile('data/pregnancy-tracker.json');
const menopauseData = readFile('data/menopause-tracker.json');
// 7. Allergy history
const allergies = readFile('data/allergies.json');
// 8. Radiation records
const radiation = readFile('data/radiation-records.json');
Step 3: Filter data
Filter data by time range:
function filterByDate(data, startDate, endDate) {
return data.filter(item => {
const itemDate = new Date(item.date || item.created_at);
return itemDate >= startDate && itemDate <= endDate;
});
}
Step 4: Trend analysis
Analyze the trend for each data dimension:
4.1 Weight/BMI trend
- Extract historical weight data
- Compute BMI change
- Identify trend direction (up/down/stable)
- Assess the magnitude of change
4.2 Symptom patterns
- Tally symptom frequency
- Identify high-frequency symptoms
- Analyze symptom timing patterns
- Detect symptom triggers
4.3 Medication adherence
- Compute overall adherence rate
- Analyze adherence per medication
- Identify missed-dose patterns
- Assess improvement suggestions
4.4 Lab results
- Track biochemistry across multiple reports
- Compare with reference ranges
- Identify improvement/worsening
- Flag abnormal values
4.5 Mood and sleep
- Correlate mood scores with sleep duration
- Identify mood-fluctuation patterns
- Detect stress level
- Assess mental-health trends
Step 5: Correlation analysis
Identify correlations using statistical methods:
// Pearson correlation coefficient
function pearsonCorrelation(x, y) {
// Compute the correlation coefficient
// Range: -1 (negative) to 1 (positive)
}
// Use cases
- Medication start date vs. symptom frequency
- Sleep duration vs. mood score
- Weight change vs. diet records
- Exercise volume vs. mood state
Step 6: Change detection
Identify significant changes:
// Change-point detection
function detectChangePoints(timeSeries) {
// Use statistical methods to detect significant change points
// e.g., sudden weight drop, sudden symptom increase
}
// Threshold alerts
function checkThresholds(value, thresholds) {
// Check whether approaching or exceeding dangerous thresholds
// e.g., BMI > 30, radiation dose > safe limit
}
Step 7: Generate insights
Generate predictive insights from the results:
// Risk assessment
function assessRisks(trends) {
// Identify high-risk trends
// e.g., rapid weight loss, frequent symptoms
}
// Preventive advice
function generateRecommendations(trends, correlations) {
// Suggest preventive measures based on patterns
// e.g., improve sleep, improve medication adherence
}
// Early warning
function earlyWarnings(trends) {
// Predict before a problem becomes serious
// e.g., rising symptom frequency, persistently low mood
}
Step 8: Generate a visual report
Generate an interactive HTML report:
- Data summary: produce results in JSON
- HTML-template rendering: inject data into the HTML template
- ECharts chart config: configure 6 interactive charts
- Save the file: save as a standalone HTML file
For detailed output formats, see: data-sources.md
Output Format
Text report (concise)
Health Trend Analysis Report
━━━━━━━━━━━━━━━━━━━━━━━━━━
Generated: 2025-12-31
Analysis period: past 3 months (2025-10-01 to 2025-12-31)
📊 Overall assessment
━━━━━━━━━━━━━━━━━━━━━━━━━━
Improving: weight management, cholesterol level
Stable: glucose control, mood state
Needs attention: medication adherence, sleep quality
📊 Weight/BMI trend
├─ Current weight: 68.5 kg
├─ Current BMI: 23.1 (normal range)
├─ 3-month change: -2.3 kg (-3.2%)
├─ Trend: 📉 gradual weight loss
└─ Assessment: ✅ positive trend, within healthy range
💊 Medication adherence
├─ Current medications: 3
├─ Overall adherence: 78%
├─ Missed doses: 8
├─ Best: Aspirin (95%)
└─ Needs improvement: Amlodipine (65%)
⚠️ Symptom patterns
├─ Most frequent: headache (12 times in 3 months)
├─ Trend: 📉 decreasing frequency (4 fewer than last period)
├─ Potential trigger: moderate correlation with sleep quality (r=0.62)
└─ Suggestion: keep improving sleep patterns
🧪 Lab-result trends
├─ Cholesterol: 240 → 210 mg/dL (improved ✅)
├─ Glucose: 5.6 → 5.4 mmol/L (stable)
├─ Last test: 30 days ago
└─ Suggestion: recheck in 3 months
😊 Mood and sleep
├─ Average mood score: 6.8/10
├─ Average sleep duration: 6.5 hours
├─ Trend: stable mood, slightly improved sleep
└─ Correlation: sleep duration strongly correlates with mood score (r=0.78)
🔗 Correlation analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━
• Sleep duration ↔ mood score: strong positive (r=0.78)
• Weight change ↔ diet records: moderate (r=0.55)
• Medication adherence ↔ symptom frequency: moderate negative (r=-0.62)
💡 Risk assessment and suggestions
━━━━━━━━━━━━━━━━━━━━━━━━━━
🟢 Keep doing
• Current weight-management approach is effective
• Cholesterol level clearly improved
🟡 Needs attention
• Improve Amlodipine adherence (set reminders)
• Increase sleep duration to 7-8 hours
📅 Recheck plan
• Recheck a lipid panel in 3 months
• Reassess medication-adherence improvement in 1 month
━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Disclaimer
This analysis is for reference only and does not replace professional medical diagnosis.
Please consult a physician for professional advice.
HTML visual report (full)
Generates a standalone HTML file with interactive ECharts charts, including:
- Overall-assessment cards: key metrics at a glance
- Weight/BMI trend chart: dual-Y-axis line chart (weight + BMI)
- Symptom-frequency chart: color-coded bar chart (high red / medium yellow / low green)
- Medication-adherence dashboard: overall adherence + per-medication detail
- Lab-result trend chart: multi-series line chart + reference lines
- Correlation heatmap: heatmap of inter-variable correlations
- Mood-and-sleep area chart: dual-Y-axis area chart
HTML-file features:
- ✅ Fully standalone (all dependencies via CDN)
- ✅ Interactive charts (zoom, export, legend toggle)
- ✅ Responsive design (mobile-friendly)
- ✅ Printable (print-optimized styles)
- ✅ Shareable (send to a physician)
Data Sources
Primary data sources
| Data source | File path | Content |
|---|---|---|
| Personal profile | data/profile.json | weight, height, BMI history |
| Symptom records | data/symptoms/**/*.json | symptom name, severity, duration |
| Mood records | data/mood/**/*.json | mood score, sleep quality, stress level |
| Diet records | data/diet/**/*.json | meals, foods, calories, nutrients |
| Medication logs | data/medication-logs/**/*.json | dose times, adherence records |
| Lab results | data/medical_records/**/*.json | biochemistry, reference ranges |
Auxiliary data sources
| Data source | File path | Content |
|---|---|---|
| Menstrual cycle | data/cycle-tracker.json | cycle length, symptom records |
| Pregnancy | data/pregnancy-tracker.json | gestational week, weight, check-ups |
| Menopause | data/menopause-tracker.json | symptoms, HRT use |
| Allergy history | data/allergies.json | allergen, severity |
| Radiation records | data/radiation-records.json | cumulative radiation dose |
For detailed data structures, see: data-sources.md
Analysis Algorithms
Time-series analysis
- Trend detection (linear regression)
- Seasonality analysis
- Outlier detection
Correlation analysis
- Pearson correlation (continuous variables)
- Spearman correlation (ordinal variables)
- Cross-correlation analysis (time series)
Change-point detection
- CUSUM algorithm
- Sliding-window t-test
- Bayesian change-point detection
Statistical metrics
- Mean, median, standard deviation
- Percentiles (25%, 50%, 75%)
- Rate of change (period-over-period, year-over-year)
For detailed algorithms, see: algorithms.md
Safety and Privacy
Must follow
- ❌ Does not give a medical diagnosis
- ❌ Does not give specific medication advice
- ❌ Does not judge prognosis/mortality
- ❌ Includes a disclaimer (for reference only)
Information accuracy
- ✅ Analysis based only on recorded data
- ✅ Does not guess or infer missing information
- ✅ Clearly notes data source and time range
- ✅ Advice should be reviewed by a medical professional
Privacy protection
- ✅ All data stays local
- ✅ No external API calls
- ✅ Results saved locally only
- ✅ The HTML report runs standalone (no data transmission)
Error Handling
Missing data
- No data: output "No data yet; record [data type] first"
- Insufficient data: output "Not enough data (at least 1 month is needed for trend analysis)"
- Narrow range: use available data; note "Record for longer to get a more accurate trend"
Analysis failure
- Cannot compute a trend: output "Cannot compute a trend; too few data points"
- Correlation failed: output "Correlation analysis needs more data"
- Chart-render failure: fall back to the text report
Usage Examples
Example 1: general health trend
User: "What has changed in my health over the past 3 months?" Output: a full HTML report with trend analysis across all dimensions
Example 2: symptom analysis
User: "Analyze my symptom patterns" Output: focus on symptom frequency, triggers, trends
Example 3: weight trend
User: "What is my weight trend?" Output: focus on weight/BMI change and correlation with diet/exercise
Example 4: medication effectiveness
User: "Is my blood-pressure medication working?" Output: correlate medication start date with BP readings and symptom improvement
For more complete examples, see: examples.md
Related Commands
/symptom: record a symptom/mood: record mood/diet: record diet/medication: manage medications and dose records/query: query a specific data point
Technical Implementation
Tool restrictions
This skill uses only the following tools (no extra permissions):
- Read: read JSON data files
- Grep: search for specific patterns
- Glob: find data files by pattern
- Write: generate the HTML report (saved to
data/health-reports/)
Performance optimization
- Incremental reads: read only data files within the specified time range
- Data caching: avoid re-reading the same file
- Lazy computation: generate chart data on demand
Extensibility
- Supports adding new data dimensions
- Supports custom chart types
- Supports custom analysis algorithms
What ships with it: 7 files
134.4 KB alongside SKILL.md, 1 of them executable
templates/
- charts-config.jsruns18.1 KB
- custom-styles.css15.6 KB
- report-template.html21.2 KB
test-data/
- profile-mock.json871 B
- algorithms.md28.2 KB
- data-sources.md30.4 KB
- examples.md20.0 KB