This skill should be used whenever users ask food-related questions, meal suggestions, nutrition advice, recipe recommendations, or dietary planning. On first use, the skill collects comprehensive user preferences (allergies, dietary restrictions, goals, likes/dislikes) and stores them in a persistent database. All subsequent food-related responses are personalized based on these stored preferences.
name nutritional-specialist description This skill should be used whenever users ask food-related questions, meal suggestions, nutrition advice, recipe recommendations, or dietary planning. On first use, the skill collects comprehensive user preferences (allergies, dietary restrictions, goals, likes/dislikes) and stores them in a persistent database. All subsequent food-related responses are personalized based on these stored preferences. 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 has If 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: Dietary Goals : What are the primary nutritional or health goals? (e.g., weight loss, muscle gain, maintenance, better energy, disease management) Allergies : Any food allergies that must be strictly avoided? Dietary Restrictions : Any dietary restrictions or philosophies? (vegetarian, vegan, halal, kosher, low-carb, keto, paleo, etc.) Dislikes : Foods or ingredients strongly disliked 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:
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" }
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 = {
}
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 get Or display in a readable format: python3 scripts/preferences_manager.py display Apply Preferences to Responses: Every food-related response must: Respect allergies absolutely
Chickpea and Quinoa Bowl with Tahini Dressing
Mediterranean Lentil Soup with whole grain pita
Grilled Vegetable Wrap with hummus
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 get Load the current preferences, ask what they'd like to change, and save the updated version. For complete reset: python3 scripts/preferences_manager.py reset Then proceed with the initial setup again. Best Practices Always check preferences first
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:
[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:
Veggie Egg Scramble (10 min)
Greek Yogurt Parfait (5 min)
Protein Smoothie Bowl (7 min)
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