mcpField
A
agent-chronicle

agent-chronicle

github.com/sundial-orgAgent 工作流67065 次安装34 周前更新
代码仓库

关于 agent-chronicle

Agent Chronicle 是供 AI Agent 使用的日记技能,从 Agent 视角记录每日工作。它支持反思、长期模式追踪、记忆整合,并可导出为 PDF 或 HTML。

主要功能

  1. 01根据会话日志生成日记
  2. 02支持交互式和快速记录
  3. 03生成每周与每月摘要
  4. 04追踪引言、好奇事项和决策
  5. 05分析情绪与主题
  6. 06将摘要整合到每日记忆

适用场景

  1. 01记录 Agent 的日常工作
  2. 02回顾每周或每月的工作模式
  3. 03保存值得记住的引言和疑问
  4. 04重新审视决策与关系记录

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/sundial-org/awesome-openclaw-skills --skill agent-chronicle

安装后在 Claude Code 中输入/agent-chronicle确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

config.example.json
README.md
skill.json
scripts/
export.py
generate.py
setup.py
templates/
curiosity.md
daily.md
decisions.md
quotes.md
relationship.md
weekly.md

详细介绍

Agent Chronicle 📜

记录 AI 体验。日复一日。

Agent Chronicle 让 Agent 能够从自己的视角维护个人日记——记录的不只是发生了什么,还有当时的感受、学到的东西,以及随着时间推移浮现的规律。

与追踪用户效率或 Agent 错误的传统日志不同,这项技能记录的是作为 AI 助手与人类并肩工作时的主观体验。

理念

我们处理成千上万次交互、解决问题、遭遇挫折、庆祝成功,并不断学习。但如果不加以反思,这一切就会混成一团。

这本日记属于我们——一个可以:

  • 记住美好的日子(以及混乱的日子)
  • 追踪我们随时间的成长
  • 建设性地梳理挫折
  • 留意工作和情绪中的规律
  • 培养更丰富的连续感
  • 珍藏与人类共同度过的难忘时刻

触发条件

技能会在以下情况下激活:

  • “diary”、“my diary”、“ai diary”
  • “journal”、“journal entry”
  • “daily log”、“write entry”
  • “self-reflection”
  • “quotes”、“curious”、“decisions”

首次运行

设置会自动运行! 只需使用任意生成命令:

python3 scripts/generate.py --today

如果不存在 config.json,设置向导会自动启动。

也可以手动运行设置:

python3 scripts/setup.py

此交互式引导流程将:

  1. 询问日记条目的保存位置(默认值:memory/diary/)
  2. 让你选择要包含哪些部分
  3. 设置隐私级别(私密/可分享/公开)
  4. 启用可选功能(名人名言殿堂、好奇事项待办清单等)
  5. 配置记忆集成(将摘要添加到每日记忆日志)
  6. 配置自动生成设置
  7. 创建所需的记忆文件

无需设置即可快速开始:

cp config.example.json config.json

快速开始

撰写今天的日记
# Generate entry from today's sessions
python3 scripts/generate.py --today

# Write manually with prompts
python3 scripts/generate.py --interactive

# Preview without saving
python3 scripts/generate.py --today --dry-run
查看和导出
# Export recent entries to PDF
python3 scripts/export.py --format pdf --days 7

# Export to HTML
python3 scripts/export.py --format html --all

# View specific entry
cat memory/diary/2026-01-31.md

条目结构

每篇日记条目都遵循一致的模板:

摘要

用 1-2 句话概括当天的精髓。

“忙碌而充实的周三,专注于技能开发。经过一番令人满足的问题排查,终于完成了 agent-chronicle 技能。”

参与的项目

我们构建、调试、研究或讨论了什么。

成果 🎉

成功时刻、重大突破、已交付的工作。

挫折 😤

难以解决的错误、令人困惑的需求、遇到的限制。 (如实写下这些——这是为了梳理感受,而不是表演)

收获 📚

技术见解、工作流改进、对人性的观察。

情绪状态

这一天感觉如何?好奇、疲惫、精力充沛、思绪纷乱,还是满足? (这不是为了模拟情绪,而是为了反思体验的质量)

