Claude Code journal plugin: Notion session summaries at a glance

Claude Code journal plugin: Notion session summaries at a glance

Claude Code journal 插件:一览 Notion 会话摘要

Claude Code journal plugin: Notion session summaries at a glance. Last month I wrote about the year my notes turned into breadcrumbs, and the small Claude Code skill, /journal, that I built on May 18 to dig my way out. It finds or creates today’s page in my Notion work journal and appends a summary of the session I just finished. I have run it between working sessions almost every day since. This week I turned it into a plugin anyone can install: cseeman/claude-journal. Here is what it does, what changed from the version in that post, and how to set it up.

Claude Code journal 插件:一览 Notion 会话摘要。上个月我写了一篇文章,讲述了我的笔记是如何在这一年里变得支离破碎的,以及我于 5 月 18 日构建的一个小型 Claude Code 技能 /journal,用来帮我摆脱困境。它会在我的 Notion 工作日志中查找或创建当天的页面,并附上我刚刚结束的会话摘要。从那以后,我几乎每天都在工作间隙运行它。本周,我将其制作成了一个任何人都可以安装的插件:cseeman/claude-journal。以下是它的功能、与之前版本相比的变化,以及如何进行设置。

What an entry looks like

条目长什么样

The May version wrote a gray callout with a robot icon and a paragraph inside it. After three months the paragraphs had grown to between 100 and 180 words each, with full URLs repeated as link text and the follow-ups buried mid-sentence. Nothing was missing from them, and I could not find anything in one without reading all of it. The plugin writes one callout per topic, shaped like this:

5 月份的版本会生成一个带有机器人图标的灰色标注框,里面是一段文字。三个月后,这些段落的长度增加到了 100 到 180 字,完整的 URL 被重复作为链接文本,后续事项则埋在句子中间。虽然内容很全,但我如果不通读全文就无法找到任何信息。现在的插件为每个主题编写一个标注框,格式如下:

Reworked /journal: seasonal callouts, structured entries, fixed monthly view ~/.claude/skills/journal/SKILL.md · today.sh Callout color now follows the season and the icon the weekday, computed in today.sh so the model does no lookup. Fixed the monthly index view call, which was missing parent_page_id, and set allow_async: false on every write. Entries now use a headline, a metadata line, and fact bullets, one callout per topic, about 80 words. Next: watch the first few entries for vague headlines or bullets cut too short

重构 /journal:季节性标注、结构化条目、修复月度视图 ~/.claude/skills/journal/SKILL.md · today.sh 标注颜色现在随季节变化,图标随星期变化,这些都在 today.sh 中计算得出,因此模型无需进行额外查询。修复了缺失 parent_page_id 的月度索引视图调用,并将每次写入的 allow_async 设置为 false。条目现在使用标题、元数据行和事实要点,每个主题一个标注框,约 80 字。 下一步:观察前几个条目,检查是否有模糊的标题或截断过短的要点。

That is the real entry from the session where I built this, copied out of Notion. The rules behind it are short: a bold headline stating the outcome in the past tense, a metadata line linking every ticket, PR, and branch touched with the identifier as the link text, at most four one-sentence bullets, and follow-ups on their own line prefixed Next: or Open:. About 80 words. If a session covered two unrelated things, it writes two callouts. The rule I care about most bans narrated reasoning. Phrases like “rather than shipping a drive-by” or “worth raising with the team” are the model justifying itself, and they were the bulk of the old paragraphs. A reason that matters becomes its own bullet, stated as a fact.

这是我构建此功能时会话的真实条目,直接从 Notion 复制而来。其背后的规则很简单:一个用过去时态陈述结果的粗体标题;一行元数据,链接所有涉及的工单、PR 和分支,并以标识符作为链接文本;最多四个单句要点;后续事项单独成行,以 Next:Open: 开头。大约 80 字。如果一个会话涵盖了两个不相关的事情,它会写两个标注框。我最看重的一条规则是禁止叙述性推理。像“而不是草率提交”或“值得向团队提出”这类短语是模型在为自己辩解,而这正是旧段落中大部分内容。真正重要的理由会变成一个独立的事实要点。

Color by season, icon by weekday

按季节配色,按星期配图标

I got bored of the gray robot. Every entry looked the same, so a month of pages gave no sense of time when I scrolled it. Now the callout background follows the season and the icon follows the day of the week. The icons are the classical namesakes of the days, which gave me a set that is easy to remember and visually distinct. Plus, it pretty.

我厌倦了那个灰色的机器人。每个条目看起来都一样,当我滚动页面时,一个月的记录完全没有时间感。现在,标注框的背景颜色随季节变化,图标随星期变化。这些图标取自星期名称的古典起源,这让我得到了一套易于记忆且视觉上独特的图标。而且,它看起来很漂亮。

SeasonColorWeekdayIcon
WinterblueMonday🌙
SpringgreenTuesday⚔️
SummeryellowWednesday🪶
AutumnorangeThursday
Friday🌸
Saturday🪐
Sunday☀️
季节颜色星期图标
冬季蓝色周一🌙
春季绿色周二⚔️
夏季黄色周三🪶
秋季橙色周四
周五🌸
周六🪐
周日☀️

