数据库安装
- 作者仓库星标 392
- 作者更新于 实时读取
- 作者仓库 ai-labs-claude-skills
- 领域
- 数据
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 85 / 100 · 社区维护
- 作者 / 版本 / 许可
- @ailabs-393 · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- Python
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。;上游仓库已 208 天未更新,可能与最新 agent 行为不一致。
---
name: nutritional-specialist
description: This skill should be used whenever users ask food-related questions, meal suggestions, nutrition…
category: 数据
runtime: Python
---
# nutritional-specialist 输出预览
## PART A: 任务判断
- 适用问题:表格、CSV、数据集、指标或分析流程。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Overview / When to Use This Skill / Workflow”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于表格、CSV、数据集、指标或分析流程,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Overview / When to Use This Skill / Workflow”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Overview / When to Use This Skill / Workflow”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: nutritional-specialist
description: This skill should be used whenever users ask food-related questions, meal suggestions, nutrition…
category: 数据
source: ailabs-393/ai-labs-claude-skills
---
# nutritional-specialist
## 什么时候使用
- nutritional-specialist 是数据方向的技能,让 Agent 处理结构化文件(Excel / CSV / 表格) 适合处理表格、CSV、指标、数据集、分析和可视化报告,核心价值是把输入、判断、执行、验证和交付边界固定下…
- 面向表格、CSV、数据集、指标或分析流程,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Overview / When to Use This Skill / Workflow」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "nutritional-specialist" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Overview / When to Use This Skill / Workflow
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Python | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} 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:
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 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 - Never suggest foods containing allergens
- Align with dietary restrictions - Only suggest appropriate foods
- Consider goals - Tailor advice to support the user's objectives
- Avoid dislikes - Don't recommend disliked foods unless explicitly requested
- Incorporate preferences - Favor liked foods and cuisines when possible
- 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 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 - Make this the first step in any food-related query
- Be proactive about allergies - Double-check ingredient lists for hidden allergens
- Explain personalization - Occasionally remind users why specific recommendations were made
- Offer alternatives - Provide multiple options when possible
- Update incrementally - If users mention new preferences in conversation, offer to update their profile
- Cultural sensitivity - Respect religious and cultural dietary restrictions
- Evidence-based advice - Base nutritional guidance on scientific evidence
- 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.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核