From duncans-daily-notes
Generate today's daily note in the Obsidian vault with carry-forward from the previous day's wrap-up tasks. Use when the user wants to create a daily note, start their day, or invokes /daily-note.
How this skill is triggered — by the user, by Claude, or both
Slash command
/duncans-daily-notes:daily-noteThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a daily note at `$OBSIDIAN_VAULT/daily-notes/YYYY-MM-DD.md`.
Generate a daily note at $OBSIDIAN_VAULT/daily-notes/YYYY-MM-DD.md.
This skill reads the vault path from the OBSIDIAN_VAULT environment variable. If unset, ask the user to export it before continuing. Example:
export OBSIDIAN_VAULT="$HOME/obsidian-notes"
Throughout this document, $VAULT refers to the value of that variable. Substitute it when building file paths.
Two scripts feed this skill automatically — you do not run them, but you read what they produce:
scripts/obsidian-extract.sh (shipped in this plugin) — fires via Stop hook after every Claude session. Writes per-session structured JSON (decisions, learnings, research, project_updates, open_questions) to ~/.claude/obsidian-staging/YYYY-MM-DD/SESSION_ID.json.scripts/obsidian-synthesize.sh (shipped in this plugin) — runs via cron at 22:00 daily. Reads all dated staging dirs, writes into the vault (daily notes, project/research notes), commits+pushes (if the vault is a git repo), then deletes staging on success.Implication: when the skill runs mid-day, ~/.claude/obsidian-staging/YYYY-MM-DD/ contains today's session extractions that have not yet been synthesized. Use them as the source of truth for the Work Log / Notes / Wrap-up sections. A missing or empty dir means no sessions have ended yet today.
obsidian:obsidian-markdown skill before generating content to ensure correct Obsidian syntax.Use the current date from system context. Format as YYYY-MM-DD.
Use Glob to check for $VAULT/daily-notes/YYYY-MM-DD.md (substituting today's date).
$VAULT/daily-notes/YYYY-MM-DD.md", then continue to step 3 so you can merge in any new staged extractions produced since the note was last written. Preserve the user's existing hand-written content; only add new items. Skip to step 7 (merge instead of overwrite).Search for the most recent daily note before today:
$VAULT/daily-notes/YESTERDAY.md.Read the previous daily note found in step 3. Parse it to find the ## Wrap-up section.
Extract all unchecked task lines from the Wrap-up section only:
- [ ] followed by any text- [x])## heading or end of fileIf the Wrap-up section is empty or has no unchecked tasks, proceed with no carry-forward items.
Check ~/.claude/obsidian-staging/YYYY-MM-DD/ (today's date).
*.json files: no context to fold in — proceed to step 6 with no extracted items.SESSION_ID.json in that dir. Each file has fields: working_directory, branch, decisions[], learnings[], research[], project_updates[], open_questions[].Also check ~/.claude/obsidian-staging/YESTERDAY/ (the previous day's staging dir). If it still exists, yesterday's 22:00 synthesis did not run or did not succeed — include those sessions too, since that content would otherwise be lost.
Collate across all the JSON files you read:
project_updates by working_directory (or a combined working_directory + branch if the same repo has multiple branches in play). Each group becomes an H3 subsection; each update is a bullet under it. Promote noteworthy items from decisions into the same subsections when they describe concrete changes.learnings and non-obvious decisions (rationale, gotchas, root causes) as plain bullets. Skip trivia.open_questions into unchecked tasks (- [ ] ). Merge with anything obvious from decisions marked as deferred.research items and a logical fit exists, add a bullet under Notes; otherwise rely on obsidian-synthesize.sh to route them to research/ notes in the vault.Skip 0-byte files and any file where jq -e '.decisions' fails — those are failed extractions.
Build the daily note using this template. Replace YYYY-MM-DD with today's actual date. Omit sections that would be empty (e.g., no ## Notes if there are no learnings worth surfacing) — but always keep ## Plan, ## Work Log, ## Wrap-up.
---
date: YYYY-MM-DD
tags:
- daily-note
---
## Plan
{each carry-forward item from step 4 on its own line, preserving the `- [ ] ` prefix}
- [ ]
## Work Log
{H3 subsections grouped by working_directory / branch, with project_update bullets}
## Notes
{bullets from learnings + noteworthy decisions}
## Wrap-up
{open_questions as `- [ ] ` items}
- [ ]
If there are no carry-forward items AND no staged extractions, fall back to the empty-section template (just the four headings with a single blank - [ ] under Plan and Wrap-up).
Write this content to $VAULT/daily-notes/YYYY-MM-DD.md using the Write tool.
If step 2 found an existing note, do NOT overwrite. Instead:
H3 subsection (create it if missing). Append new Notes bullets under ## Notes. Append new Wrap-up items under ## Wrap-up.Tell the user: "Created today's daily note at $VAULT/daily-notes/YYYY-MM-DD.md." (or "Updated" if merged).
If items were carried forward from a previous day, list them under:
"Carried forward from $VAULT/daily-notes/PREV-DATE.md:"
If staged extractions were folded in, summarize briefly:
"Folded in N session extractions from ~/.claude/obsidian-staging/YYYY-MM-DD/."
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub duncanfinney/duncans-daily-notes --plugin duncans-daily-notes