agentsclimarketplace

Tcm constitution analyzer

Skill rbr7/MedClawMini/skills/tcm-constitution-analyzer

Analyze Traditional Chinese Medicine (TCM) constitution data, identify constitution types, assess constitutional characteristics, and provide personalized wellness advice. Supports correlation analysis with nutrition, exercise, sleep, and other health data.From its SKILL.md

Install
npx -y skills add rbr7/MedClawMini --skill tcm-constitution-analyzer

Assembled 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

17.5 KB, ~4.4k tokens by cl100k_base, as published. Nobody here has run it

TCM Constitution Identification Analyzer Skill

Analyze TCM constitution data, identify constitution types, assess constitutional characteristics, and provide personalized wellness advice.

Functions

1. Constitution-identification assessment

Identify constitution based on the "Classification and Determination of TCM Constitution" standard.

Assessment dimensions:

  • Scores for 9 constitution types (Balanced, Qi-deficiency, Yang-deficiency, Yin-deficiency, Phlegm-dampness, Damp-heat, Blood-stasis, Qi-stagnation, Special/allergic)
  • Primary-constitution determination
  • Compound-constitution identification
  • Constitutional-characteristic analysis

Method:

  • Standardized 60-item questionnaire
  • 5-point scale (never/seldom/sometimes/often/always)
  • Converted-score calculation (0-100)

Output:

  • Constitution-type result
  • Score for each constitution
  • Characteristic description
  • Individualized wellness advice

2. Constitutional-characteristic analysis

Comprehensively assess the user's constitutional characteristics.

Analysis content:

  • Physical traits:

    • Body-type features
    • Complexion
    • Tongue and pulse signs
  • Psychological traits:

    • Personality features
    • Emotional tendencies
  • Disease predisposition:

    • Susceptible conditions
    • Health risks
  • Adaptability:

    • Environmental adaptation
    • Seasonal adaptation

Output:

  • Constitution-type classification
  • Characteristic description
  • Risk assessment
  • Conditioning priorities

3. Constitution-change trend analysis

Track constitution changes and assess the effect of conditioning.

Analysis content:

  • Comparison across multiple assessments
  • Score-change trend
  • Constitution-stability analysis
  • Conditioning-effect assessment

Output:

  • Trend charts
  • Magnitude of improvement
  • Stability assessment
  • Suggestions to continue conditioning

4. Correlation analysis

Analyze the correlation between constitution and other health metrics.

Supported correlations:

  • Constitution ↔ nutrition:

    • Relationship between constitution type and dietary preferences
    • Effect of nutritional status on constitution
    • Personalized diet advice
  • Constitution ↔ exercise:

    • Exercise types suited to each constitution
    • Effect of exercise on improving constitution
  • Constitution ↔ sleep:

    • Relationship between constitution and sleep quality
    • Effect of sleep on constitution
  • Constitution ↔ chronic disease:

    • Diseases each constitution is prone to
    • Relationship between constitution and disease

Output:

  • Correlation coefficient
  • Correlation strength
  • Statistical significance
  • Practical suggestions

5. Personalized recommendations

Generate personalized wellness advice based on constitution type.

Recommendation types:

  • Dietary conditioning:

    • Beneficial-food list
    • Foods to avoid
    • Recommended recipes
    • Dietary principles
  • Lifestyle/daily-routine:

    • Schedule advice
    • Environmental requirements
    • Lifestyle habits
  • Exercise:

    • Recommended exercise types
    • Frequency and intensity
    • Cautions
  • Emotional regulation:

    • Mood management
    • Psychological adjustment
  • Acupoint care:

    • Recommended acupoints
    • Massage methods
    • Moxibustion advice
  • Herbal conditioning:

    • Recommended formulas
    • Formula composition
    • Usage and dosage
    • Cautions

Basis:

  • TCM constitution theory
  • The user's constitution type
  • Seasonal factors
  • The user's health status

Usage

Triggers

Trigger this skill when the user requests:

  • TCM constitution-identification assessment
  • Constitution-type lookup
  • Constitutional-characteristic analysis
  • TCM wellness advice
  • Constitution-trend analysis
  • Correlation analysis between constitution and other health metrics

Execution Steps

Step 1: Determine the analysis scope

Clarify the requested analysis type:

  • Constitution-identification assessment
  • Constitution-characteristic lookup
  • Wellness-advice retrieval
  • Trend analysis
  • Correlation analysis

Step 2: Read data

Primary data sources:

  1. data/constitutions.json - constitution knowledge base
  2. data/constitution-recommendations.json - wellness-advice library
  3. data-example/tcm-constitution-tracker.json - main constitution data
  4. data-example/tcm-constitution-logs/YYYY-MM/YYYY-MM-DD.json - daily assessment records

