← Back to Skills Marketplace
421zuoduan

LifeLog

by Cui Ruochen · GitHub ↗ · v1.2.4 · MIT-0
cross-platform ⚠ suspicious
691
Downloads
0
Stars
0
Active Installs
8
Versions
Install in OpenClaw
/install lifelog
Description
生活记录自动化系统。自动识别消息中的日期(今天/昨天/前天/具体日期),使用 SubAgent 智能判断,记录到 Notion 对应日期,每次都是**追加记录**而非覆盖。 适用于:(1) 用户分享日常生活点滴时自动记录;(2) 定时自动汇总分析并填充情绪、事件、位置、人员字段
README (SKILL.md)

LifeLog 生活记录系统

自动将用户的日常生活记录到 Notion,支持智能日期识别和自动汇总分析。

⚠️ 必需凭据

使用本技能前,必须设置以下环境变量:

export NOTION_KEY="your-notion-integration-token"
export NOTION_DATABASE_ID="your-notion-database-id"

获取方式:

  1. 访问 https://www.notion.so/my-integrations 创建 Integration
  2. 获取 Internal Integration Token
  3. 创建 Database 并 Share 给 Integration
  4. 从 URL 中提取 Database ID

LifeLog 生活记录系统

自动将用户的日常生活记录到 Notion,支持智能日期识别和自动汇总分析。

核心功能

  1. 实时记录 - 用户分享生活点滴时自动记录到 Notion
  2. 智能日期识别(SubAgent) - 使用 AI SubAgent 智能判断日期,优先分析文本中的日期关键词,其次分析上下文
  3. 追加记录 - 每次都是追加到 Notion 指定日期的记录中,绝不覆盖
  4. 自动汇总 - 每天凌晨自动运行 LLM 分析,生成情绪状态、主要事件、位置、人员

Notion 数据库要求

创建 Notion Database,需包含以下字段(全部为 rich_text 类型):

字段名 类型 说明
日期 title 日期,如 2026-02-22
原文 rich_text 原始记录内容
情绪状态 rich_text LLM 分析后的情绪描述
主要事件 rich_text LLM 分析后的事件描述
位置 rich_text 地点列表
人员 rich_text 涉及的人员

记录流程

每条消息的处理步骤

  1. 用户发送生活记录消息
  2. 立即调用 SubAgent 判断日期 - 分析消息中的日期关键词(今天/昨天/前天/具体日期)和上下文,输出判断的日期(YYYY-MM-DD)
  3. 调用 lifelog-append.sh "消息内容" "判断的日期" → 追加到 Notion 指定日期
  4. 如果指定日期已有记录,则追加内容到该日期的原文字段中

SubAgent 日期判断 Prompt

分析以下用户消息,判断它描述的是哪个日期的生活记录。

消息内容:「用户消息原文」

请输出:
1. 判断的日期(格式:YYYY-MM-DD)
2. 判断依据(简单说明)

只输出这两项,不要多余内容。

脚本用法

# 追加记录到指定日期(SubAgent 判断日期后调用)
bash lifelog-append.sh "消息内容" "YYYY-MM-DD"

注意:脚本第二个参数为日期,不传则默认为今天。每条记录都是追加而非覆盖。

2. lifelog-daily-summary-v5.sh

拉取指定日期的原文,用于 LLM 分析:

# 拉取昨天
bash lifelog-daily-summary-v5.sh

# 拉取指定日期
bash lifelog-daily-summary-v5.sh 2026-02-22

输出格式:

PAGE_ID=xxx
---原文开始---
原文内容
---原文结束---

3. lifelog-update.sh

将 LLM 分析结果写回 Notion:

bash lifelog-update.sh "\x3Cpage_id>" "\x3C情绪状态>" "\x3C主要事件>" "\x3C位置>" "\x3C人员>"

配置步骤

  1. 创建 Notion Integration 并获取 API Key
  2. 创建 Database 并共享给 Integration
  3. 获取 Database ID(URL 中提取)
  4. 设置环境变量:
export NOTION_KEY="your-notion-integration-token"
export NOTION_DATABASE_ID="your-database-id"

定时任务(可选)

每天凌晨 5 点自动汇总昨天数据:

openclaw cron add \
  --name "LifeLog-每日汇总" \
  --cron "0 5 * * *" \
  --tz "Asia/Shanghai" \
  --session isolated \
  --message "运行 LifeLog 每日汇总" \
  --delivery-mode announce \
  --channel qqbot \
  --to "\x3C用户ID>"

工作流

  1. 用户发送生活记录 → 调用 SubAgent 判断日期 → 调用 lifelog-append.sh追加到 Notion
  2. 定时任务触发 → 调用 lifelog-daily-summary-v5.sh → 拉取原文
  3. LLM 分析原文 → 调用 lifelog-update.sh → 填充分析字段
