Analyze health goal data, identify goal patterns and progress, assess goal achievement, and provide personalized goal management recommendations.
Features
1. SMART Goal Validation
Validate whether a newly set goal complies with the SMART principles.
Validation Dimensions:
- Specific (Specific)
- Whether the goal is clear and specific
- Whether it has a clear definition
- Whether vague expressions are avoided
-
Measurable (Measurable)
- Whether there are quantifiable indicators
- Whether there are clear measurement standards
- Whether progress can be tracked
-
Achievable (Achievable)
- Whether the goal is realistic and feasible
- Whether the current situation is considered
- Whether it is within a reasonable time frame
- Weight loss goal: 0.5-1 kg per week is recommended
- Exercise goal: 3-5 times per week, 30-60 minutes each time is recommended
-
Relevant (Relevant)
- Whether the goal is health-related
- Whether it fits the user's overall health plan
- Whether it is coordinated with existing goals
-
Time-bound (Time-bound)
- Whether there is a clear deadline
- Whether the time frame is reasonable
- Whether there are phased milestones
Output:
- SMART score (1-5 points for each dimension)
- Overall score and grade (S/A/B/C)
- Improvement suggestions
- Goal optimization plan
Example Assessment:
{
"goal": "6个月内减重5公斤",
"smart_scores": {
"specific": 5,
"measurable": 5,
"achievable": 4,
"relevant": 5,
"time_bound": 5
},
"overall_score": 4.8,
"grade": "A",
"assessment": "优秀的SMART目标",
"suggestions": [
"建议设定阶段性里程碑(每2个月减重1.5-2公斤)",
"建议配合运动计划和饮食调整"
]
}
2. Goal Progress Tracking
Track and analyze the completion progress of goals.
Tracking Content:
-
Current Progress
- Completion percentage
- Current value vs target value
- Remaining gap
-
Time Progress
- Proportion of time elapsed
- Remaining time
- Judgment of being ahead/behind schedule
-
Speed Analysis
- Average progress speed (per week/month)
- Estimated completion time
- Whether the plan needs adjustment
-
Trend Identification
- Progress trend (accelerating/stable/decelerating)
- Periodic patterns
- Abnormal fluctuation detection
Output:
- Progress visualization (progress bar, percentage)
- Completion probability prediction
- Time estimate (optimistic/neutral/pessimistic)
- Adjustment suggestions
Progress Rating:
- 🟢 Excellent - Ahead of schedule, expected to finish early
- 🟡 Normal - Progress meets expectations
- 🟠 Behind - Progress is slightly slow, need to speed up
- 🔴 Severely Behind - Progress is severely lagging, recommend adjusting the goal
3. Habit Formation Analysis
Analyze habit formation and continuity.
Analysis Content:
-
Consecutive Days Tracking
- Current consecutive days
- Longest consecutive days in history
- Average Streak
-
Completion Rate Statistics
- Overall Completion Rate
- Weekly Completion Rate
- Monthly Completion Rate
- Completion Rate by Day of Week
-
Habit Strength Assessment
- Habit Consolidation Level (1-10 points)
- Habit Stability Score
- Automaticity Assessment
-
Habit Pattern Recognition
- Optimal Trigger Time
- Common Reasons for Interruption
- Success Factor Identification
Habit Formation Stages:
- Days 1-7 - Initiation Phase (easiest to give up)
- Days 8-21 - Formation Phase (gradually stabilizing)
- Days 22-30 - Consolidation Phase (approaching automaticity)
- Days 31-66 - Habit Phase (basically formed)
- Day 67+ - Automaticity Phase (fully automatic)
Output:
- Habit Heatmap (Calendar View)
- Streak Statistics
- Completion Rate Trend Chart
- Habit Strength Score
- Habit Stacking Suggestions
Example Analysis:
{
"habit": "morning-stretch",
"current_streak": 21,
"longest_streak": 21,
"completion_rate": 95.2,
"strength_score": 7.5,
"stage": "巩固期",
"assessment": "习惯即将形成,继续保持!",
"next_milestone": 30,
"suggestions": [
"继续保持,即将达到30天里程碑",
"可以尝试添加新的相关习惯"
]
}
4. Motivation Assessment and Management
Assess and manage the user's motivation level.
Assessment Content:
-
Motivation Score Tracking
- Current Motivation Level (1-10 points)
- Motivation Change Trend
- Motivation Fluctuation Cycle
-
Motivation Factor Analysis
- Intrinsic Motivation (health, self-actualization)
- Extrinsic Motivation (rewards, recognition)
- Social Support (encouragement from family and friends)
-
Motivation Low Point Identification
- Signals of Declining Motivation
- Common Low Point Time Points
- Risk Period Warning
Motivation Improvement Strategies:
- Weeks 2-3 - Declining motivation, need to emphasize progress already made
- Months 1-2 - Fatigue period, need to adjust goals and rewards
- After 3 Months - Burnout period, need freshness and challenges
Output:
- Motivation Trend Chart
- Motivation Low Point Warning
- Personalized Incentive Suggestions
- Reward Mechanism Suggestions
Incentive Suggestion Examples:
- When motivation < 5 points: review original intention, lower short-term goals
- When motivation is 5-7 points: emphasize progress, set small rewards
- When motivation > 7 points: set challenges, pursue excellence
5. Achievement System Management
Manage the unlocking and progress of the basic achievement system.
Achievement Types:
-
Goal-Related Achievements
- 🏆 First Goal - Complete the first health goal
- 🎯 Halfway There - Complete 50% of any goal
- 🎉 Goal Achieved - Complete a health goal
- ⚡ Early Completion - Complete a goal ahead of schedule
- 📈 Overachievement - Exceed the goal
-
Habit-Related Achievements
- 🔥 7-Day Streak - Check in any habit for 7 consecutive days
- 💪 21-Day Streak - Check in any habit for 21 consecutive days
- ⭐ 30-Day Streak - Check in any habit for 30 consecutive days
- 🌟 66 consecutive days - Any habit checked in for 66 consecutive days (fully formed)
-
Comprehensive Achievements
- 🏅 Parallel Multi-goals - Complete 3 goals simultaneously
- 💎 Perfect Persistence - 100% completion rate for a 30-day habit
- 🚀 Rapid Progress - Greatest progress in a single week
- 👑 Long-term Persistence - Continuous tracking for 180 days
Achievement Tracking:
- Unlocked Achievements List
- Unlocked Achievement Progress
- Achievement Unlock Time
- Achievement-related Suggestions
Output:
- Achievement Badge Display
- Achievement Completion Progress
- Next Unlockable Achievement
- Achievement Suggestions
6. Obstacle Identification and Suggestions
Identify factors hindering goal achievement and provide solutions.
Obstacle Type:
-
Time Obstacle
- Busy, insufficient time
- Suggestion: shorten single session duration, increase frequency; use fragmented time
-
Motivation Obstacle
- Lack of motivation, procrastination
- Suggestion: set reminders; find a partner; adjust goals
-
Environmental Obstacle
- Lack of support, too many temptations
- Suggestion: change the environment; find alternatives; build a support system
-
Ability Obstacle
- Goal too difficult, lack of knowledge
- Suggestion: reduce difficulty; learn knowledge; seek professional help
-
Physical Obstacle
- Fatigue, discomfort, injury
- Suggestion: rest and recover; adjust the plan; consult a doctor
Output:
- Main Obstacle Identification
- Obstacle Frequency Statistics
- Personalized Solutions
- Preventive Suggestions
7. Data Correlation Analysis
Correlate health goals with other health data for analysis.
Correlation Dimension:
-
Weight Loss Goal Correlation
- Nutritional Intake (calories, macronutrients)
- Exercise Expenditure (frequency, intensity, duration)
- Sleep Quality (duration, depth)
- Weight Change Trend
-
Exercise Goal Correlation
- Sleep Quality (recovery status)
- Nutritional Intake (protein, carbohydrates)
- Body Metrics (weight, body fat percentage)
-
Diet Goal Correlation
- Nutrient Intake (vitamins, minerals)
- Body Metrics (blood pressure, blood sugar)
- Exercise Performance
-
Sleep Goal Correlation
- Exercise Time (impact of evening exercise)
- Diet Time (dinner time, caffeine)
- Screen Time (blue light impact)
Analysis Method:
- Correlation Analysis (Pearson correlation coefficient)
- Regression Analysis (prediction model)
- Trend Matching (trend synchronicity)
- Causal Inference (potential causal relationships)
Output:
- Correlation Strength (strong/medium/weak)
- Positive/Negative Correlation
- Causal Relationship Inference
- Optimization Suggestions
Example Correlation:
{
"goal": "weight-loss",
"correlations": [
{
"factor": "daily_calories",
"correlation": -0.75,
"strength": "强负相关",
"insight": "每日卡路里摄入与减重进度呈强负相关,降低摄入加速进度"
},
{
"factor": "exercise_frequency",
"correlation": 0.68,
"strength": "强正相关",
"insight": "运动频率与减重进度呈强正相关,建议保持每周4次以上"
},
{
"factor": "sleep_duration",
"correlation": 0.45,
"strength": "中等正相关",
"insight": "睡眠时长影响减重,建议保证7-8小时睡眠"
}
],
"recommendations": [
"重点控制卡路里摄入,保持当前运动频率",
"优化睡眠时长,以提升减重效果"
]
}
8. Visualization Report Generation
Generate an interactive HTML report containing ECharts charts.
Report Type:
A. Progress Trend Report
- Line chart showing target progress over time
- Milestone annotations
- Predicted completion time range
- Progress rate analysis
B. Habit Heatmap Report
- Calendar heatmap showing habit completion status
- Color intensity indicates completion frequency
- Streak annotations
- Completion rate statistics
C. Multi-Goal Comparison Report
- Ring chart showing completion rates of multiple goals
- Priority ranking
- Resource allocation suggestions
- Progress synchronization analysis
D. Motivation Trend Report
- Line chart showing motivation changes
- Correlation between motivation and progress
- Motivation low-point warnings
- Motivational suggestions
E. Comprehensive Report
- Includes all the above charts
- Overall health status assessment
- Comprehensive improvement suggestions
- Suggestions for goals in the next phase
Report Features:
- Responsive design, supports mobile devices
- Dark/light theme switching
- Interactive charts (zoom, filter)
- Data table display
- Export to PDF feature
- Fully localized, no internet connection required
ECharts Chart Configuration:
// 进度趋势折线图
{
type: 'line',
xAxis: { type: 'category', data: ['1月', '2月', '3月', ...] },
yAxis: { type: 'value', name: '完成%' },
series: [{
name: '目标进度',
type: 'line',
data: [0, 15, 35, 50, 70, 85, 100],
smooth: true,
markLine: {
data: [{ yAxis: 50, name: '50%里程碑' }]
}
}]
}
// 习惯热图
{
type: 'heatmap',
xAxis: { type: 'category', data: ['周一', '周二', ...] },
yAxis: { type: 'category', data: ['第1周', '第2周', ...] },
visualMap: {
min: 0, max: 1,
inRange: { color: ['#ebedf0', '#216e39'] }
},
series: [{
type: 'heatmap',
data: [[0, 0, 1], [1, 0, 1], [2, 0, 0], ...]
}]
}
// 目标达成率环形图
{
type: 'pie',
radius: ['50%', '70%'],
series: [{
type: 'pie',
radius: ['50%', '70%'],
data: [
{ value: 70, name: '已完成' },
{ value: 30, name: '未完成' }
],
label: { formatter: '{b}: {c}%' }
}]
}
Output:
- HTML file (including complete CSS, JS, ECharts)
- Chart interaction features
- Data tables
- Analysis text
- Suggestion list
Medical Safety Boundaries
Scope of Capabilities Statement
-
✅ Assist in setting health goals
-
✅ Track and analyze goal progress
-
✅ Identify health behavior patterns
-
✅ Provide general health improvement suggestions
-
✅ Generate visualization reports
-
❌ Do not provide medical diagnosis
-
❌ Do not prescribe treatment
-
❌ Do not replace professional medical advice
-
❌ Do not handle eating disorders or compulsive behaviors
Danger Signal Identification
Extreme Goal Warnings:
- Weight loss goal > 1 kg per week
- Weight gain goal > 0.5 kg per week
- Extreme calorie restriction (<1200 calories/day)
- Excessive exercise (>2 hours/day, 7 days/week)
Signs of Unhealthy Behavior:
- Completion rate <30% for 3 consecutive weeks
- Motivation score <3 for 2 consecutive weeks
- Reports of physical discomfort
- Compulsive behavior patterns
Referral Suggestions:
- When danger signals appear, it is recommended to consult a doctor
- If you have chronic diseases, it is recommended to consult the relevant specialist
- When setting dietary goals, it is recommended to consult a nutritionist
- When setting exercise goals, it is recommended to consult a fitness coach
Output Format
Goal Analysis Report
# 健康目标分析报告
## 目标概览
- 目标: 6个月内减重5公斤
- 开始日期: 2025-01-01
- 目标日期: 2025-06-30
- 当前日期: 2025-03-20
## SMART评估
- 具体性: ⭐⭐⭐⭐⭐ (5/5)
- 可衡量性: ⭐⭐⭐⭐⭐ (5/5)
- 可实现性: ⭐⭐⭐⭐ (4/5)
- 相关性: ⭐⭐⭐⭐⭐ (5/5)
- 有时限: ⭐⭐⭐⭐⭐ (5/5)
**总体评分: A (4.8/5)**
## 进度分析
- 当前进度: 70%
- 已完成: 3.5公斤 / 5.0公斤
- 时间进度: 27% (79天/180天)
- 进度评级: 🟢 优秀 (进度超前)
### 趋势分析
- 平均速度: 0.77公斤/月
- 预计完成: 2025-05-20 (提前40天)
- 进度趋势: 稳定上升
## 习惯追踪
### 早上拉伸习惯
- 当前连续: 21天 🔥
- 历史最长: 21天
- 完成率: 95.2%
- 习惯阶段: 巩固期
- 下一个里程碑: 30天 ⭐
## 动机评估
- 当前动机: 8/10
- 动机趋势: 稳定
- 动机状态: 良好
## 数据关联分析
### 强相关因素(影响度>60%)
1. 每日卡路里摄入 (负相关 -0.75)
2. 每周运动频次 (正相关 +0.68)
3. 睡眠时长 (正相关 +0.45)
### 建议
- 保持当前卡路里摄入水平
- 继续保持每周4次运动频率
- 优化睡眠时长至7-8小时
## 障碍识别
主要障碍: 社交活动饮食控制
解决方案:
- 社交活动前提前规划饮食
- 选择健康餐厅
- 适量控制份量
## 成就解锁
🔥 连续21天 - 早上拉伸习惯达成!
🎯 半程达成 - 减重目标完成50%!
## 下一步行动
1. 保持当前进度
2. 关注社交活动饮食控制
3. 继续养成早操习惯
4. 准备达成30天里程碑
Technical Implementation Points
Data Reading
- Read main data file:
data-example/health-goals-tracker.json - Read log file:
data-example/health-goals-logs/YYYY-MM/YYYY-MM-DD.json - Related data:
data-example/nutrition-tracker.json,fitness-tracker.jsonetc.
Data Processing
- Calculate completion percentage:
(current_value / target_value) * 100 - Calculate time progress:
(days_elapsed / total_days) * 100 - Calculate consecutive days: iterate through logs, count consecutive completion days
- Calculate completion rate:
(completed_days / total_days) * 100 - Calculate habit strength: a composite score based on completion rate and streak days
SMART validation algorithm
def validate_smart_goal(goal):
scores = {
'specific': check_specificity(goal),
'measurable': check_measurability(goal),
'achievable': check_achievability(goal),
'relevant': check_relevance(goal),
'time_bound': check_time_bound(goal)
}
overall = sum(scores.values()) / len(scores)
grade = get_grade(overall)
return scores, overall, grade
HTML report generation
- Use ECharts 5.x CDN
- Responsive CSS layout
- Handle chart interactions with JavaScript
- Support dark/light theme switching
- Data is dynamically loaded from JSON files
When using this skill, always prioritize the user's health and safety!