Related data sources:

  1. data-example/profile.json - basic info
  2. data-example/nutrition-tracker.json - nutrition data
  3. data-example/fitness-tracker.json - exercise data
  4. data-example/sleep-tracker.json - sleep data

Step 3: Data analysis

Run the appropriate algorithm for the analysis type:

Constitution-scoring algorithm:

def calculate_constitution_scores(answers):
    """
    Based on the "Classification and Determination of TCM Constitution" standard

    Formula:
    converted_score = [(raw_score - num_items) / (num_items * 4)] * 100

    where:
    - raw_score = sum of item scores
    - num_items = number of questions for that constitution
    """
    scores = {}
    for constitution, questions in CONSTITUTION_QUESTIONS.items():
        original_score = sum(answers[q] for q in questions)
        question_count = len(questions)
        converted_score = ((original_score - question_count) / (question_count * 4)) * 100
        scores[constitution] = round(converted_score, 1)
    return scores

Constitution-determination algorithm:

def determine_constitution_type(scores):
    """
    Determination logic:
    1. Balanced constitution:
       - Score >= 60
       - All other 8 constitutions score < 40

    2. Biased constitution:
       - The highest-scoring constitution is the result

    3. Compound constitution:
       - If the second-highest constitution scores >= 40,
         it is a compound constitution
    """
    peaceful_score = scores['Balanced']
    other_scores = {k: v for k, v in scores.items() if k != 'Balanced'}

    # Balanced check
    if peaceful_score >= 60 and all(s < 40 for s in other_scores.values()):
        return {
            'primary': 'Balanced',
            'secondary': [],
            'type': 'balanced'
        }

    # Biased constitution
    sorted_scores = sorted(other_scores.items(), key=lambda x: x[1], reverse=True)
    primary = sorted_scores[0][0]

    # Compound check
    secondary = [k for k, v in sorted_scores[1:3] if v >= 40]

    return {
        'primary': primary,
        'secondary': secondary,
        'type': 'compound' if secondary else 'single'
    }

Trend analysis:

  • Linear regression for the trend
  • Moving average to smooth fluctuation
  • Statistical-significance test

Step 4: Generate the report

Output the analysis report in the standard format (see "Output Format").


Output Format

Constitution-identification assessment report

# TCM Constitution Identification Assessment Report

## Assessment date
2025-06-20

## Results

### Constitution-type determination
- **Primary constitution**: Qi-deficiency
- **Compound constitution**: Yang-deficiency
- **Constitution type**: compound

### Scores by constitution

| Constitution | Score | Determination |
|--------------|-------|---------------|
| Qi-deficiency | 78.5 | ⚠️ biased |
| Yang-deficiency | 62.3 | ⚠️ biased |
| Balanced | 42.1 | normal |
| Phlegm-dampness | 38.7 | normal |
| Qi-stagnation | 35.2 | normal |
| Yin-deficiency | 32.1 | normal |
| Damp-heat | 28.4 | normal |
| Blood-stasis | 25.6 | normal |
| Special/allergic | 18.3 | normal |

---

## Constitutional-characteristic analysis

### Qi-deficiency traits

**Physical traits**:
- Flabby muscles
- Easily fatigued
- Low, weak voice
- Prefers quietness, reluctant to talk
- Sweats easily

**Psychological traits**:
- Introverted
- Avoids risk
- Emotionally unstable

**Disease predisposition**:
- Prone to colds
- Prone to visceral prolapse
- Prone to fatigue

**Adaptability**:
- Intolerant of wind, cold, heat, and dampness
- Prone to illness in autumn

### Yang-deficiency traits

**Physical traits**:
- Aversion to cold
- Cold hands and feet
- Prefers warm food and drink

**Psychological traits**:
- Generally calm
- Introverted

**Disease predisposition**:
- Prone to phlegm-fluid retention, swelling, diarrhea
- Susceptible to cold

**Adaptability**:
- Intolerant of cold, tolerant of summer heat
- Prone to illness in winter

---

## Wellness Advice

### Dietary conditioning

**Principle**: tonify Qi and strengthen the spleen; warm and tonify kidney Yang

