SuperAPI AI Directory

ai-analyzer

General & other

View repository

Updated 10-16 01:34

About this skill

Supporting material availability

This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:

  • <support-root>/scripts/generate_ai_report.py

Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.

AI Health Analyzer

Used to organize provided health data, describe trends, and prepare questions for discussion with a doctor; this description is not a clinically validated prediction system.

When to Use

  • The user wants AI-driven health analysis across multiple health datasets or lifestyle signals.
  • You need anomaly detection, risk prediction, or personalized recommendations based on health inputs.
  • You need generated health reports or question-answering over health metrics and trends.

Input and Evidence Boundaries

These methods are optional analysis approaches, not implemented or validated algorithms. Statistical anomalies are not equal to medical anomalies; CUSUM, Z-scores, and correlations require sufficient, comparable samples, and correlation does not prove causation. Nutrient intake below reference amounts does not directly prove deficiency, and sleep questionnaires do not diagnose sleep disorders. Handle emergency symptoms according to local emergency procedures, and avoid letting report generation delay medical care.

References:ADA Risk Screening、ACC Risk Tool。

Core Features

1. Intelligent Health Analysis

  • Multi-dimensional data integration: Integrates 4 categories of data sources, including basic indicators, lifestyle, mental health, and medical history
  • Abnormal pattern recognition: Uses algorithms such as CUSUM and Z-score to detect outliers and change points
  • Correlation analysis: Calculates correlations between different health indicators (Pearson, Spearman)
  • Trend prediction: Performs trend analysis and prediction based on historical data

2. Health Risk Prediction

  • Hypertension risk: Based on the Framingham Risk Score model
  • Diabetes risk: Based on ADA diabetes risk scoring standards
  • Cardiovascular disease risk: Based on ACC/AHA ASCVD guidelines
  • Nutritional deficiency risk: Based on RDA achievement rate and dietary pattern analysis
  • Sleep disorder risk: Based on PSQI and sleep pattern analysis

3. Personalized Recommendation Engine

  • Basic personalization: Based on static profile such as age, sex, BMI, activity level, etc.
  • Recommendation grading: Level 1 (general), Level 2 (reference), Level 3 (medical advice)
  • Evidence-based basis: Based on medical guidelines and evidence-based medical evidence
  • Actionability: Provides specific, feasible improvement recommendations

4. Natural Language Interaction

  • Intelligent Q&A: Supports health data queries, trend analysis, correlation queries, etc.
  • Context understanding: Maintains conversation history and supports multi-turn dialogue
  • Intent recognition: Recognizes user query intent and provides precise responses

5. AI Health Report Generation

  • Comprehensive report: Includes all dimensions of health data, AI insights, and risk assessment
  • Quick summary: Overview of key indicators, abnormality alerts, and main recommendations
  • Risk assessment report: Various disease risks, risk factor analysis, and preventive measures
  • Trend analysis report: Multi-dimensional trends, change point identification, and predictive analysis
  • Interactive HTML report: ECharts charts, Tailwind CSS styling

Usage Instructions

Trigger conditions

When the user mentions the following scenarios, use this skill:

General Inquiry:

  • ✅ "AI analyzes my health status"
  • ✅ "What health risks do I have?"
  • ✅ "Generate AI health report"
  • ✅ "AI analyzes all data"

Risk Prediction:

  • ✅ "Predict my hypertension risk"
  • ✅ "Am I at risk of diabetes?"
  • ✅ "Assess my cardiovascular risk"
  • ✅ "AI predicts health risks"

Intelligent Q&A:

  • ✅ "How is my sleep?"
  • ✅ "What impact does exercise have on my health?"
  • ✅ "How should I improve my health?"
  • ✅ "AI health assistant Q&A"

Report Generation:

  • ✅ "Generate AI health report"
  • ✅ "Create comprehensive analysis report"
  • ✅ "AI risk assessment report"

Execution Steps

Step 1: Read AI configuration

const aiConfig = readFile('data/ai-config.json');
const aiHistory = readFile('data/ai-history.json');

Check whether the AI function is enabled and verify the data source configuration.

Step 2: Read user profile

const profile = readFile('data/profile.json');

Obtain basic information: age, gender, height, weight, BMI, etc.

Step 3: Read health data

Read the relevant data according to the configured data source:

// 基础健康指标
const indexData = readFile('data/index.json');

// 生活方式数据
const fitnessData = readFile('data-example/fitness-tracker.json');
const sleepData = readFile('data-example/sleep-tracker.json');
const nutritionData = readFile('data-example/nutrition-tracker.json');

// 心理健康数据
const mentalHealthData = readFile('data-example/mental-health-tracker.json');

