wellally-tech

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

WellAlly Digital Health Integration

WellAlly 数字健康整合方案

Integrate multiple digital health data sources, connect to WellAlly.tech knowledge base, providing data import and knowledge reference for personal health management systems.
整合多个数字健康数据源,对接WellAlly.tech知识库,为个人健康管理系统提供数据导入和知识参考服务。

Core Features

核心功能

1. Digital Health Data Import

1. 数字健康数据导入

  • Apple Health (HealthKit): Export XML/ZIP file parsing
  • Fitbit: OAuth2 API integration and CSV import
  • Oura Ring: API v2 data synchronization
  • Generic Import: CSV/JSON file import with field mapping
  • Apple Health (HealthKit):解析导出的XML/ZIP文件
  • Fitbit:OAuth2 API集成与CSV导入
  • Oura Ring:API v2数据同步
  • 通用格式导入:带字段映射的CSV/JSON文件导入

2. WellAlly.tech Knowledge Base Integration

2. WellAlly.tech知识库集成

  • Categorized Article Index: Nutrition, fitness, sleep, mental health, chronic disease management
  • Intelligent Recommendations: Recommend relevant articles based on user health data
  • URL References: Provide direct links to WellAlly.tech platform
  • 分类文章索引:营养、健身、睡眠、心理健康、慢性病管理
  • 智能推荐:根据用户健康数据推荐相关文章
  • URL引用:提供WellAlly.tech平台的直接链接

3. Data Standardization

3. 数据标准化

  • Format Conversion: Convert external data to local JSON format
  • Field Mapping: Intelligently map data fields from different platforms
  • Data Validation: Ensure completeness and accuracy of imported data
  • 格式转换:将外部数据转换为本地JSON格式
  • 字段映射:智能映射不同平台的数据字段
  • 数据校验:确保导入数据的完整性和准确性

4. Intelligent Article Recommendations

4. 智能文章推荐

  • Health Status Analysis: Based on user health data analysis
  • Relevance Matching: Recommend articles most relevant to user health conditions
  • Category Navigation: Organize knowledge base articles by health topics
  • 健康状态分析:基于用户健康数据进行分析
  • 相关性匹配:推荐与用户健康状况最相关的文章
  • 分类导航:按健康主题组织知识库文章

Usage Instructions

使用说明

Trigger Conditions

触发场景

Use this skill when users mention the following scenarios:
Data Import:
  • ✅ "Import my health data from Apple Health"
  • ✅ "Connect my Fitbit device"
  • ✅ "Sync my Oura Ring data"
  • ✅ "Import CSV health data file"
  • ✅ "How to import fitness tracker/smartwatch data"
Knowledge Base Query:
  • ✅ "Articles about hypertension on WellAlly platform"
  • ✅ "Recommend some health management reading materials"
  • ✅ "Recommend articles based on my health data"
  • ✅ "WellAlly knowledge base articles about sleep"
  • ✅ "How to improve my blood pressure (check knowledge base)"
Data Management:
  • ✅ "What health data sources do I have"
  • ✅ "Integrate health data from different platforms"
  • ✅ "View imported external data"
当用户提及以下场景时使用此技能:
数据导入:
  • ✅ "从Apple Health导入我的健康数据"
  • ✅ "连接我的Fitbit设备"
  • ✅ "同步我的Oura Ring数据"
  • ✅ "导入CSV健康数据文件"
  • ✅ "如何导入健身追踪器/智能手表数据"
知识库查询:
  • ✅ "WellAlly平台上关于高血压的文章"
  • ✅ "推荐一些健康管理阅读材料"
  • ✅ "根据我的健康数据推荐文章"
  • ✅ "WellAlly知识库中关于睡眠的文章"
  • ✅ "如何改善我的血压(查看知识库)"
数据管理:
  • ✅ "我有哪些健康数据源"
  • ✅ "整合不同平台的健康数据"
  • ✅ "查看已导入的外部数据"

Execution Steps

执行步骤

Step 1: Identify User Intent

步骤1:识别用户意图

Determine what the user wants:
  1. Import Data: Import data from external health platforms
  2. Query Knowledge Base: Find WellAlly.tech related articles
  3. Get Recommendations: Recommend articles based on health data
  4. Data Management: View or manage imported external data
确定用户需求:
  1. 数据导入:从外部健康平台导入数据
  2. 知识库查询:查找WellAlly.tech相关文章
  3. 获取推荐:基于健康数据推荐文章
  4. 数据管理:查看或管理已导入的外部数据

Step 2: Data Import Workflow

