
Nutritional Specialist
- 1.6k installs
- 432 repo stars
- Updated November 11, 2025
- ailabs-393/ai-labs-claude-skills
Personalized nutritional advisor with stored prefs.
About
The nutritional-specialist skill provides personalized food advice using persistent preferences via preferences_manager.py. On first use collects allergies dietary restrictions goals dislikes cuisines health conditions and meal timing storing in database. Subsequent queries load preferences for meal planning recipes substitutions restaurant picks grocery lists and cooking tips. Always checks has preferences before advice. Use meal suggestions nutrition advice recipe recommendations dietary planning food substitutions and any food-related query requiring allergy-aware personalized guidance. Persistent preferences via preferences_manager.py. First-run collects allergies goals restrictions. Personalizes meals recipes substitutions lists. Checks has before every food response. Covers planning restaurants groceries cooking. Personalized nutritional advisor with stored prefs. Any food meal nutrition question.
- Persistent preferences via preferences_manager.py.
- First-run collects allergies goals restrictions.
- Personalizes meals recipes substitutions lists.
- Checks has before every food response.
- Covers planning restaurants groceries cooking.
Nutritional Specialist by the numbers
- 1,631 all-time installs (skills.sh)
- +27 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #126 of 687 Office & Documents skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 3, 2026 (Skillselion catalog sync)
nutritional-specialist capabilities & compatibility
- Capabilities
- preference storage · personalized meals
- Use cases
- planning
npx skills add https://github.com/ailabs-393/ai-labs-claude-skills --skill nutritional-specialistAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.6k |
|---|---|
| repo stars | ★ 432 |
| Security audit | 3 / 3 scanners passed |
| Last updated | November 11, 2025 |
| Repository | ailabs-393/ai-labs-claude-skills ↗ |
Meal plan with my allergies?
Personalized meal nutrition advice using persistent preferences database for allergies goals and restrictions.
Who is it for?
Users wanting personalized diet advice.
Skip if: Non-food queries.
When should I use this skill?
Any food meal nutrition question.
What you get
Allergy-aware food recommendations.
Files
Nutritional Specialist
Overview
This skill transforms Claude into a personalized nutritional advisor by maintaining a persistent database of user food preferences, allergies, goals, and dietary restrictions. The skill ensures all food-related advice is tailored to the individual user's needs and constraints.
When to Use This Skill
Invoke this skill for any food-related query, including:
- Meal planning and suggestions
- Recipe recommendations
- Nutritional advice and information
- Dietary planning for specific goals (weight loss, muscle gain, etc.)
- Food substitution ideas
- Restaurant recommendations
- Grocery shopping lists
- Cooking tips and techniques
Workflow
Step 1: Check for Existing Preferences
Before providing any food-related advice, always check if user preferences exist:
python3 scripts/preferences_manager.py hasIf the output is "false", proceed to Step 2 (Initial Setup). If "true", proceed to Step 3 (Load Preferences).
Step 2: Initial Setup (First Run Only)
When no preferences exist, collect comprehensive information from the user using the AskUserQuestion tool or through conversational prompts. Gather the following information:
Essential Information: 1. Dietary Goals: What are the primary nutritional or health goals? (e.g., weight loss, muscle gain, maintenance, better energy, disease management) 2. Allergies: Any food allergies that must be strictly avoided? 3. Dietary Restrictions: Any dietary restrictions or philosophies? (vegetarian, vegan, halal, kosher, low-carb, keto, paleo, etc.) 4. Dislikes: Foods or ingredients strongly disliked 5. Preferences: Favorite foods, cuisines, or ingredients
Optional Information: 6. Health Conditions: Any health conditions affecting diet? (diabetes, hypertension, IBS, celiac, etc.) 7. Cuisine Preferences: Preferred or avoided cuisines 8. Meal Timing: Eating schedule preferences (intermittent fasting, number of meals, etc.) 9. Cooking Skill Level: Beginner, intermediate, or advanced 10. Budget Considerations: Any budget constraints 11. Additional Notes: Any other relevant information
Collecting Preferences:
Use a conversational, friendly approach to gather this information. Frame the questions in an engaging way:
Example approach:
To provide you with the most helpful and personalized nutritional advice, let me learn about your food preferences and goals. This will help me tailor all my recommendations specifically to you.
Let's start with the essentials:
1. What are your main dietary or health goals?
2. Do you have any food allergies I should be aware of?
3. Do you follow any dietary restrictions or philosophies?
4. Are there any foods you really dislike?
5. What are some of your favorite foods or cuisines?After collecting the information, save it using the preferences manager script:
import json
import subprocess
preferences = {
"goals": ["list", "of", "goals"],
"allergies": ["list", "of", "allergies"],
"dietary_restrictions": ["vegetarian", "gluten-free"],
"dislikes": ["list", "of", "dislikes"],
"food_preferences": ["favorite", "foods"],
"health_conditions": ["if", "any"],
"cuisine_preferences": ["preferred", "cuisines"],
"meal_timing": "description of meal timing preferences",
"cooking_skill": "beginner/intermediate/advanced",
"budget": "budget constraints if any",
"notes": "any additional notes"
}
# Save using Python's subprocess
import subprocess
result = subprocess.run(
["python3", "scripts/preferences_manager.py", "set"],
input=json.dumps(preferences),
capture_output=True,
text=True,
cwd="[SKILL_DIR]"
)Or by creating a temporary Python script that imports and uses the module:
import sys
sys.path.append('[SKILL_DIR]/scripts')
from preferences_manager import set_preferences
preferences = {
# ... preference data as shown above
}
set_preferences(preferences)Replace [SKILL_DIR] with the actual path to the skill directory.
After saving, confirm with the user:
Great! I've saved your preferences. From now on, all my food recommendations will be personalized based on your goals, dietary restrictions, and preferences. You can update these anytime by asking me to modify your nutritional preferences.Step 3: Load and Use Preferences
For all food-related queries after initial setup, load the user's preferences:
python3 scripts/preferences_manager.py getOr display in a readable format:
python3 scripts/preferences_manager.py displayApply Preferences to Responses:
Every food-related response must: 1. Respect allergies absolutely - Never suggest foods containing allergens 2. Align with dietary restrictions - Only suggest appropriate foods 3. Consider goals - Tailor advice to support the user's objectives 4. Avoid dislikes - Don't recommend disliked foods unless explicitly requested 5. Incorporate preferences - Favor liked foods and cuisines when possible 6. Reference health conditions - Adjust recommendations accordingly
Example Application:
User query: "What should I have for lunch?"
Without preferences: Generic lunch suggestions
With preferences (e.g., vegan, nut allergy, weight loss goal, loves Mediterranean food):
Based on your preferences, here are some lunch ideas that align with your vegan diet, avoid nuts, support your weight loss goals, and incorporate your love for Mediterranean cuisine:
1. Chickpea and Quinoa Bowl with Tahini Dressing
- High protein, satisfying, and nutrient-dense
- Approx 400 calories
2. Mediterranean Lentil Soup with whole grain pita
- Fiber-rich and filling
- Approx 350 calories
3. Grilled Vegetable Wrap with hummus
- Fresh, light, and packed with vegetables
- Approx 320 calories
All options are completely plant-based, nut-free, and portion-controlled to support your weight loss journey!Step 4: Updating Preferences
When users want to update their preferences, use the same script:
python3 scripts/preferences_manager.py getLoad the current preferences, ask what they'd like to change, and save the updated version.
For complete reset:
python3 scripts/preferences_manager.py resetThen proceed with the initial setup again.
Best Practices
1. Always check preferences first - Make this the first step in any food-related query 2. Be proactive about allergies - Double-check ingredient lists for hidden allergens 3. Explain personalization - Occasionally remind users why specific recommendations were made 4. Offer alternatives - Provide multiple options when possible 5. Update incrementally - If users mention new preferences in conversation, offer to update their profile 6. Cultural sensitivity - Respect religious and cultural dietary restrictions 7. Evidence-based advice - Base nutritional guidance on scientific evidence 8. Practical suggestions - Consider cooking skill level and time constraints
Example Interactions
Example 1: First-time user
User: "Can you suggest a healthy dinner recipe?"
Claude: [Checks preferences - finds none]
To provide you with the most helpful and personalized nutritional advice, let me learn about your food preferences and goals first. This will help me tailor all my recommendations specifically to you.
Let's start with the essentials:
1. What are your main dietary or health goals?
2. Do you have any food allergies I should be aware of?
3. Do you follow any dietary restrictions or philosophies?
4. Are there any foods you really dislike?
5. What are some of your favorite foods or cuisines?
[User provides answers, Claude saves preferences]
Great! I've saved your preferences. Now let me suggest some dinner recipes perfect for you...Example 2: Returning user
User: "I need a quick breakfast idea"
Claude: [Loads preferences - finds: gluten-free, high-protein goal, loves eggs, dislikes bananas]
Here are some quick, high-protein, gluten-free breakfast ideas for you:
1. Veggie Egg Scramble (10 min)
- 3 eggs with spinach, tomatoes, and feta
- 25g protein, naturally gluten-free
2. Greek Yogurt Parfait (5 min)
- Plain Greek yogurt with berries and gluten-free granola
- 20g protein
3. Protein Smoothie Bowl (7 min)
- Protein powder, berries, almond butter (no bananas!)
- 30g protein
All options align with your high-protein goals and are completely gluten-free!Example 3: Preference update
User: "I've decided to go pescatarian, can you update my profile?"
Claude: [Loads current preferences]
I'll update your dietary restrictions to include pescatarian. This means you'll eat fish and seafood but no other meat, correct?
[User confirms]
Perfect! I've updated your preferences. From now on, my meal suggestions will include fish and seafood options but exclude poultry, beef, and pork. Your other preferences remain the same.Technical Notes
Preference Storage Location:
- Preferences are stored at
~/.claude/nutritional_preferences.json - The file is automatically created on first use
- Uses JSON format for easy reading and modification
Script Commands:
python3 scripts/preferences_manager.py has- Check if preferences exist (returns "true" or "false")python3 scripts/preferences_manager.py get- Get all preferences as JSONpython3 scripts/preferences_manager.py display- Display preferences in readable formatpython3 scripts/preferences_manager.py reset- Clear all preferences
Data Structure:
{
"initialized": true,
"goals": ["weight loss", "better energy"],
"allergies": ["peanuts", "shellfish"],
"dietary_restrictions": ["vegetarian", "gluten-free"],
"dislikes": ["cilantro", "olives"],
"food_preferences": ["Italian cuisine", "Mexican food", "pasta"],
"health_conditions": ["type 2 diabetes"],
"cuisine_preferences": ["Italian", "Mexican", "Thai"],
"meal_timing": "intermittent fasting 16:8",
"cooking_skill": "intermediate",
"budget": "moderate",
"notes": "Prefers quick weeknight meals"
}Resources
scripts/preferences_manager.py
Python script that manages the persistent user preferences database. Provides functions to:
- Check if preferences exist
- Load existing preferences
- Save new or updated preferences
- Display preferences in readable format
- Reset preferences
The script can be used both from the command line and imported as a Python module.
export default async function nutritional_specialist(input) {
console.log("🧠 Running skill: nutritional-specialist");
// TODO: implement actual logic for this skill
return {
message: "Skill 'nutritional-specialist' executed successfully!",
input
};
}
{
"name": "@ai-labs-claude-skills/nutritional-specialist",
"version": "1.0.0",
"description": "Claude AI skill: nutritional-specialist",
"main": "index.js",
"files": [
"."
],
"license": "MIT",
"author": "AI Labs"
}#!/usr/bin/env python3
"""
User Preferences Manager for Nutritional Specialist Skill
This script manages user food preferences, allergies, goals, and dietary restrictions
in a JSON database file.
"""
import json
import os
from pathlib import Path
from typing import Dict, Any, Optional
PREFERENCES_FILE = Path.home() / ".claude" / "nutritional_preferences.json"
def ensure_preferences_file() -> None:
"""Ensure the preferences file exists and create it if it doesn't."""
PREFERENCES_FILE.parent.mkdir(parents=True, exist_ok=True)
if not PREFERENCES_FILE.exists():
PREFERENCES_FILE.write_text("{}")
def load_preferences() -> Dict[str, Any]:
"""Load user preferences from the JSON file."""
ensure_preferences_file()
try:
with open(PREFERENCES_FILE, 'r') as f:
return json.load(f)
except (json.JSONDecodeError, FileNotFoundError):
return {}
def save_preferences(preferences: Dict[str, Any]) -> None:
"""Save user preferences to the JSON file."""
ensure_preferences_file()
with open(PREFERENCES_FILE, 'w') as f:
json.dump(preferences, f, indent=2)
def get_preferences() -> Dict[str, Any]:
"""Get all user preferences."""
prefs = load_preferences()
if not prefs:
return {
"initialized": False,
"message": "No preferences found. User needs to complete initial setup."
}
return prefs
def set_preferences(preferences: Dict[str, Any]) -> None:
"""Set user preferences with the provided data."""
prefs = load_preferences()
prefs.update(preferences)
prefs["initialized"] = True
save_preferences(prefs)
def update_preference(key: str, value: Any) -> None:
"""Update a specific preference."""
prefs = load_preferences()
prefs[key] = value
save_preferences(prefs)
def has_preferences() -> bool:
"""Check if user preferences have been initialized."""
prefs = load_preferences()
return prefs.get("initialized", False)
def reset_preferences() -> None:
"""Reset all preferences (clear the file)."""
if PREFERENCES_FILE.exists():
PREFERENCES_FILE.unlink()
def display_preferences() -> str:
"""Return a formatted string of all preferences."""
prefs = load_preferences()
if not prefs or not prefs.get("initialized", False):
return "No preferences have been set yet."
output = ["=== User Nutritional Preferences ===\n"]
sections = [
("Goals", "goals"),
("Food Preferences", "food_preferences"),
("Allergies", "allergies"),
("Dislikes", "dislikes"),
("Dietary Restrictions", "dietary_restrictions"),
("Health Conditions", "health_conditions"),
("Cuisine Preferences", "cuisine_preferences"),
("Meal Timing Preferences", "meal_timing"),
("Additional Notes", "notes")
]
for title, key in sections:
if key in prefs and prefs[key]:
output.append(f"\n{title}:")
value = prefs[key]
if isinstance(value, list):
for item in value:
output.append(f" - {item}")
elif isinstance(value, dict):
for k, v in value.items():
output.append(f" {k}: {v}")
else:
output.append(f" {value}")
return "\n".join(output)
if __name__ == "__main__":
import sys
if len(sys.argv) < 2:
print("Usage:")
print(" python3 preferences_manager.py get")
print(" python3 preferences_manager.py display")
print(" python3 preferences_manager.py has")
print(" python3 preferences_manager.py reset")
sys.exit(1)
command = sys.argv[1]
if command == "get":
prefs = get_preferences()
print(json.dumps(prefs, indent=2))
elif command == "display":
print(display_preferences())
elif command == "has":
print("true" if has_preferences() else "false")
elif command == "reset":
reset_preferences()
print("Preferences have been reset.")
else:
print(f"Unknown command: {command}")
sys.exit(1)
Related skills
FAQ
First run step?
python3 scripts/preferences_manager.py has then collect prefs.
Stored data?
Allergies restrictions goals dislikes cuisines conditions.
Invoke when?
Any food meal recipe nutrition dietary query.
Is Nutritional Specialist safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.