← Back to Skills Marketplace
leo-zzl

Diet Logger

by Leo-zzl · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
138
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install diet-logger
Description
记录日常饮食并保存到 Obsidian 库。当用户要求记录早饭、午饭、晚饭、加餐、饮食日记或类似的饮食追踪任务时使用。使用 scripts/log_diet.py 脚本确保格式固定一致。
README (SKILL.md)

饮食记录

用于记录日常饮食,保存到 Obsidian 库中,格式完全固定。

使用方法

使用 Python 脚本记录饮食:

python3 ~/.openclaw/workspace/skills/diet-logger/scripts/log_diet.py \
  --date 2026-03-27 \
  --meal 晚饭 \
  --items "红烧肉,米饭"

参数说明

  • --date: 日期 (YYYY-MM-DD),默认为今天
  • --meal: 餐段,可选值:早饭、中饭、晚饭、加餐
  • --items: 食物列表,逗号分隔

示例

# 记录早饭
python3 ~/.openclaw/workspace/skills/diet-logger/scripts/log_diet.py \
  --meal 早饭 --items "鸡蛋,牛奶"

# 记录中饭
python3 ~/.openclaw/workspace/skills/diet-logger/scripts/log_diet.py \
  --meal 中饭 --items "清蒸鲈鱼,炒花菜,米饭"

# 指定日期
python3 ~/.openclaw/workspace/skills/diet-logger/scripts/log_diet.py \
  --date 2026-03-26 --meal 晚饭 --items "面条"

文件格式

生成的文件格式固定如下:

# YYYY-MM-DD 饮食记录

## 早饭
- 鸡蛋
- 牛奶

## 中饭
- 清蒸鲈鱼
- 炒花菜
- 米饭

## 晚饭

## 加餐

---
*记录时间: YYYY-MM-DD HH:MM*

配置信息

保存路径: /mnt/c/Users/loong/iCloudDrive/iCloud~md~obsidian/HomeMo.Art/05-Daily/

文件名格式: 饮食记录-YYYY-MM-DD.md

脚本位置: scripts/log_diet.py

Usage Guidance
This skill appears to do what it says: run a local Python script to append diet entries into a fixed-format Obsidian markdown file. Before installing or using it, check and possibly change the hardcoded VAULT_PATH in scripts/log_diet.py to a path you control (it currently points to /mnt/c/Users/loong/...). Running the script will create/modify files at that location, so ensure you trust that path and have backups if needed. No network calls or secrets are requested, so the main risks are accidental overwrites or writing to the wrong directory — review the script and adjust the path if you want it to target a different vault or make the path configurable.
Capability Analysis
Type: OpenClaw Skill Name: diet-logger Version: 1.0.0 The diet-logger skill is a straightforward utility for recording food intake into Markdown files within an Obsidian vault. The code in scripts/log_diet.py uses standard Python libraries for file I/O and argument parsing, with no evidence of network activity, data exfiltration, or malicious execution. While it contains a hardcoded absolute path for a specific user ('loong'), this is a functional limitation rather than a security risk.
Capability Assessment
Purpose & Capability
Name/description (diet logging to Obsidian) align with the provided script and SKILL.md. The script creates/updates markdown files in an Obsidian-like vault directory, which is exactly what the skill claims to do.
Instruction Scope
Instructions only tell the agent to run the included Python script with date/meal/items arguments. The script performs only local file I/O to create/update a markdown file. Note: the script writes to a hardcoded vault path (/mnt/c/Users/loong/.../05-Daily) which is user-specific and may not exist or be appropriate on other systems—this is a usability/configuration concern but not a malicious action.
Install Mechanism
No install spec; the skill is instruction + single script. No external downloads or package installs are requested.
Credentials
The skill requests no environment variables or credentials. All required inputs are CLI arguments. There are no unrelated secret accesses or config path reads beyond the single hardcoded vault path used for its stated purpose.
Persistence & Privilege
always:false and no changes to other skills or system-wide settings. The script writes files only under the vault path; it does not modify other skills or request elevated privileges.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install diet-logger
  3. After installation, invoke the skill by name or use /diet-logger
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
diet-logger 1.0.0 - Initial release for recording daily meals and saving logs to an Obsidian vault. - Supports logging breakfast, lunch, dinner, and snacks via a Python script (scripts/log_diet.py). - Ensures all outputs are formatted consistently in markdown. - Allows specifying meal type, food items, and date. - Saves logs to a predefined directory with a standard filename.
Metadata
Slug diet-logger
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Diet Logger?

记录日常饮食并保存到 Obsidian 库。当用户要求记录早饭、午饭、晚饭、加餐、饮食日记或类似的饮食追踪任务时使用。使用 scripts/log_diet.py 脚本确保格式固定一致。 It is an AI Agent Skill for Claude Code / OpenClaw, with 138 downloads so far.

How do I install Diet Logger?

Run "/install diet-logger" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Diet Logger free?

Yes, Diet Logger is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Diet Logger support?

Diet Logger is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Diet Logger?

It is built and maintained by Leo-zzl (@leo-zzl); the current version is v1.0.0.

💬 Comments