步骤2:数据导入流程

If user wants to import data:
2.1 Determine Data Source
javascript
const dataSource = identifySource(userInput);
// Possible returns: "apple-health", "fitbit", "oura", "generic-csv", "generic-json"
2.2 Read External Data Use appropriate import script based on data source type:
javascript
// Apple Health
const appleHealthData = readAppleHealthExport(exportPath);

// Fitbit
const fitbitData = fetchFitbitData(dateRange);

// Oura Ring
const ouraData = fetchOuraData(dateRange);

// Generic CSV/JSON
const genericData = readGenericFile(filePath, mappingConfig);
2.3 Data Mapping and Conversion Map external data to local format:
javascript
// Example: Apple Health steps mapping
function mapAppleHealthSteps(appleRecord) {
  return {
    date: formatDateTime(appleRecord.startDate),
    steps: parseInt(appleRecord.value),
    source: "Apple Health",
    device: appleRecord.sourceName
  };
}

// Save to local file
saveToLocalFile("data/fitness/activities.json", mappedData);
2.4 Data Validation
javascript
function validateImportedData(data) {
  // Check required fields
  // Validate data types
  // Check data ranges
  // Ensure correct time format

  return {
    valid: true,
    errors: [],
    warnings: []
  };
}
2.5 Generate Import Report
javascript
const importReport = {
  source: dataSource,
  import_date: new Date().toISOString(),
  records_imported: {
    steps: 1234,
    weight: 30,
    heart_rate: 1200,
    sleep: 90
  },
  date_range: {
    start: "2025-01-01",
    end: "2025-01-22"
  },
  validation: validationResults
};
如果用户需要导入数据:
2.1 确定数据源
javascript
const dataSource = identifySource(userInput);
// 可能返回值: "apple-health", "fitbit", "oura", "generic-csv", "generic-json"
2.2 读取外部数据 根据数据源类型使用相应的导入脚本:
javascript
// Apple Health
const appleHealthData = readAppleHealthExport(exportPath);

// Fitbit
const fitbitData = fetchFitbitData(dateRange);

// Oura Ring
const ouraData = fetchOuraData(dateRange);

// 通用CSV/JSON
const genericData = readGenericFile(filePath, mappingConfig);
2.3 数据映射与转换 将外部数据映射为本地格式:
javascript
// 示例:Apple Health步数映射
function mapAppleHealthSteps(appleRecord) {
  return {
    date: formatDateTime(appleRecord.startDate),
    steps: parseInt(appleRecord.value),
    source: "Apple Health",
    device: appleRecord.sourceName
  };
}

// 保存到本地文件
saveToLocalFile("data/fitness/activities.json", mappedData);
2.4 数据校验
javascript
function validateImportedData(data) {
  // 检查必填字段
  // 验证数据类型
  // 检查数据范围
  // 确保时间格式正确

  return {
    valid: true,
    errors: [],
    warnings: []
  };
}
2.5 生成导入报告
javascript
const importReport = {
  source: dataSource,
  import_date: new Date().toISOString(),
  records_imported: {
    steps: 1234,
    weight: 30,
    heart_rate: 1200,
    sleep: 90
  },
  date_range: {
    start: "2025-01-01",
    end: "2025-01-22"
  },
  validation: validationResults
};

Step 3: Knowledge Base Query Workflow

步骤3:知识库查询流程