**Beneficial foods**:
- Qi-tonifying: Chinese yam (Shan Yao), jujube (Da Zao), Astragalus (Huang Qi), ginseng (Ren Shen), Atractylodes (Bai Zhu)
- Yang-warming: mutton, Chinese chives, Sichuan pepper, ginger, longan
- Spleen-strengthening: coix seed (Job's tears), Poria (Fu Ling), hyacinth bean

**Foods to avoid**:
- Raw/cold: ice cream, iced drinks, raw fish
- Greasy/rich: fried foods, fatty meat
- Pungent/dry-hot: chili, Sichuan pepper

**Recommended recipes**:
1. Astragalus stewed chicken
2. Chinese-yam congee
3. Red-date and Poria congee
4. Angelica, ginger, and mutton soup

**Dietary advice**:
- Small, frequent meals; chew slowly
- Eat warm food; avoid raw/cold
- Rest appropriately after meals

### Lifestyle/daily routine

**Schedule advice**:
- Ensure adequate sleep (8+ hours)
- Sleep early, rise later
- Avoid staying up late

**Environmental requirements**:
- Keep the environment warm and dry
- Avoid wind and cold
- Stay warm, especially the lower back/abdomen and feet

**Lifestyle habits**:
- Avoid overexertion
- Balance work and rest
- Get some sun
- Soak feet in warm water

### Exercise

**Principle**: gentle exercise, avoid vigorous activity

**Recommended exercise**:
- Tai Chi
- Baduanjin (Eight Pieces of Brocade)
- Walking
- Qigong
- Yoga

**Exercise advice**:
- Frequency: 1-2 times/day
- Duration: 20-30 minutes each
- Intensity: low to moderate
- Note: keep it to a level that does not cause excessive fatigue

**Cautions**:
- Avoid vigorous exercise
- Rest promptly after exercise
- Progress gradually
- Avoid exercising in cold environments

### Emotional regulation

**Principle**: keep a cheerful mood, avoid overthinking

**Methods**:
- Stay positive and optimistic
- Avoid overthinking
- Take part in social activities
- Learn to relax

**Mood management**:
- Cultivate hobbies
- Maintain social activity
- Learn to regulate emotions

### Acupoint care

**Recommended acupoints**:

#### 1. Zusanli (ST36)
- **Location**: lateral lower leg, 3 cun below the knee eye
- **Benefits**: strengthen the spleen and Qi, strengthen the body
- **Method**: massage 3-5 minutes daily; moxibustion possible

#### 2. Qihai (CV6)
- **Location**: 1.5 cun below the navel
- **Benefits**: tonify original Qi
- **Method**: massage 3-5 minutes daily; moxibustion possible

#### 3. Guanyuan (CV4)
- **Location**: 3 cun below the navel
- **Benefits**: tonify the root, warm and tonify kidney Yang
- **Method**: massage 3-5 minutes daily; moxibustion 10-15 minutes

### Herbal conditioning

⚠️ **Important note**: the following is for a TCM practitioner's reference only; do not self-prescribe or self-medicate

**Recommended formula**: Four Gentlemen Decoction (Sijunzi Tang), with modifications

**Source**: "Formulary of the Bureau of Taiping People's Welfare Pharmacy"

**Composition**:
- Ginseng (Ren Shen): 9-15 g  greatly tonifies original Qi
- Atractylodes (Bai Zhu): 9-12 g  strengthens the spleen and Qi
- Poria (Fu Ling): 9-15 g  strengthens the spleen, drains dampness
- Licorice (Gan Cao): 6-9 g  harmonizes the formula

**Modifications**:
- Severe Qi deficiency: add Astragalus (Huang Qi) 15-30 g
- Spleen deficiency with dampness: add coix seed 15-30 g, hyacinth bean 10-15 g
- Poor appetite with bloating: add tangerine peel (Chen Pi) 6-9 g, Amomum (Sha Ren) 3-6 g

**Usage**: decoct in water, one dose per day, taken warm twice (morning and evening)

**Cautions**:
- ⚠️ Use only after pattern differentiation by a qualified TCM practitioner
- ⚠️ Pregnant women, children, and frail people need practitioner guidance
- ⚠️ Avoid raw/cold, greasy, and pungent food while taking it
- ⚠️ Pause during colds or fever
- ⚠️ Stop and seek care if adverse reactions occur

---

## Seasonal Conditioning Advice

### Spring
- Nourish Yang; follow the rising Qi of spring
- Eat more Chinese chives, spinach, Chinese yam
- Keep a cheerful mood; exercise moderately
- Guard against wind, stay warm

### Summer
- Clear summer heat; nourish the heart-spirit
- Eat more mung bean, winter melon, bitter melon
- Prevent heat; cool down
- Keep a calm mood

### Autumn
- Nourish, gather, and moisten dryness; nourish the lungs
- Eat more tremella (white fungus), lily bulb, pear
- Stay warm, avoid chill
- Keep emotions stable

### Winter
- Focus on storing; warm and tonify kidney Yang
- Eat more mutton, walnuts, chestnuts
- Stay warm, especially the lower back/abdomen
- Sleep early, rise later; avoid overexertion

---

## Correlation with Other Health Metrics

### Constitution and nutrition
- Qi-deficiency, Yang-deficiency: prefer warming, tonifying foods
- Yin-deficiency, Damp-heat: prefer light, bland foods
- Phlegm-dampness: prefer low-fat, low-sugar; control weight

### Constitution and exercise
- Qi-deficiency, Yang-deficiency: mainly gentle exercise
- Damp-heat, Phlegm-dampness: moderately higher intensity
- Yin-deficiency: avoid vigorous exercise

### Constitution and sleep
- Qi-deficiency, Yang-deficiency: ensure adequate sleep
- Yin-deficiency: avoid staying up late
- Qi-stagnation: soothe the liver, relieve stagnation, improve sleep quality

### Constitution and chronic disease
- Phlegm-dampness: prone to hypertension, diabetes, hyperlipidemia
- Damp-heat: prone to metabolic syndrome
- Blood-stasis: prone to cardiovascular disease
- Qi-stagnation: prone to depression and anxiety

---

## Medical Safety Boundaries

⚠️ **Important note**

This analysis is for health reference only and does not constitute a medical diagnosis or treatment advice.

### Scope of analysis

✅ **Can do**:
- TCM constitution-identification assessment
- Constitutional-characteristic analysis
- General wellness advice
- TCM-knowledge education
- Constitution-trend tracking

❌ **Cannot do**:
- Diagnose TCM diseases
- Prescribe herbal formulas
- Replace a TCM practitioner's care
- Perform treatments such as acupuncture
- Manage serious health problems

### Danger-sign detection

Detect the following danger signs during analysis:

1. **Severe constitutional bias**:
   - A single biased constitution scoring > 80
   - Multiple biased constitutions combined

2. **Health-risk flags**:
   - Phlegm-dampness → hypertension, diabetes risk
   - Damp-heat → metabolic-syndrome risk
   - Blood-stasis → cardiovascular-disease risk
   - Qi-stagnation → depression risk

3. **Care-seeking guidance**:
   - Suspected disease symptoms → recommend seeking care
   - Need for herbal treatment → consult a TCM practitioner
   - Conditioning not working → seek professional help

### Recommendation tiers

**Level 1: general advice**
- Based on TCM constitution theory
- For the general population
- No medical supervision needed

**Level 2: informational advice**
- Based on the user's constitution and health status
- Must be combined with personal context
- Consult a TCM practitioner

**Level 3: medical advice**
- Involves herbal conditioning
- Requires a TCM practitioner's confirmation
- Do not self-administer herbs

---

## Data Structure

### Constitution-assessment record

```json
{
  "date": "2025-06-20",
  "questionnaire": {
    "questions": [
      {
        "id": 1,
        "constitution": "Qi-deficiency",
        "question": "Do you get tired easily?",
        "answer": 4,
        "weight": 1.0
      }
    ],
    "total_questions": 60
  },
  "results": {
    "primary_constitution": "Qi-deficiency",
    "secondary_constitutions": ["Yang-deficiency"],
    "constitution_scores": {
      "Balanced": 42.1,
      "Qi-deficiency": 78.5,
      "Yang-deficiency": 62.3,
      "Yin-deficiency": 32.1,
      "Phlegm-dampness": 38.7,
      "Damp-heat": 28.4,
      "Blood-stasis": 25.6,
      "Qi-stagnation": 35.2,
      "Special/allergic": 18.3
    },
    "constitution_type": "compound"
  },
  "characteristics": {
    "physical": ["easily fatigued", "shortness of breath", "spontaneous sweating"],
    "psychological": ["introverted", "reluctant to talk"]
  },
  "recommendations": {
    "diet": {
      "principles": ["tonify Qi and strengthen the spleen", "warm and tonify kidney Yang"],
      "beneficial": ["Chinese yam", "jujube", "Astragalus"],
      "avoid": ["raw/cold foods", "greasy/rich foods"]
    },
    "exercise": "gentle exercise such as Tai Chi and walking",
    "lifestyle": "regular schedule, avoid overexertion",
    "acupoints": ["Zusanli (ST36)", "Qihai (CV6)", "Guanyuan (CV4)"]
  }
}

Reference Resources

TCM constitution theory

  • "Classification and Determination of TCM Constitution" standard
  • Wang Qi's nine-constitution theory
  • "TCM Constitution Theory" textbook

Wellness principles

  • Basic theory of TCM
  • Four-season wellness principles
  • Pattern-differentiation and treatment principles

Herbal formulas

  • "Formulas of Chinese Medicine" textbook
  • "Formulary of the Bureau of Taiping People's Welfare Pharmacy"
  • "Essential Prescriptions from the Golden Cabinet"

Skill version: v1.0 Created: 2026-01-08 Maintainer: MedClawMini

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,679. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.