Have you ever struggled to know how much nutrition you consumed today?
To be honestI never really calculated what I ate each dayI’d order takeouttake a few bitesand move onThat was until my physical exam report came back: fatty liverhigh uric acidvitamin D deficiency… The doctor smiled and said“Young manyou’re basically eating nothing but carbs.” I was stunnedThen I went on a frantic search for various diet tracking appsonly to find that manually entering food and looking up calories was more exhausting than going to work.
LaterI stumbled upon an open-source project called Diet-Agent on a tech forumInsidethere was a skill called meal-log-flow that immediately caught my attentionIt wasn’t the coldimpersonal input boxes you usually see—it records your meals through a conversational interface! For exampleif I say “I had two steamed buns and a bowl of soy milk for breakfast,” it automatically recognizes that the buns are stuffed with pork and green onionsthe soy milk is unsweetenedand then calculates — wowthat breakfast alone is over 400 calorieswith only 12 grams of proteinbut a whopping 60% carbs.
What exactly can this skill do? Let me explain in plain language
Simply putthis skill is your AI nutritionist + recipe recommendation assistantUnder the hoodit uses LangGraph (a framework for building multi-step AI workflows) and MCP (Model Context Protocol) to stitch together the entire dialogue logicEvery time you tell it what you’ve eatenit does a series of things in order:
- Parse natural language: You say “I had Kung Pao Chicken with rice for lunch.” It knows that’s a dish plus a stapleand automatically breaks down the ingredients.
- Query nutritional database: It uses MCP tools to call external APIs (e.gcommon food nutritional composition databases) to calculate caloriesproteinfatscarbsfiberetc.
- Compare with goals: If you set a target upfront (e.g1800 calories per day30% protein)it reminds you how much you still need.
- Recommend recipes: If a certain nutrient is too high or too lowit proactively suggests alternatives—like “You’re low on protein todayconsider adding a steamed fish for dinner.”
And it can even assist with cooking—for instanceif you want to make Fish-Fragrant Shredded Pork but are missing Doubanjiang (bean paste)it tells you to substitute with chopped chili and light soy sauceI tried this feature several timesand surprisinglyit always worked pretty well.
How I installed it? It’s really simple
I’m a programmerbut I was a bit intimidated by these AI toolsafraid of spending ages setting up the environmentBut installing this skill was surprisingly easyJust three steps:
# Step 1: Make sure you have Node.js 18+ and npm
npm --version# Step 2: Add the skill with npx in one command
npx skills add elvaoao/Diet-Agent --skill meal-log-flow# Step 3: Start the interaction
skills run meal-log-flow
Wait about one or two minutesand it will automatically download dependenciesI’m on a Mac; Windows should be similarIf you’re a complete beginneryou might need to install the CLI tool fromfirstbut the official documentation is clear enough to follow.
Some pitfalls I encountered & things to note
After using it for two weekshere are a few things to watch out for:
- Don’t be too colloquial in language: Although it claims to support natural languageif I say “I had that thing—you knowthe cafeteria rice bowl,” it might recognize it as “rice bowl” and default to Fish-Fragrant Shredded Pork rice bowlBetter to be specific: “Braised pork rice bowl with a fried egg.”
- Nutrition data is estimated: After allit’s not a labIt queries public databasesso there’s about a 10% margin of errorFor examplethe amount of oil in Kung Pao Chicken varies greatly between restaurantsso don’t take it too literally—just look at the general trend.
- Manual correction is possible: If you think the nutritional data is offyou can simply say “I think the calorie count for this Kung Pao Chicken is too lowchange it to 600 calories,” and it will updateThat’s very user-friendly.
- Multi-turn conversations can go off track: Once I asked “How much protein am I still missing?” three times in a rowand it inserted a recipe recommendation in the middlecausing confusionI found it best to include context with each questionlike “How much protein am I still missing from the lunch I mentioned?”
Several real-world use cases
Scenario 1: Weight loss check-in
I recorded three meals plus snacks every dayAfter a weekI found my carb ratio was as high as 55% and protein only 15%So the skill recommended many high-proteinlow-carb disheslike “Garlic steamed shrimp” and “Celery stir-fried beef.” I persisted for two weeks and lost 1.5 kg (3 lbs)!
Scenario 2: For my parents
My parents have high blood pressure and diabetesand they are not very tech-savvyI set the skill to dialogue mode and let them voice-input what they ate every day (the mobile version also supports voice)The skill automatically calculates sodium and sugar contentand warns them when it’s too highThey found it novel and got used to it after a few days.
Scenario 3: Planning for a gathering
Friends were coming over for dinner this weekendI asked the skill to design a “healthy banquet” for meIt came up with a menu: cold okrasteamed sea bassvermicelli with baby cabbage in garlic sauceand multigrain riceIt even kindly provided cooking instructions and estimated nutritional values for each dishMy mom praised me for becoming a kitchen wizard.
Some technical details (if you’re interested)
This skill is open-sourcewith the code on GitHubIts core consists of several LangGraph nodes:
- parse_node: Receives user input and extracts food entities using an LLM.
- query_node: Calls MCP tools to query nutritional composition.
- reason_node: Performs logical reasoningcompares with goalsand generates suggestions.
- recommend_node: Generates recipe recommendations.
The whole workflow is a DAG (Directed Acyclic Graph)where each node can be debugged independentlyIf you want to customize it (e.gconnect to your own database)just modify the corresponding tool callsThe project also contains many other skillssuch as “recipe search” and “shopping list generation.” meal-log-flow can integrate with them to form a complete dietary assistant.
A final note
Anywayafter using itI think this thing is far better than many paid apps—freeopen-sourcecustomizable,…