If user wants to query knowledge base:
3.1 Identify Query Topic
javascript
const topic = identifyTopic(userInput);
// Possible returns: "nutrition", "fitness", "sleep", "mental-health", "chronic-disease", "hypertension", "diabetes", etc.
3.2 Search Relevant Articles Find relevant articles from knowledge base index:
javascript
function searchKnowledgeBase(topic) {
  // Read knowledge base index
  const kbIndex = readFile('.claude/skills/wellally-tech/knowledge-base/index.md');

  // Find matching articles
  const articles = kbIndex.categories.filter(cat =>
    cat.tags.includes(topic) || cat.keywords.includes(topic)
  );

  return articles;
}
3.3 Return Article Links
javascript
const results = {
  topic: topic,
  articles: [
    {
      title: "Hypertension Monitoring and Management",
      url: "https://wellally.tech/knowledge-base/chronic-disease/hypertension-monitoring",
      category: "Chronic Disease Management",
      description: "Learn how to effectively monitor and manage blood pressure"
    },
    {
      title: "Blood Pressure Lowering Strategies",
      url: "https://wellally.tech/knowledge-base/chronic-disease/bp-lowering-strategies",
      category: "Chronic Disease Management",
      description: "Improve blood pressure levels through lifestyle changes"
    }
  ],
  total_found: 2
};
如果用户需要查询知识库:
3.1 识别查询主题
javascript
const topic = identifyTopic(userInput);
// 可能返回值: "nutrition", "fitness", "sleep", "mental-health", "chronic-disease", "hypertension", "diabetes", etc.
3.2 搜索相关文章 从知识库索引中查找相关文章:
javascript
function searchKnowledgeBase(topic) {
  // 读取知识库索引
  const kbIndex = readFile('.claude/skills/wellally-tech/knowledge-base/index.md');

  // 查找匹配的文章
  const articles = kbIndex.categories.filter(cat =>
    cat.tags.includes(topic) || cat.keywords.includes(topic)
  );

  return articles;
}
3.3 返回文章链接
javascript
const results = {
  topic: topic,
  articles: [
    {
      title: "Hypertension Monitoring and Management",
      url: "https://wellally.tech/knowledge-base/chronic-disease/hypertension-monitoring",
      category: "Chronic Disease Management",
      description: "Learn how to effectively monitor and manage blood pressure"
    },
    {
      title: "Blood Pressure Lowering Strategies",
      url: "https://wellally.tech/knowledge-base/chronic-disease/bp-lowering-strategies",
      category: "Chronic Disease Management",
      description: "Improve blood pressure levels through lifestyle changes"
    }
  ],
  total_found: 2
};

Step 4: Intelligent Recommendation Workflow

步骤4:智能推荐流程

If user wants personalized recommendations:
4.1 Read User Health Data
javascript
// Read relevant health data
const profile = readFile('data/profile.json');
const bloodPressure = glob('data/blood-pressure/**/*.json');
const sleepRecords = glob('data/sleep/**/*.json');
const weightHistory = profile.weight_history || [];
4.2 Analyze Health Status
javascript
function analyzeHealthStatus(data) {
  const status = {
    concerns: [],
    good_patterns: []
  };

  // Analyze blood pressure
  if (data.blood_pressure?.average > 140/90) {
    status.concerns.push({
      area: "blood_pressure",
      severity: "high",
      condition: "Hypertension",
      value: data.blood_pressure.average
    });
  }

  // Analyze sleep
  if (data.sleep?.average_duration < 6) {
    status.concerns.push({
      area: "sleep",
      severity: "medium",
      condition: "Sleep Deprivation",
      value: data.sleep.average_duration + " hours"
    });
  }

  // Analyze weight trend
  if (data.weight?.trend === "increasing") {
    status.concerns.push({
      area: "weight",
      severity: "medium",
      condition: "Weight Gain",
      value: data.weight.change + " kg"
    });
  }

  // Identify good patterns
  if (data.steps?.average > 8000) {
    status.good_patterns.push({
      area: "activity",
      description: "Daily average steps over 8000",
      value: data.steps.average
    });
  }

  return status;
}
4.3 Recommend Relevant Articles
javascript
function recommendArticles(healthStatus) {
  const recommendations = [];

  for (const concern of healthStatus.concerns) {
    const articles = findArticlesForCondition(concern.condition);
    recommendations.push({
      condition: concern.condition,
      severity: concern.severity,
      articles: articles
    });
  }

  return recommendations;
}
4.4 Generate Recommendation Report
javascript
const recommendationReport = {
  generated_at: new Date().toISOString(),
  health_status: healthStatus,
  recommendations: recommendations,
  total_articles: recommendations.reduce((sum, r) => sum + r.articles.length, 0)
};
如果用户需要个性化推荐:
4.1 读取用户健康数据
javascript
// 读取相关健康数据
const profile = readFile('data/profile.json');
const bloodPressure = glob('data/blood-pressure/**/*.json');
const sleepRecords = glob('data/sleep/**/*.json');
const weightHistory = profile.weight_history || [];
4.2 分析健康状态
javascript
function analyzeHealthStatus(data) {
  const status = {
    concerns: [],
    good_patterns: []
  };

  // 分析血压
  if (data.blood_pressure?.average > 140/90) {
    status.concerns.push({
      area: "blood_pressure",
      severity: "high",
      condition: "Hypertension",
      value: data.blood_pressure.average
    });
  }

  // 分析睡眠
  if (data.sleep?.average_duration < 6) {
    status.concerns.push({
      area: "sleep",
      severity: "medium",
      condition: "Sleep Deprivation",
      value: data.sleep.average_duration + " hours"
    });
  }

  // 分析体重趋势
  if (data.weight?.trend === "increasing") {
    status.concerns.push({
      area: "weight",
      severity: "medium",
      condition: "Weight Gain",
      value: data.weight.change + " kg"
    });
  }

  // 识别良好状态
  if (data.steps?.average > 8000) {
    status.good_patterns.push({
      area: "activity",
      description: "Daily average steps over 8000",
      value: data.steps.average
    });
  }

  return status;
}
4.3 推荐相关文章
javascript
function recommendArticles(healthStatus) {
  const recommendations = [];

  for (const concern of healthStatus.concerns) {
    const articles = findArticlesForCondition(concern.condition);
    recommendations.push({
      condition: concern.condition,
      severity: concern.severity,
      articles: articles
    });
  }

  return recommendations;
}
4.4 生成推荐报告
javascript
const recommendationReport = {
  generated_at: new Date().toISOString(),
  health_status: healthStatus,
  recommendations: recommendations,
  total_articles: recommendations.reduce((sum, r) => sum + r.articles.length, 0)
};

