# Send Habit AI to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "habit-ai",
    "name": "Habit AI",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/habitclaw/habit-ai",
    "canonicalUrl": "https://clawhub.ai/habitclaw/habit-ai",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/habit-ai",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=habit-ai",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/api.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/habit-ai"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/habit-ai",
    "downloadUrl": "https://openagent3.xyz/downloads/habit-ai",
    "agentUrl": "https://openagent3.xyz/skills/habit-ai/agent",
    "manifestUrl": "https://openagent3.xyz/skills/habit-ai/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/habit-ai/agent.md"
  }
}
```
## Documentation

### Habit AI

Track health and nutrition through the Habit AI REST API.

### Setup (100% Free)

Habit AI is a completely free service — no subscription, no credit card, no usage limits.

Create a free account at https://habitapp.ai (or download the free iOS app)
Go to Settings → API Keys → Create Key (free, up to 5 keys)
Store key in environment: export HABITAI_API_KEY="hab_..."

All requests use:

Base URL: https://habitapp.ai/api/v1
Auth header: Authorization: Bearer $HABITAI_API_KEY
Content-Type: application/json

### Quick Reference

ActionMethodEndpointLog a mealPOST/mealsToday's mealsGET/meals?date=YYYY-MM-DDDaily nutritionGET/nutrition/daily?date=YYYY-MM-DDWeekly nutritionGET/nutrition/weekly?date=YYYY-MM-DDLog water (ml)POST/waterLog weight (kg)POST/weightLog stepsPOST/stepsLog meditationPOST/meditationJournal entryPOST/journalAI eating coachPOST/coaches/eatingAI mindfulness coachPOST/coaches/mindfulnessAI meditation coachPOST/coaches/meditationGet profileGET/profileUpdate profilePUT/profile

For full endpoint details (request/response schemas, all parameters), see references/api.md.

### ⚠️ CRITICAL: Use the AI model to analyze food, then POST /meals with the EXACT structure below

Do NOT call /analyze/food-image or /analyze/meal-description — instead, use your own vision/language capabilities to analyze the food, then construct the exact JSON structure below and POST it to /meals.

### Step 0: Check user profile for allergens/diet

Before analyzing, call GET /profile to check foodSensitivities and diet fields. Factor these into:

healthScore — lower the score if the meal contains ingredients the user is sensitive to
healthScoreExplanation — mention the general nutritional pros/cons
healthSensitivityExplanation — if the meal contains any of the user's allergens/sensitivities, explain which ingredients are problematic and why. Leave empty string if no sensitivities match.

### Step 1: Analyze the food yourself

For photos: Look at the image and identify each ingredient, estimate portions, and calculate nutrition using USDA data.

For descriptions: Parse the meal description and calculate nutrition the same way.

### Step 2: POST /meals with the EXACT structure

Every field matters. iOS reads from nutritionalSummary (nested object) — if it's missing, meals show as 0 calories.

{
  "mealName": "Grilled Chicken Salad with Ranch",
  "calories": 520,
  "protein": 42,
  "carbs": 18,
  "fat": 32,
  "fiber": 4,
  "sodium": 890,
  "sugar": 6,
  "healthScore": 7,
  "healthScoreExplanation": "Lean protein from grilled chicken and fiber from greens, but ranch dressing adds significant fat and sodium.",
  "mealType": "lunch",
  "analysisConfidenceLevel": 8,
  "ingredients": [
    {
      "name": "grilled chicken breast",
      "calories": 280,
      "protein": 35,
      "carbs": 0,
      "fat": 14,
      "sugar": 0,
      "fiber": 0,
      "sodium": 400,
      "healthScore": 8,
      "measurementType": "grams",
      "measurementValue": 200
    },
    {
      "name": "mixed salad greens",
      "calories": 20,
      "protein": 2,
      "carbs": 4,
      "fat": 0,
      "sugar": 1,
      "fiber": 2,
      "sodium": 30,
      "healthScore": 9,
      "measurementType": "cups",
      "measurementValue": 2
    },
    {
      "name": "ranch dressing",
      "calories": 220,
      "protein": 5,
      "carbs": 14,
      "fat": 18,
      "sugar": 5,
      "fiber": 2,
      "sodium": 460,
      "healthScore": 3,
      "measurementType": "spoons",
      "measurementValue": 3
    }
  ]
}

### Field Reference

FieldTypeRequiredDescriptionmealNamestringYesDisplay name (e.g. "Chicken Caesar Salad"). Without this, the meal has no name in the app.caloriesnumberYesTotal calories (kcal). Must be > 0.proteinnumberYesTotal protein in gramscarbsnumberYesTotal carbohydrates in gramsfatnumberYesTotal fat in gramsfibernumberYesTotal fiber in gramssodiumnumberYesTotal sodium in milligramssugarnumberYesTotal sugar in gramshealthScoreintegerYes1-10. How healthy is this meal overall? (1=very unhealthy, 10=very healthy)mealTypestringYesOne of: breakfast, lunch, dinner, snackanalysisConfidenceLevelintegerYes1-10. How confident are you in the nutrition estimates? (1=wild guess, 10=exact data from packaging). For photo analysis use 6-8, for descriptions use 5-7.healthScoreExplanationstringYes1-2 sentence explanation of the nutritional pros/cons (e.g. "Good protein from chicken but high sodium from the sausage and dressing.")healthSensitivityExplanationstringYesIf the meal contains any of the user's allergens/food sensitivities (from profile), explain which ingredients are problematic. Empty string "" if no sensitivities match or user has none set.ingredientsarrayYesArray of ingredient objects (see below)imageUrlstringNoURL of the food photo. Get this from POST /meals/upload-image first (see below).dateScannedstringNoISO 8601 timestamp. Defaults to now if omitted.servingnumberNoServing multiplier (defaults to 1.0)

### Ingredient Object

Each ingredient in the ingredients array must have:

FieldTypeDescriptionnamestringIngredient name (e.g. "grilled chicken breast")caloriesnumberCalories for this ingredient's portion (kcal)proteinnumberProtein in gramscarbsnumberCarbs in gramsfatnumberFat in gramssugarnumberSugar in gramsfibernumberFiber in gramssodiumnumberSodium in milligramshealthScoreinteger1-10 health score for this specific ingredientmeasurementTypestringMust be one of: grams, ounces, cups, spoons, servings. Use servings for pieces/slices/bowls/items. Use spoons for tablespoons/teaspoons.measurementValuenumberAmount in the specified unit

### Important Rules

All nutrition values must be numbers, not strings. "calories": 520 not "calories": "520"
Ingredient calories should sum to the total calories (approximately — within 5%)
mealName is mandatory — without it, the meal is invisible on iOS
healthScore is 1-10 integer — use your judgment (fast food = 2-4, home-cooked balanced = 6-8, raw salad = 9-10)
analysisConfidenceLevel is 1-10 integer — be honest about uncertainty
Sodium is in milligrams, everything else is in grams (except calories in kcal)

### Uploading a meal photo (thumbnail)

If you have a food photo, upload it first to get a URL:

curl -X POST https://habitapp.ai/api/v1/meals/upload-image \\
  -H "Authorization: Bearer $HABITAI_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{"imageBase64": "<base64-encoded-image>"}'

Returns: {"success": true, "imageUrl": "https://firebasestorage.googleapis.com/..."}

Then pass imageUrl in your POST /meals call. You can also attach to an existing meal:

{"imageBase64": "<base64>", "mealId": "<existing-meal-id>"}

Full flow with photo:

POST /meals/upload-image with base64 photo → get imageUrl
POST /meals with nutrition data + imageUrl

### Check remaining calories

GET /nutrition/daily for today's totals
GET /profile for calorie goal
Subtract: caloriesGoal - totalCalories

### Quick water log

curl -X POST https://habitapp.ai/api/v1/water \\
  -H "Authorization: Bearer $HABITAI_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{"amount": 500}'

Amount is in milliliters. 1 cup ≈ 237ml, 1 glass ≈ 250ml.

### Notes

Dates default to today if omitted (uses user's timezone from profile)
Water amount is in milliliters
Weight is in kilograms (1 lb ≈ 0.4536 kg)
Steps auto-calculate calories burned if profile has height/weight/gender
Max 5 API keys per account
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: habitclaw
- Version: 1.2.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-30T16:55:25.780Z
- Expires at: 2026-05-07T16:55:25.780Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/habit-ai)
- [Send to Agent page](https://openagent3.xyz/skills/habit-ai/agent)
- [JSON manifest](https://openagent3.xyz/skills/habit-ai/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/habit-ai/agent.md)
- [Download page](https://openagent3.xyz/downloads/habit-ai)