feat(optional-skills): add daily-diary skill - #28616
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for contributing this optional skill. The overall direction fits Hermes’ skill-first extension model, and current main does not already have a daily-diary skill or the #diary-start / #view-diary flows (git grep -n -E 'daily[-_]diary|diary-start|diary_storage_dir|view-diary' origin/main ... returned no matches).
Problems
optional-skills/productivity/daily-diary/SKILL.md:64saysdate +%VyieldsWww, butdate +%Vreturned25in review; paths would become2026-25instead of the documented2026-W25. Use something likedate +%G-W%Vfor ISO week-year correctness.optional-skills/productivity/daily-diary/references/reconfiguration.md:12usesmemory(..., new_content='...'), but current main’s memory tool schema usescontentfor replace (tools/memory_tool.py:666-704).optional-skills/productivity/daily-diary/references/setup.md:57leaves{YYYY-MM-DD}/{YYYY-Www}in the cron prompt, while setup.md:63 only warns to substitute{STORAGE_DIR}. The reminder should compute the date/week at runtime or avoid placeholders.
Suggested changes
- Make ISO week path generation consistent across SKILL.md and all references.
- Fix the memory tool examples to use
contentand replace the full diary config entry. - Rewrite the cron prompt so it checks today’s real file path.
Automated hermes-sweeper review.
| ### Starting an entry (`#diary-start`) | ||
|
|
||
| 1. Read `diary_storage_dir` from your memory block (format: `diary_storage_dir=/path/to/dir`) | ||
| 2. Determine today's ISO week: run `date +%V` → yields `Www` (e.g. `W21`) |
There was a problem hiding this comment.
date +%V returns only the numeric ISO week, e.g. 25, not W25; this will create paths that do not match the documented YYYY-Www layout. Prefer date +%G-W%V or explicitly prepend W and use the ISO week-year.
| 2. 如果 cronjob 存在 → **先删除**(cron prompt 里 hardcode 了路径) | ||
| 3. 询问新目录 | ||
| 4. 如果之前设过提醒时间 → **重新创建** cronjob(见 setup.md Step 5) | ||
| 5. 用 `memory(action='replace', old_text='diary_storage_dir', new_content='...')` 更新 |
There was a problem hiding this comment.
The memory tool does not have a new_content parameter on current main; replace expects the replacement entry in content. This example will fail if the agent follows it literally.
| "action": "create", | ||
| "name": "diary-reminder", | ||
| "schedule": "0 21 * * *", | ||
| "prompt": "Check if today ({YYYY-MM-DD}) has a diary entry.\n\nSteps:\n1. Determine ISO week: `date +\\%V`\n2. Build path: {STORAGE_DIR}/{YYYY-Www}/{YYYY-MM-DD}.md\n3. If file contains \"# {YYYY-MM-DD}\" as a heading → already written. Say NOTHING.\n4. Otherwise → send: \"📝 该写日记啦\"\n\nDiary path: {STORAGE_DIR}\n\nCritical: If entry exists, SILENT exit — do not send any message.", |
There was a problem hiding this comment.
This prompt still contains {YYYY-MM-DD} and {YYYY-Www} placeholders, but the setup instructions only require substituting {STORAGE_DIR}. The cron job should compute today’s date/week at runtime or receive fully concrete values.
Summary
Add a configurable markdown diary system as an optional skill under the productivity category.
Features
#diary-start/#diary-endcommands for recording entries