Intro
Setup: Claude API Platform
claude.ai prompt
Version 1 (Interactive Input)
import os
from dotenv import load_dotenv
import anthropic
# Environment Setup
load_dotenv()
client = anthropic.Anthropic(
api_key=os.getenv("ANTHROPIC_API_KEY")
)
def ask_claude(prompt, model="claude-sonnet-4-6"):
response = client.messages.create(
model=model,
max_tokens=300,
messages=[
{"role": "user", "content": prompt}
]
)
return response.content[0].text
# Get input from user (THIS WAS MISSING)
user_input = input("Enter context (e.g. airport food, low protein, 9pm): ")
prompt = f"""
You are a real-time health decision engine.
Context:
{user_input}
Return:
DO THIS:
WHY:
AVOID:
"""
result = ask_claude(prompt)
print("\n" + result)- Run script and respond to input (e.g. “airport food, low protein, 9pm”)
python health_ai.py # REAL-TIME HEALTH DECISION
---
## ✅ DO THIS
**Hunt for eggs, nuts, or Greek yogurt first** — scan every terminal option (Starbucks protein boxes, Wolfgang Puck, even convenience stores). Grab the highest protein item available, even if imperfect. Target **20g+ protein minimum.**
---
## ⚡ WHY
- **9pm eating** = your metabolism is slowing, insulin sensitivity drops at night
- **Low protein now** = muscle breakdown overnight + poor sleep quality
- **Airport carbs alone** will spike blood sugar, crash hard, and disrupt sleep architecture
- Your body needs protein to produce **sleep hormones** (serotonin → melatonin pathway)
- You're likely already stressed/dehydrated from travel — compounding the problem
---
## ❌ AVOID
| Item | Reason |
|------|--------|
| Pizza/pasta | High glycemic, inflammatory, ruins sleep |
| Alcohol | Destroys REM sleep |
| Fast food burgers | Trans fats + excess sodium = inflammation |
| Energy drinks | Caffeine at 9pm = 4am awakening |
| Oversized portions | Digestion competes with sleep |
---
**Bottom line:** Protein + water now.
Version 2 (CLI args)
- Create
health.pyfile
import os
import sys
from dotenv import load_dotenv
import anthropic
load_dotenv()
client = anthropic.Anthropic(
api_key=os.getenv("ANTHROPIC_API_KEY")
)
def ask_claude(prompt, model="claude-sonnet-4-6"):
response = client.messages.create(
model=model,
max_tokens=300,
messages=[
{"role": "user", "content": prompt}
]
)
return response.content[0].text
# 🔥 ONE-LINE INPUT HERE
if len(sys.argv) < 2:
print("Usage: python3 test.py \"your input here\"")
sys.exit(1)
user_input = sys.argv[1]
prompt = f"""
You are a real-time health decision engine.
Context:
{user_input}
Return:
DO THIS:
WHY:
AVOID:
"""
result = ask_claude(prompt)
print("\n" + result)**DO THIS:**
Grab nuts, string cheese, hard-boiled eggs, or a Greek yogurt from a newsstand/café. Add a banana or apple. Drink a full bottle of water now.
**WHY:**
Late eating + low protein = blood sugar spike then crash, poor sleep quality, and muscle breakdown overnight. Your body needs amino acids to repair during sleep. Airport options are carb-heavy by default, which amplifies the problem at 9pm when insulin sensitivity drops.
**AVOID:**
- Pizza, pretzels, chips, or fast food burgers (high refined carbs + bad fats disrupt sleep cycles)
- Alcohol (dehydrates, fragments sleep architecture)
- Large portions of anything (digestion competes with sleep onset)
- Sugary "energy" drinks or juices (cortisol spike at night)
- Skipping eating entirely (hunger wakes you at 2am and tanks morning cognition)