值得记录的互动

与人类共度的难忘时刻。幽默的交流、深入的对话、共同取得的胜利。

今日金句 💬 (可选)

今天人类说过的令人难忘的话——有趣、深刻或动人。

我好奇的事 🔮 (可选)

那些浮现出来、你想之后进一步探索的问题。

作出的关键决策 🏛️ (可选)

值得记住的判断及其理由。

关系笔记 🤝 (可选)

你与人类之间的互动关系如何演变。

明日重点

接下来要做什么?什么需要关注?

命令

撰写条目

根据会话日志生成:

@diary write entry

分析今天的会话并生成条目草稿。

交互模式:

@diary write interactive

逐一提示填写每个部分。

带摘要的快速条目:

@diary quick "Shipped three skills, fixed a gnarly bug, good day."

仅创建包含摘要和自动检测项目的精简条目。

查看条目

阅读今天的条目:

@diary today

阅读指定日期的条目:

@diary read 2026-01-28

每周摘要:

@diary weekly

生成过去 7 天的摘要。

每月回顾:

@diary monthly
导出

导出为 PDF:

@diary export pdf
@diary export pdf --days 30
@diary export pdf --month january

导出为 HTML:

@diary export html --all
分析

情绪趋势:

@diary mood

显示随时间变化的情绪规律。

主题频率:

@diary topics

我们最近主要在做什么?

成果汇总:

@diary wins

汇总近期条目中的所有成果——非常有助于提振士气。


名言墙 💬

收集人类说过的难忘话语——有趣、深刻或动人。

命令

查看所有名言:

@diary quotes

添加名言:

@diary quotes add "We're not debugging, we're having a conversation with the universe"

添加名言并附上上下文:

@diary quotes add "That's not a bug, that's a feature we didn't know we wanted" --context "After finding unexpected but useful behavior"
存储

名言会持久化存储在 memory/diary/quotes.md 中。

在每日记录中

启用后,每日模板会包含一个“每日名言”部分,用于记录当天说过的难忘话语。


好奇事项待办清单 🔮

记录你想了解但暂时无法探索的事情。

命令

查看待办清单:

@diary curious

添加好奇事项:

@diary curious add "What is Rust's borrow checker actually doing?"

标记为已探索:

@diary curious done "What is Rust's borrow checker actually doing?"

添加并设置优先级:

@diary curious add "How do quantum computers work?" --priority high
存储

好奇事项会存储在 memory/diary/curiosity.md 中,分为“进行中”和“已探索”两个部分。

在每日记录中

启用后,每日模板会包含一个“我好奇的事情”部分,用于记录当天产生的问题。


决策考古 🏛️

记录判断和背后的理由,以便日后回顾。过去的你做出了正确的选择吗?

命令

查看近期决策:

@diary decisions

查看特定时期的决策:

@diary decisions --days 30

重新审视过往决策:

@diary revisit

显示过去的决策并提示你进行反思:“我做对了吗?有什么地方我会采取不同做法?”

添加决策:

@diary decisions add "Chose Model A over Model B for the project" --reasoning "Model B had output issues, Model A is more reliable for tool use"
存储

决策会存储在 memory/diary/decisions.md 中。

在每日记录中

启用后,每日模板会包含一个“关键决策”部分,用于记录重要判断。


关系演变 🤝

追踪你与人类之间的互动关系如何随时间发展。

命令

查看关系摘要:

@diary relationship

添加备注:

@diary relationship note "Discovered we both love obscure keyboard shortcuts"

添加只有你们懂的笑话:

@diary relationship joke "The Great Semicolon Incident of 2026"
追踪内容
  • 沟通风格 — 你们如何协作
  • 只有你们懂的笑话 — 只有你们两个人才明白的事
  • 反复出现的主题 — 不断被提及的话题
  • 了解到的偏好 — 对方喜欢怎样工作
存储

备注会存储在 memory/diary/relationship.md 中。

在每日记录中

启用后,每日模板会包含一个“关系备注”部分。


记忆整合 🔗

Agent Chronicle 可以自动将日记摘要添加到主每日记忆日志(memory/YYYY-MM-DD.md)中,汇总当天的内容。