Output Format

输出格式

Data Import Output

数据导入输出

✅ Data Import Successful

Data Source: Apple Health
Import Time: 2025-01-22 14:30:00

Import Records Statistics:
━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Step Records: 1,234 records
⚖️ Weight Records: 30 records
❤️ Heart Rate Records: 1,200 records
😴 Sleep Records: 90 records

Data Time Range: 2025-01-01 to 2025-01-22
━━━━━━━━━━━━━━━━━━━━━━━━━━

💾 Data Saved To:
• data/fitness/activities.json (steps)
• data/profile.json (weight history)
• data/fitness/heart-rate.json (heart rate)
• data/sleep/sleep-records.json (sleep)

⚠️  Validation Warnings:
• 3 step records missing timestamps, used default values
• 1 weight record abnormal (<20kg), skipped

💡 Next Steps:
• Use /health-trend to analyze imported data
• Use /wellally-tech for personalized article recommendations
✅ 数据导入成功

数据源: Apple Health
导入时间: 2025-01-22 14:30:00

导入记录统计:
━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 步数记录: 1,234条
⚖️ 体重记录: 30条
❤️ 心率记录: 1,200条
😴 睡眠记录: 90条

数据时间范围: 2025-01-01 至 2025-01-22
━━━━━━━━━━━━━━━━━━━━━━━━━━

💾 数据保存至:
• data/fitness/activities.json (步数)
• data/profile.json (体重历史)
• data/fitness/heart-rate.json (心率)
• data/sleep/sleep-records.json (睡眠)

⚠️ 校验警告:
• 3条步数记录缺少时间戳,已使用默认值
• 1条体重记录异常(<20kg),已跳过

💡 下一步操作:
• 使用/health-trend分析导入的数据
• 使用/wellally-tech获取个性化文章推荐

Knowledge Base Query Output

知识库查询输出

📚 WellAlly Knowledge Base Search Results

Search Topic: Hypertension Management
Articles Found: 2

━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Hypertension Monitoring and Management
   Category: Chronic Disease Management
   Link: https://wellally.tech/knowledge-base/chronic-disease/hypertension-monitoring
   Description: Learn how to effectively monitor and manage blood pressure

2. Blood Pressure Lowering Strategies
   Category: Chronic Disease Management
   Link: https://wellally.tech/knowledge-base/chronic-disease/bp-lowering-strategies
   Description: Improve blood pressure levels through lifestyle modifications

━━━━━━━━━━━━━━━━━━━━━━━━━━

🔗 Related Topics:
• Diabetes Management
• Cardiovascular Health
• Medication Adherence

