← 返回 Skills 市场
leo-zzl

Diet Logger

作者 Leo-zzl · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
138
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install diet-logger
功能描述
记录日常饮食并保存到 Obsidian 库。当用户要求记录早饭、午饭、晚饭、加餐、饮食日记或类似的饮食追踪任务时使用。使用 scripts/log_diet.py 脚本确保格式固定一致。
使用说明 (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

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install diet-logger
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /diet-logger 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug diet-logger
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Diet Logger 是什么?

记录日常饮食并保存到 Obsidian 库。当用户要求记录早饭、午饭、晚饭、加餐、饮食日记或类似的饮食追踪任务时使用。使用 scripts/log_diet.py 脚本确保格式固定一致。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 138 次。

如何安装 Diet Logger?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install diet-logger」即可一键安装,无需额外配置。

Diet Logger 是免费的吗?

是的,Diet Logger 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Diet Logger 支持哪些平台?

Diet Logger 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Diet Logger?

由 Leo-zzl(@leo-zzl)开发并维护,当前版本 v1.0.0。

💬 留言讨论