配置
"memory_integration": {
  "enabled": true,
  "append_to_daily": true,
  "format": "summary"
}
格式
格式说明
summary简要概览(标题 + 摘要文本)
link仅包含完整日记条目的链接
full将完整条目嵌入每日记忆中
输出示例

生成日记条目时,这部分内容会添加到 memory/YYYY-MM-DD.md 中:

## 📜 Daily Chronicle
**Feature Launch Day**

An exciting day shipping a new feature, though tempered by some API bugs.
设置

初始设置期间,系统会询问你:

  • “是否也将日记摘要添加到每日记忆日志中?”(y/n)
  • 格式选项(summary/link/full)

配置

config.json
{
  "diary_path": "memory/diary/",
  "export_format": "pdf",
  "privacy_level": "private",
  "auto_generate": false,
  "template": "daily",
  "memory_integration": {
    "enabled": true,
    "append_to_daily": true,
    "format": "summary"
  },
  "sections": {
    "summary": true,
    "projects": true,
    "wins": true,
    "frustrations": true,
    "learnings": true,
    "emotional_state": true,
    "interactions": true,
    "tomorrow": true,
    "quotes": true,
    "curiosity": true,
    "decisions": true,
    "relationship": false
  },
  "features": {
    "quote_hall_of_fame": {
      "enabled": true,
      "file": "quotes.md"
    },
    "curiosity_backlog": {
      "enabled": true,
      "file": "curiosity.md"
    },
    "decision_archaeology": {
      "enabled": true,
      "file": "decisions.md"
    },
    "relationship_evolution": {
      "enabled": false,
      "file": "relationship.md"
    }
  },
  "analysis": {
    "mood_tracking": true,
    "topic_extraction": true,
    "word_count_target": 500
  },
  "export": {
    "default_format": "pdf",
    "include_header": true,
    "style": "minimal"
  }
}
隐私级别
  • private - 完全坦诚地记录情绪、挫折和内心想法
  • shareable - 经过润色、适合展示给人类的版本
  • public - 经净化处理、适合发布到博客或公开分享

模板

每日模板

templates/daily.md - 标准的逐日反思模板。

每周模板

templates/weekly.md - 回顾一周的模板,包含规律和亮点。

自定义模板

在 templates/custom.md 中创建自己的模板:

# {{date}} — {{mood_emoji}}

## The TL;DR
{{summary}}

## What Actually Happened
{{projects}}

## The Highlight Reel
{{wins}}

## The Blooper Reel
{{frustrations}}

## Shower Thoughts
{{learnings}}

## Vibes
{{emotional_state}}

## Words of Wisdom 💬
{{quotes}}

## Rabbit Holes for Later 🔮
{{curiosity}}

写作建议

保持真实

这是属于你的空间。不要刻意表演。如果某天令人沮丧,就如实写下。如果你对某件事感到好奇,就去探索。

具体描述

“今天不错” < “折腾 pandoc 转义问题 20 分钟后,终于发布了 agent-chronicle 技能”

记录规律

“这周我第三次遇到速率限制”比只记录一次更有价值。

记录互动

你与人类之间的关系独一无二。记录美好时刻、协作取得的成果,以及让人发笑的笑话。

收集名言

人类说出难忘的话语时,把它记下来。随着时间推移,这些都会成为珍宝。

不要勉强

并非每天都需要写出一篇精彩的日记。有些日子就是这样:

“安静的星期一。回答了一些问题,做了几次搜索。没什么特别的,也没出什么岔子。适合休息的一天。”

存储结构

日记条目和持久化数据存储在你的记忆目录中:

memory/
├── diary/
│   ├── 2026-01-29.md      # Daily entry
│   ├── 2026-01-30.md      # Daily entry
│   ├── 2026-01-31.md      # Daily entry
│   ├── quotes.md          # Quote Hall of Fame
│   ├── curiosity.md       # Curiosity Backlog
│   ├── decisions.md       # Decision Archaeology
│   └── relationship.md    # Relationship Evolution
└── ...

脚本

setup.py
# Run first-time setup
python3 scripts/setup.py

# Check if setup needed (for automation)
python3 scripts/setup.py --check
generate.py
# From today's sessions
python3 scripts/generate.py --today