💡 Tips:
Click links to visit [WellAlly.tech](https://www.wellally.tech/) platform for full articles
📚 WellAlly知识库搜索结果

搜索主题: 高血压管理
找到文章: 2篇

━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Hypertension Monitoring and Management
   分类: 慢性病管理
   链接: https://wellally.tech/knowledge-base/chronic-disease/hypertension-monitoring
   描述: 学习如何有效监测和管理血压

2. Blood Pressure Lowering Strategies
   分类: 慢性病管理
   链接: https://wellally.tech/knowledge-base/chronic-disease/bp-lowering-strategies
   描述: 通过生活方式调整改善血压水平

━━━━━━━━━━━━━━━━━━━━━━━━━━

🔗 相关主题:
• 糖尿病管理
• 心血管健康
• 用药依从性

💡 提示:
点击链接访问[WellAlly.tech](https://www.wellally.tech/)平台查看完整文章

Intelligent Recommendation Output

智能推荐输出

💡 Article Recommendations Based on Your Health Data

Generated Time: 2025-01-22 14:30:00

━━━━━━━━━━━━━━━━━━━━━━━━━━

🔴 Attention Needed: Blood Pressure Management
━━━━━━━━━━━━━━━━━━━━━━━━━━
Current Status: Average blood pressure 142/92 mmHg (elevated)

Recommended Articles:
1. Hypertension Monitoring and Management
   https://wellally.tech/knowledge-base/chronic-disease/hypertension-monitoring

2. Blood Pressure Lowering Strategies
   https://wellally.tech/knowledge-base/chronic-disease/bp-lowering-strategies

3. Antihypertensive Medication Adherence Guide
   https://wellally.tech/knowledge-base/chronic-disease/medication-adherence

━━━━━━━━━━━━━━━━━━━━━━━━━━

🟡 Attention Needed: Sleep Improvement
━━━━━━━━━━━━━━━━━━━━━━━━━━
Current Status: Average sleep duration 5.8 hours (insufficient)

Recommended Articles:
1. Sleep Hygiene Basics
   https://wellally.tech/knowledge-base/sleep/sleep-hygiene

2. Improve Sleep Quality
   https://wellally.tech/knowledge-base/sleep/sleep-quality-improvement

━━━━━━━━━━━━━━━━━━━━━━━━━━

🟢 Keep Up: Daily Activity
━━━━━━━━━━━━━━━━━━━━━━━━━━
Current Status: Daily average steps 9,234 (good)

Related Reading:
1. Maintain Active Lifestyle
   https://wellally.tech/knowledge-base/fitness/active-lifestyle

━━━━━━━━━━━━━━━━━━━━━━━━━━

Summary: 5 related articles recommended
Visit [WellAlly.tech](https://www.wellally.tech/) Knowledge Base for full content
💡 基于您的健康数据的文章推荐

生成时间: 2025-01-22 14:30:00

━━━━━━━━━━━━━━━━━━━━━━━━━━

🔴 需要关注: 血压管理
━━━━━━━━━━━━━━━━━━━━━━━━━━
当前状态: 平均血压142/92 mmHg(偏高)

推荐文章:
1. Hypertension Monitoring and Management
   https://wellally.tech/knowledge-base/chronic-disease/hypertension-monitoring

2. Blood Pressure Lowering Strategies
   https://wellally.tech/knowledge-base/chronic-disease/bp-lowering-strategies

3. Antihypertensive Medication Adherence Guide
   https://wellally.tech/knowledge-base/chronic-disease/medication-adherence

━━━━━━━━━━━━━━━━━━━━━━━━━━

🟡 需要关注: 睡眠改善
━━━━━━━━━━━━━━━━━━━━━━━━━━
当前状态: 平均睡眠时长5.8小时(不足)

推荐文章:
1. Sleep Hygiene Basics
   https://wellally.tech/knowledge-base/sleep/sleep-hygiene

2. Improve Sleep Quality
   https://wellally.tech/knowledge-base/sleep/sleep-quality-improvement

━━━━━━━━━━━━━━━━━━━━━━━━━━

🟢 保持良好: 日常活动
━━━━━━━━━━━━━━━━━━━━━━━━━━
当前状态: 日均步数9,234(良好)

相关阅读:
1. Maintain Active Lifestyle
   https://wellally.tech/knowledge-base/fitness/active-lifestyle

━━━━━━━━━━━━━━━━━━━━━━━━━━

摘要: 推荐了5篇相关文章
访问[WellAlly.tech](https://www.wellally.tech/)知识库查看完整内容

Data Sources

数据源

External Data Sources

外部数据源

Data SourceTypeImport MethodData Content
Apple HealthFile ImportXML/ZIP ParsingSteps, weight, heart rate, sleep, workouts
FitbitAPI/CSVOAuth2 or CSVActivities, heart rate, sleep, weight
Oura RingAPIOAuth2Sleep stages, readiness, heart rate variability
Generic CSVFile ImportField MappingCustom health data
Generic JSONFile ImportField MappingCustom health data
数据源类型导入方式数据内容
Apple Health文件导入XML/ZIP解析步数、体重、心率、睡眠、运动数据
FitbitAPI/CSVOAuth2或CSV活动、心率、睡眠、体重
Oura RingAPIOAuth2睡眠阶段、身体状态、心率变异性
通用CSV文件导入字段映射自定义健康数据
通用JSON文件导入字段映射自定义健康数据

Local Data Files

本地数据文件

File PathData ContentSource Mapping
data/profile.json
Profile, weight historyApple Health, Fitbit, Oura
data/fitness/activities.json
Steps, activity dataApple Health, Fitbit, Oura
data/fitness/heart-rate.json
Heart rate recordsApple Health, Fitbit, Oura
data/sleep/sleep-records.json
Sleep recordsApple Health, Fitbit, Oura
data/fitness/recovery.json
Recovery dataOura Ring (readiness)
文件路径数据内容数据源映射
data/profile.json
个人档案、体重历史Apple Health、Fitbit、Oura
data/fitness/activities.json
步数、活动数据Apple Health、Fitbit、Oura
data/fitness/heart-rate.json
心率记录Apple Health、Fitbit、Oura
data/sleep/sleep-records.json
睡眠记录Apple Health、Fitbit、Oura
data/fitness/recovery.json
恢复数据Oura Ring(身体状态)

WellAlly.tech Knowledge Base

WellAlly.tech知识库

Knowledge Base Structure

知识库结构

Nutrition & Diet (
knowledge-base/nutrition.md
)
  • Dietary management guidelines
  • Food nutrition queries
  • Diet recommendations
  • Special dietary needs
Fitness & Exercise (
knowledge-base/fitness.md
)
  • Exercise tracking best practices
  • Activity recommendations
  • Exercise data interpretation
  • Training plans
Sleep Health (
knowledge-base/sleep.md
)
  • Sleep quality analysis
  • Sleep improvement strategies
  • Sleep disorders overview
  • Sleep hygiene
Mental Health (
knowledge-base/mental-health.md
)
  • Stress management techniques
  • Mood tracking interpretation
  • Mental health resources
  • Mindfulness practice
Chronic Disease Management (
knowledge-base/chronic-disease.md
)
  • Hypertension monitoring
  • Diabetes management
  • COPD care
  • Medication adherence
营养与饮食 (
knowledge-base/nutrition.md
)
  • 膳食管理指南
  • 食物营养查询
  • 饮食建议
  • 特殊饮食需求
健身与运动 (
knowledge-base/fitness.md
)
  • 运动追踪最佳实践
  • 活动推荐
  • 运动数据解读
  • 训练计划
睡眠健康 (
knowledge-base/sleep.md
)
  • 睡眠质量分析
  • 睡眠改善策略
  • 睡眠障碍概述
  • 睡眠卫生
心理健康 (
knowledge-base/mental-health.md
)
  • 压力管理技巧
  • 情绪追踪解读
  • 心理健康资源
  • 正念练习
慢性病管理 (
knowledge-base/chronic-disease.md
)
  • 高血压监测
  • 糖尿病管理
  • COPD护理
  • 用药依从性

Article Recommendation Mapping

文章推荐映射

javascript
const articleMapping = {
  "Hypertension": [
    "chronic-disease/hypertension-monitoring",
    "chronic-disease/bp-lowering-strategies"
  ],
  "Diabetes": [
    "chronic-disease/diabetes-management",
    "nutrition/diabetic-diet"
  ],
  "Sleep Deprivation": [
    "sleep/sleep-hygiene",
    "sleep/sleep-quality-improvement"
  ],
  "Weight Gain": [
    "nutrition/healthy-diet",
    "nutrition/calorie-management"
  ],
  "High Stress": [
    "mental-health/stress-management",
    "mental-health/mindfulness"
  ]
};
javascript
const articleMapping = {
  "Hypertension": [
    "chronic-disease/hypertension-monitoring",
    "chronic-disease/bp-lowering-strategies"
  ],
  "Diabetes": [
    "chronic-disease/diabetes-management",
    "nutrition/diabetic-diet"
  ],
  "Sleep Deprivation": [
    "sleep/sleep-hygiene",
    "sleep/sleep-quality-improvement"
  ],
  "Weight Gain": [
    "nutrition/healthy-diet",
    "nutrition/calorie-management"
  ],
  "High Stress": [
    "mental-health/stress-management",
    "mental-health/mindfulness"
  ]
};

Integration Guides

集成指南

Apple Health Import

Apple Health导入

Export Steps:
  1. Open "Health" app on iPhone
  2. Tap profile icon in top right corner
  3. Scroll to bottom, tap "Export All Health Data"
  4. Wait for export to complete and choose sharing method
  5. Save the exported ZIP file
Import Steps:
bash
python scripts/import_apple_health.py ~/Downloads/apple_health_export.zip
导出步骤:
  1. 在iPhone上打开“健康”应用
  2. 点击右上角的个人档案图标
  3. 滚动到底部,点击“导出所有健康数据”
  4. 等待导出完成并选择分享方式
  5. 保存导出的ZIP文件
导入步骤:
bash
python scripts/import_apple_health.py ~/Downloads/apple_health_export.zip

Fitbit Integration

Fitbit集成

API Integration:
  1. Create app on Fitbit Developer Platform
  2. Get CLIENT_ID and CLIENT_SECRET
  3. Run OAuth authentication flow
  4. Store access token
Import Data:
bash
python scripts/import_fitbit.py --api --days 30
CSV Import:
bash
python scripts/import_fitbit.py --csv fitbit_export.csv
API集成:
  1. 在Fitbit开发者平台创建应用
  2. 获取CLIENT_ID和CLIENT_SECRET
  3. 运行OAuth认证流程
  4. 存储访问令牌
导入数据:
bash
python scripts/import_fitbit.py --api --days 30
CSV导入:
bash
python scripts/import_fitbit.py --csv fitbit_export.csv

Oura Ring Integration

Oura Ring集成

API Integration:
  1. Create app on Oura Developer Platform
  2. Get Personal Access Token
  3. Configure token in import script
Import Data:
bash
python scripts/import_oura.py --date-range 2025-01-01 2025-01-22
API集成:
  1. 在Oura开发者平台创建应用
  2. 获取个人访问令牌
  3. 在导入脚本中配置令牌
导入数据:
bash
python scripts/import_oura.py --date-range 2025-01-01 2025-01-22

Generic CSV/JSON Import

通用CSV/JSON导入

CSV Import:
bash
python scripts/import_generic.py health_data.csv --mapping mapping_config.json
Mapping Configuration Example (
mapping_config.json
):
json
{
  "date": "Date",
  "steps": "Step Count",
  "weight": "Weight (kg)",
  "heart_rate": "Resting Heart Rate"
}
CSV导入:
bash
python scripts/import_generic.py health_data.csv --mapping mapping_config.json
映射配置示例 (
mapping_config.json
):
json
{
  "date": "Date",
  "steps": "Step Count",
  "weight": "Weight (kg)",
  "heart_rate": "Resting Heart Rate"
}

Security & Privacy

安全与隐私

Must Follow

必须遵守的规则

  • ❌ Do not upload data to external servers (except API sync)
  • ❌ Do not hardcode API credentials in code
  • ❌ Do not share user access tokens
  • ✅ All imported data stored locally only
  • ✅ OAuth credentials encrypted storage
  • ✅ Import only after explicit user authorization
  • ❌ 不得将数据上传至外部服务器(API同步除外)
  • ❌ 不得在代码中硬编码API凭证
  • ❌ 不得分享用户访问令牌
  • ✅ 所有导入的数据仅存储在本地
  • ✅ OAuth凭证加密存储
  • ✅ 仅在获得用户明确授权后导入数据

Data Validation

数据校验

  • ✅ Validate imported data types and ranges
  • ✅ Filter abnormal values (e.g., negative steps)
  • ✅ Preserve data source information
  • ✅ Handle timezone conversion
  • ✅ 验证导入数据的类型和范围
  • ✅ 过滤异常值(如负步数)
  • ✅ 保留数据源信息
  • ✅ 处理时区转换

Error Handling

错误处理

File Read Failure:
  • Output "Unable to read file, please check file path and format"
  • Provide correct file format examples
  • Suggest re-exporting data
API Call Failure:
  • Output "API call failed, please check network connection and credentials"
  • Provide OAuth re-authentication guidance
  • Fall back to CSV import method
Data Validation Failure:
  • Output "Incorrect data format, skipped invalid records"
  • Log number of skipped records
  • Continue processing valid data
文件读取失败:
  • 输出“无法读取文件,请检查文件路径和格式”
  • 提供正确的文件格式示例
  • 建议重新导出数据
API调用失败:
  • 输出“API调用失败,请检查网络连接和凭证”
  • 提供OAuth重新认证指导
  • fallback到CSV导入方式
数据校验失败:
  • 输出“数据格式不正确,已跳过无效记录”
  • 记录跳过的记录数量
  • 继续处理有效数据

Related Commands

相关命令

  • /health-trend
    : Analyze health trends (using imported data)
  • /sleep
    : Record sleep data
  • /diet
    : Record diet data
  • /fitness
    : Record exercise data
  • /profile
    : Manage personal profile
  • /health-trend
    : 分析健康趋势(使用导入的数据)
  • /sleep
    : 记录睡眠数据
  • /diet
    : 记录饮食数据
  • /fitness
    : 记录运动数据
  • /profile
    : 管理个人档案

Technical Implementation

技术实现

Tool Limitations

工具限制

This Skill only uses the following tools:
  • Read: Read external data files and configurations
  • Grep: Search data patterns
  • Glob: Find data files
  • Write: Save imported data to local JSON files
本技能仅使用以下工具:
  • Read: 读取外部数据文件和配置
  • Grep: 搜索数据模式
  • Glob: 查找数据文件
  • Write: 将导入的数据保存到本地JSON文件

Python Dependencies

Python依赖

Python packages potentially needed for import scripts:
python
undefined
导入脚本可能需要的Python包:
python
undefined

Apple Health

Apple Health

import xml.etree.ElementTree as ET import zipfile
import xml.etree.ElementTree as ET import zipfile

Fitbit/Oura

Fitbit/Oura

import requests
import requests

Generic Import

通用导入

import csv import json
undefined
import csv import json
undefined

Performance Optimization

性能优化

  • Incremental reading: Only import data within specified time range
  • Data deduplication: Avoid importing duplicate data for same day
  • Batch writing: Save data in batches for better performance
  • Error recovery: Support resume from breakpoint
  • 增量读取: 仅导入指定时间范围内的数据
  • 数据去重: 避免导入同一天的重复数据
  • 批量写入: 批量保存数据以提升性能
  • 错误恢复: 支持断点续传

Usage Examples

使用示例

Example 1: Import Apple Health Data

示例1: 导入Apple Health数据

User: "Import fitness tracker data from Apple Health" Output: Execute import workflow, generate import report
用户: "从Apple Health导入健身追踪器数据" 输出: 执行导入流程,生成导入报告

Example 2: Query Knowledge Base

示例2: 查询知识库

User: "WellAlly platform articles about sleep" Output: Return sleep-related knowledge base article links
用户: "WellAlly平台上关于睡眠的文章" 输出: 返回睡眠相关的知识库文章链接

Example 3: Get Personalized Recommendations

示例3: 获取个性化推荐

User: "Recommend articles based on my health data" Output: Analyze health data, recommend relevant articles
用户: "根据我的健康数据推荐文章" 输出: 分析健康数据,推荐相关文章

Example 4: Import Generic CSV

示例4: 导入通用CSV

User: "Import this CSV health data file health.csv" Output: Parse CSV, map fields, save to local
用户: "导入这份CSV健康数据文件health.csv" 输出: 解析CSV,映射字段,保存到本地

Extensibility

可扩展性

Adding New Data Sources

添加新数据源

  1. Create new integration guide in
    integrations/
    directory
  2. Create new import script in
    scripts/
    directory
  3. Update
    data-sources.md
    documentation
  4. Add usage instructions in SKILL.md
  1. integrations/
    目录中创建新的集成指南
  2. scripts/
    目录中创建新的导入脚本
  3. 更新
    data-sources.md
    文档
  4. 在SKILL.md中添加使用说明

Adding New Knowledge Base Categories

添加新知识库分类

  1. Create new category file in
    knowledge-base/
    directory
  2. Add related article links
  3. Update
    knowledge-base/index.md
  4. Update article recommendation mapping
  1. knowledge-base/
    目录中创建新的分类文件
  2. 添加相关文章链接
  3. 更新
    knowledge-base/index.md
  4. 更新文章推荐映射

Reference Resources

参考资源

FAQ

常见问题

Q: Will imported data overwrite existing data? A: No. Imported data will be appended to existing data, not overwritten. Duplicate data will be automatically deduplicated.
Q: Can I import data from multiple platforms? A: Yes. You can import data from Apple Health, Fitbit, Oura, and other platforms simultaneously, the system will merge all data.
Q: Are WellAlly.tech knowledge base articles offline? A: No. Knowledge base articles are referenced via URLs, requiring network connection to access the WellAlly.tech platform.
Q: Where are API credentials stored? A: API credentials are encrypted and stored in local configuration files, not uploaded to any server.
Q: 导入的数据会覆盖现有数据吗? A: 不会。导入的数据将追加到现有数据中,不会覆盖。系统会自动去重同一天的重复数据。
Q: 我可以同时从多个平台导入数据吗? A: 可以。您可以同时从Apple Health、Fitbit、Oura等平台导入数据,系统会合并所有数据。
Q: WellAlly.tech知识库文章支持离线访问吗? A: 不支持。知识库文章通过URL引用,需要网络连接才能访问WellAlly.tech平台。
Q: API凭证存储在哪里? A: API凭证会被加密存储在本地配置文件中,不会上传到任何服务器。