// 医疗历史
const medications = exists('data/medications.json') ? readFile('data/medications.json') : null;
const allergies = exists('data/allergies.json') ? readFile('data/allergies.json') : null;

Step 4: Data integration and preprocessing

Integrate all data sources, and perform data cleaning, time alignment, and missing value handling.

Step 5: Multidimensional analysis

Correlation analysis: Calculate associations such as sleep↔mood, exercise↔weight, nutrition↔biochemical indicators, etc.

Trend analysis: Use methods such as linear regression and moving averages to identify trend direction

Anomaly detection: Use CUSUM and Z-score algorithms to detect outliers and change points

Step 6: Risk prediction

Verify the specific model version, required inputs, applicable population, and time range; when this information is unavailable, only describe risk factors and do not calculate disease probability:

  • Hypertension-related factors: only an explicit validated model applicable to the target population can calculate its specified time range
  • Diabetes risk screening: the ADA questionnaire score is not an individual's 10-year incidence probability
  • Cardiovascular risk: use the corresponding tool only after all required inputs, applicable age, and model version have been verified
  • Nutritional deficiency risk
  • Sleep disorder risk

Step 7: Generate personalized recommendations

Generate three levels of recommendations based on the analysis results:

  • Level 1: General recommendations (based on standard guidelines)
  • Level 2: Reference recommendations (based on personal data)
  • Level 3: Medical recommendations (require doctor confirmation and include a disclaimer)

Step 8: Generate analysis report

Text report: Includes overall assessment, risk prediction, key trends, correlation findings, and personalized recommendations

HTML report: Call scripts/generate_ai_report.py to generate an interactive report containing ECharts charts

Step 9: Update AI history

Only when the user requests to retain records, save the minimum necessary results in the private destination they confirm; keep the original file and do not automatically write to history.

Data source

Data source File path Data content
User profile data/profile.json Age, gender, height, weight, BMI
Medical Records data/index.json Biochemical indicators, imaging examinations
Exercise Tracking data-example/fitness-tracker.json Exercise type, duration, intensity, MET value
Sleep Tracking data-example/sleep-tracker.json Sleep duration, quality, PSQI score
Nutrition Tracking data-example/nutrition-tracker.json Diet records, nutrient intake, RDA achievement rate
Mental Health data-example/mental-health-tracker.json PHQ-9, GAD-7 scores
Medication Records data/medications.json Medication name, dosage, usage, adherence
Allergy History data/allergies.json Allergen, severity

Algorithm Description

Correlation Analysis

  • Pearson correlation coefficient: Continuous variables (e.g., sleep duration and mood scores)
  • Spearman correlation coefficient: Ordinal variables (e.g., symptom severity)

Anomaly Detection

  • CUSUM algorithm: Time series change point detection
  • Z-score method: Statistical outlier detection (|z| > 2)
  • IQR method: Interquartile range outlier detection

Risk Prediction

  • Framingham Risk Score: Hypertension, cardiovascular disease risk
  • ADA Risk Score: Type 2 diabetes risk
  • ASCVD Calculator: Atherosclerotic cardiovascular disease risk

Safety and Compliance

Must follow

  • ❌ Do not provide medical diagnoses
  • ❌ Do not provide specific medication dosage recommendations
  • ❌ Do not judge life or death prognosis
  • ❌ Do not replace doctor's advice
  • ✅ All analyses must be labeled "for reference only"
  • ✅ Level 3 recommendations must include a disclaimer
  • ✅ High-risk predictions must recommend consulting a doctor

Privacy Protection

  • Only read data authorized by the user; missing records do not equal normal or zero values.
  • This skill does not include these JSON files, commands, or report scripts;readFile/existsThe snippets are pseudocode.
  • Local files may still enter the host model context; the host cannot be guaranteed to be offline or free from external processing. Obtain explicit data transmission authorization before involving external services.
  • When generating HTML, escape untrusted text, avoid remote scripts, trackers, and public health reports; save private records within the authorized scope.

Related Commands

  • /ai analyze - AI comprehensive analysis
  • /ai predict [risk_type] - Health risk prediction
  • /ai chat [query] - Natural language Q&A
  • /ai report generate [type] - Generate AI health report
  • /ai status - View AI feature status

Technical Implementation

Tool Limitations

This Skill uses only the following tools:

  • Read: Read JSON data files
  • Grep: Search for specific patterns
  • Glob: Find data files by pattern
  • Write: Generate HTML reports and update history records

Performance Optimization

  • Incremental reading: only read data files within the specified time range
  • Data caching: avoid repeatedly reading the same file
  • Lazy computation: generate chart data on demand

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.