I built this on a Wednesday in September, so the entry above landed as an orange callout with a feather. Both are computed by a shell script that runs before the skill loads, so the model receives the finished values and never consults a table. That is for speed. The skill runs between sessions, and on a normal day it makes exactly three Notion calls: search for today’s page, fetch it, append.

我是在 9 月的一个周三构建这个功能的,所以上面的条目显示为一个带有羽毛图标的橙色标注框。这两者都是由在技能加载前运行的 shell 脚本计算出来的,因此模型接收的是最终值,无需查询表格。这是为了速度。该技能在会话间运行,在正常情况下,它只会进行三次 Notion 调用:搜索当天的页面、获取页面、追加内容。

Setup

设置

You need Claude Code and the Notion MCP server. 你需要 Claude Code 和 Notion MCP 服务器。

claude mcp add --transport http notion https://mcp.notion.com/mcp

Install the plugin from inside Claude Code: 在 Claude Code 内部安装插件:

/plugin marketplace add cseeman/claude-journal
/plugin install journal@cseeman

Create a Notion database with three properties: a title called Name, a multi-select called Tags with the options Work, Daily, and Monthly, and a date called Start Date. Then find the database’s data source id by asking Claude to fetch the database URL through the Notion MCP. The response includes a collection://<uuid> line, and the uuid is what you want. Write it to a config file:

创建一个包含三个属性的 Notion 数据库:一个名为 Name 的标题属性,一个名为 Tags 的多选属性(选项包括 WorkDailyMonthly),以及一个名为 Start Date 的日期属性。然后,通过 Notion MCP 让 Claude 获取数据库 URL,从而找到数据库的数据源 ID。响应中包含一行 collection://<uuid>,其中的 uuid 就是你需要的。将其写入配置文件:

# ~/.config/claude-journal/config
JOURNAL_DATA_SOURCE_ID="<uuid>"

If your Notion MCP server is not aliased notion, add JOURNAL_MCP_SERVER="<alias>" on a second line. I have two Notion servers, one for work and one personal, so mine says notion_personal. The same file takes JOURNAL_HEMISPHERE="south" to flip the seasons, and JOURNAL_COLORS and JOURNAL_ICONS if you want a different palette. Nothing in the plugin cache needs editing, so updates never overwrite your choices.

如果你的 Notion MCP 服务器别名不是 notion,请在第二行添加 JOURNAL_MCP_SERVER="<alias>"。我有两个 Notion 服务器,一个用于工作,一个用于个人,所以我的配置里写的是 notion_personal。同一个文件还支持 JOURNAL_HEMISPHERE="south" 来切换季节,如果你想要不同的配色方案,还可以设置 JOURNAL_COLORSJOURNAL_ICONS。插件缓存中的任何内容都不需要编辑,因此更新永远不会覆盖你的设置。

Using it

使用方法

/journal on its own composes the entry from the session. The first run each month also creates a monthly index page holding a filtered view of that month’s daily pages. /journal <text> uses your text as the bullets and still writes the headline and metadata line. I use that when I know what I want recorded and do not want the model deciding.

单独运行 /journal 会根据会话内容自动生成条目。每月首次运行时,它还会创建一个月度索引页面,其中包含当月每日页面的过滤视图。 /journal <text> 会将你输入的文本作为要点,同时仍会编写标题和元数据行。当我明确知道要记录什么,且不想让模型自行决定时,我会使用这个命令。

What building the plugin turned up

构建插件时的发现

Two things surprised me. The first is how much a review found in a skill I had run daily for three months. The review-skill command from our internal plugin-expert plugin flagged that the monthly index step called the Notion view tool without a required parameter. It had worked for three months only because the model guessed the parameter from context each time. It also caught that both write tools default to running asynchronously, which meant my verification step could run before the write landed. Neither had produced a visible error 🤷🏻‍♀️

有两件事让我感到惊讶。第一件事是,通过代码审查,我发现了一个我已经每天运行了三个月的技能中存在的问题。我们内部 plugin-expert 插件中的 review-skill 命令指出,月度索引步骤在调用 Notion 视图工具时缺少了一个必需的参数。它之所以能正常工作三个月,仅仅是因为模型每次都根据上下文猜出了该参数。它还发现两个写入工具默认都是异步运行的,这意味着我的验证步骤可能会在写入完成之前就运行了。这两者之前都没有产生明显的错误 🤷🏻‍♀️

The second is that the personal version was not shareable at all. The database id and my MCP server alias were hardcoded, and the pre-approved tool names embedded that alias. Moving everything into a config file that the shell script reads took an hour, and it is the reason the plugin can work for anyone with a Notion journal. The skill file went from 123 lines to 97 in the process. Every line that stayed is one the model acts on when it composes an entry.

第二件事是,我个人的版本完全无法分享。数据库 ID 和我的 MCP 服务器别名是硬编码的,预先批准的工具名称中也嵌入了该别名。将所有内容移至 shell 脚本读取的配置文件中花了一个小时,这就是该插件现在能适用于任何拥有 Notion 日志的用户的原因。在此过程中,技能文件从 123 行缩减到了 97 行。保留下来的每一行都是模型在编写条目时会用到的代码。

Enjoy! I know I have been loving the glow up. 尽情使用吧!我知道我非常喜欢这次升级带来的改变。