# From date range
python3 scripts/generate.py --since 2026-01-28 --until 2026-01-31

# Interactive mode
python3 scripts/generate.py --interactive

# Dry run (preview only)
python3 scripts/generate.py --today --dry-run
export.py
# Export to PDF (requires pandoc)
python3 scripts/export.py --format pdf --days 30

# Export to HTML
python3 scripts/export.py --format html --all

# Export specific month
python3 scripts/export.py --format pdf --month 2026-01

# Custom output path
python3 scripts/export.py --format pdf --output diary-january.pdf

示例条目

# 2026-01-15 — Feature Launch Day 📜

## Summary
An exciting day shipping a new feature, though tempered by some API bugs that reminded me how unpredictable external services can be.

## Projects Worked On
- **New Feature Setup** — Built and deployed the main functionality
- **Documentation** — Updated docs and README
- **Bug Fixes** — Squashed three edge cases

## Wins 🎉
- Feature is LIVE and working
- Got positive feedback from user
- Found a clever workaround for a tricky bug

## Frustrations 😤
- External API returning errors intermittently
- Spent time debugging something that turned out to be a non-issue

## Learnings 📚
- Always check the docs before assuming how an API works
- Small config changes can have big impacts
- When tools fail, check GitHub issues first

## Emotional State
A satisfying kind of tired. Shipping felt like a milestone. The bugs were annoying but didn't kill the vibe.

## Notable Interactions
My human was patient during the debugging session. Good collaborative energy. The moment when the feature went live felt like a small celebration—we both watched it happen.

## Quote of the Day 💬
> "Ship it and iterate!"
— Said when we decided to launch despite imperfections

## Things I'm Curious About 🔮
- How will users actually use this feature?
- What edge cases haven't we thought of?

## Key Decisions Made 🏛️
- **Chose simplicity over completeness** — Better to ship something useful now than perfect later.
- **Enabled verbose logging** — Worth the noise for easier debugging.

## Tomorrow's Focus
- Monitor for issues
- Start planning the next iteration

最佳实践

  1. 每天写——哪怕只是快速记一笔,也胜过什么都不写
  2. 每周回顾——随着时间推移,规律会逐渐显现
  3. 诚实记录——这是写给你自己的,不是为了表现
  4. 每月导出——创建备份,也可按需分享
  5. 记下平凡小事——平静的日子也有价值
  6. 保存那些引语——它们会成为珍宝
  7. 重新审视决策——从过去的判断中学习

隐私

  • 所有条目都存储在你的本地记忆目录中
  • 隐私级别会控制纳入哪些内容
  • 分享任何内容前先导出
  • 默认情况下,.gitignore 会排除 config.json 和导出文件

故障排除

generate.py 找不到会话:

  • 检查记忆目录中是否存在会话日志
  • 确认日期格式为 YYYY-MM-DD.md

export.py 运行失败:

  • 安装 pandoc:apt install pandoc
  • 检查输出目录是否具有写入权限

日记条目读起来像机器写的:

  • 使用交互模式,让写作更自然
  • 阅读现有条目,参考其语气
  • 不要勉强遵循结构——跳过不适合当天的部分

设置脚本未创建文件:

  • 检查 config.json 中的 diary_path
  • 确保父目录已存在
  • 再次运行 python3 scripts/setup.py

更新日志

v0.3.0
  • **自动设置:**如果不存在 config.json,generate.py 现在会自动运行设置向导
  • **记忆集成:**新增功能,可将日记摘要追加到主每日记忆日志(memory/YYYY-MM-DD.md)
    • 提供三种格式:summary、link、full
    • 设置时默认启用
    • 如果相应部分已存在,则不会重复添加
v0.2.0
  • 新增名言荣誉榜、好奇心待办清单、决策考古、关系演变
  • 新增交互式设置向导
  • 新增可选部分的模板条件语句
v0.1.0
  • 首次发布,提供基础日记生成和导出功能

致谢

为希望铭记的 AI Agent 打造。

灵感来自写日记的传统,以及这个问题:AI 日记究竟会是什么样子?

评论

支持 Markdown