Usage Guidance
This skill appears to do what it says (append life messages to a Notion DB) but you should review and decide before installing: 1) Manifest mismatch: the repository metadata omitted environment requirements while SKILL.md and scripts require NOTION_KEY and NOTION_DATABASE_ID — expect to supply Notion credentials. 2) Inspect scripts before running: they call the Notion API and may read /root/.openclaw/workspace/docs/lifelog-spec.md (a local agent workspace path). If that file exists it could reveal workspace-specific content — ensure it doesn't contain sensitive data. 3) SubAgent/local agent call: lifelog-append.sh contains code to POST message text to http://localhost:421/api/sessions (OpenClaw subagent). If you enable that path, your message text will be sent to your local OpenClaw runtime (which in turn may call remote models depending on its configuration). Only enable this if you trust your local agent environment. 4) Do not hardcode secrets into scripts: prefer exporting NOTION_KEY and NOTION_DATABASE_ID as environment variables rather than editing scripts' placeholder fields. 5) If privacy is a concern, run the scripts in an isolated session, review/modify them to remove unused remote/local calls, and verify that scheduled cron jobs are only created intentionally. If you want, provide the exact lines you plan to run and I can walk through potential data flows step-by-step.
Capability Analysis
Type: OpenClaw Skill Name: lifelog Version: 1.2.4 The lifelog skill bundle automates recording user messages to Notion but contains significant shell injection vulnerabilities. In scripts like 'lifelog-append.sh' and 'lifelog-recorder.sh', user-provided content is directly interpolated into shell commands and JSON payloads for both the local OpenClaw SubAgent API and the Notion API. The use of fragile 'sed' commands for escaping and the lack of robust input sanitization create a high risk of command injection if the agent processes untrusted or specially crafted input. While the behavior is aligned with the stated purpose and no clear evidence of intentional malice was found, the coding patterns are highly insecure.
Capability Assessment
Purpose & Capability
The skill's name/description (log life events to Notion) matches the included scripts which call the Notion API. However the registry metadata at the top of the package lists no required environment variables while SKILL.md and the scripts clearly require NOTION_KEY and NOTION_DATABASE_ID — an inconsistency in the manifest. The Notion credential requirement itself is proportionate to the stated purpose.
Instruction Scope
SKILL.md instructs the agent to run the provided shell scripts which: (a) send user message content to Notion (expected), (b) may call a local OpenClaw subagent endpoint (http://localhost:421/api/sessions) with the raw message to decide dates (this will transmit message content to whatever the local subagent does), and (c) read a spec file at /root/.openclaw/workspace/docs/lifelog-spec.md if present. The subagent call is present in the code (decide_date_with_subagent) albeit not used by default; it would send entire message text to the local OpenClaw runtime and so could result in the message being forwarded to remote models depending on local configuration. Reading /root/.openclaw/... expands scope to agent workspace files which may hold sensitive data. SKILL.md's cron examples and use of openclaw cron are expected for scheduled operation but will create persistent scheduled execution if the user enables them.
Install Mechanism
There is no automated install spec (no external downloads or package installs). All code is present as shell scripts in the repo. This is lower risk than a download+execute installer, but it means the provided scripts will run locally and should be reviewed.
Credentials
The only required secrets in SKILL.md and the scripts are Notion credentials (NOTION_KEY and NOTION_DATABASE_ID), which are appropriate for a Notion-integrating logger. Caveats: some scripts contain placeholder configuration sections where users might be instructed to hardcode secrets (lifelog-daily-summary-v5.sh and lifelog-update.sh show NOTION_KEY/DATABASE_ID placeholders). Hardcoding keys into scripts is insecure — environment variables are safer. Also the registry metadata's omission of required env vars is inconsistent and could mislead users or automated permission checks.
Persistence & Privilege
The skill is not forced-always, does not request system-wide privileges, and does not modify other skills. The only persistence implied is optional scheduling via openclaw cron, which is user-controlled. The scripts do read an agent workspace path but do not attempt to modify other skills or system-wide agent configuration.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lifelog
  3. After installation, invoke the skill by name or use /lifelog
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.2.4
明确每次都是追加记录,SubAgent判断日期,支持指定日期参数
v1.2.3
- 新增:明确要求设置 NOTION_KEY 和 NOTION_DATABASE_ID 两个必需环境变量,更新了说明文档。 - 说明文档中增加了凭据获取和配置环境变量的详细步骤。 - SKILL.md 格式和结构优化,提升可读性和易用性。 - 未涉及脚本主要逻辑调整,仅文档和凭据相关增强。
v1.2.2
- lifelog-append.sh 现在由 Agent 侧预先调用 SubAgent 智能判断日期,脚本可以接收日期参数,支持外部传入分析好的日期。 - 更新文档,明确日期判断和传参流程由 Agent+SubAgent 配合完成,脚本本身不再负责智能日期识别。 - 保持原有 daily-summary 和 update 脚本接口不变。
v1.2.1
lifelog 1.2.1 Changelog - 文档 (SKILL.md) 版本号更新为 1.2.1,内容与上一版一致。 - 其余脚本和说明无重大变动。
v1.2.0
LifeLog 1.2.0 introduces smarter date recognition using SubAgent: - 使用 AI SubAgent 进行智能日期判断,能分析更丰富的上下文和关键词。 - 优先识别消息中的日期关键词,无关键词时自动判断上下文。 - "补录"逻辑、自动汇总分析等功能不变,帮助更准确记录生活点滴。 - SKILL.md 文档同步更新说明与用法,反映 SubAgent 新特性。
v1.1.0
修复: 函数未调用、Notion字段类型错误、grep检测逻辑
v1.0.1
更新README和配置说明
v1.0.0
初始版本
Metadata
Slug lifelog
Version 1.2.4
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 8
Frequently Asked Questions

What is LifeLog?

生活记录自动化系统。自动识别消息中的日期(今天/昨天/前天/具体日期),使用 SubAgent 智能判断,记录到 Notion 对应日期,每次都是**追加记录**而非覆盖。 适用于:(1) 用户分享日常生活点滴时自动记录;(2) 定时自动汇总分析并填充情绪、事件、位置、人员字段. It is an AI Agent Skill for Claude Code / OpenClaw, with 691 downloads so far.

How do I install LifeLog?

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

Is LifeLog free?

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

Which platforms does LifeLog support?

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

Who created LifeLog?

It is built and maintained by Cui Ruochen (@421zuoduan); the current version is v1.2.4.

💬 Comments