with one click
daily-close
// Synthesize a day's captures into a prose summary appended to the daily file. Reads log, inbox notes, wiki pages, and hot cache.
// Synthesize a day's captures into a prose summary appended to the daily file. Reads log, inbox notes, wiki pages, and hot cache.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | daily-close |
| description | Synthesize a day's captures into a prose summary. Idempotent; re-run replaces prior summary. |
| allowed-tools | Bash Read Glob Agent |
Synthesize daily/YYYY-MM-DD.md into prose summary with optional follow-ups. Reads day's captures, dated notes/wiki pages, hot.md, index.md. Appends ## Summary (and optional ## Follow-ups). Idempotent.
This skill reads the daily file, dated inbox notes, dated wiki pages, wiki/hot.md, and wiki/index.md, then writes the synthesized result back to the daily file. All operations go through the obsidian CLI: read for reads, properties path=<file> for date-matched frontmatter scans, and create overwrite=true for the atomic synthesis write. See ${CLAUDE_PLUGIN_ROOT}/_shared/cli.md for verb syntax, multiline content= escapes, and the overwrite flag semantics.
See ยง1 Vault path resolution. If no vault is configured, abort with:
No vault configured โ run /wiki init first.
Resolve vault per ยง1 Vault path resolution. Abort with No vault configured โ run /wiki init first. if unresolved.
Parse date argument:
YYYY-MM-DD.YYYY-MM-DD format. Abort with Invalid date: <arg>. Expected YYYY-MM-DD. if not parseable.Cannot close a future date: <date>. if future.Check daily file existence: call obsidian read path=daily/YYYY-MM-DD.md. Treat exit 1 with Error: File "..." not found. as the file-missing branch and abort with No daily file for YYYY-MM-DD. (do not auto-create).
Check for empty day: Scan for content worth synthesizing:
## Captures in the daily file content from step 3.<vault_root>/notes/*.md and call obsidian properties path=notes/<file> per candidate. Match created: YYYY-MM-DD OR updated: YYYY-MM-DD AND status: pending.<vault_root>/wiki/**/*.md and call obsidian properties path=wiki/<file> per candidate. Match created: YYYY-MM-DD OR updated: YYYY-MM-DD. Exclude wiki/hot.md and wiki/index.md (they are always read in full in step 5).Nothing to synthesize for YYYY-MM-DD. (no LLM call fired).Gather synthesis input via a gather agent dispatch.
When there are more than 3 matched files (notes + wiki pages combined), dispatch
agents/gather.md to perform the read sweep off the main thread:
cd "${VAULT_ROOT}" && pwd # verify CWD before agent dispatch
Pass to the gather agent:
FILE_LIST โ newline-separated vault-relative paths: all matched pending notes + all matched
wiki pages from step 4VAULT_ROOT โ $VAULT_ROOTCONTEXT โ daily-close dated sweep for <YYYY-MM-DD>MAX_FILES โ 20Wait for the gather agent to complete. Collect its structured summary.
When there are 3 or fewer matched files, read them inline (no agent needed):
obsidian read path=notes/<file>obsidian read path=wiki/<file>Always read these two inline (they are not passed to the gather agent):
obsidian read path=wiki/hot.md in full.obsidian read path=wiki/index.md in full.Call LLM for synthesis using the prompt template below. Populate {{pending_notes_content_if_any}} and {{wiki_pages_content_if_any}} from either the gather agent's structured summary or the inline reads โ both are equivalent inputs to the synthesis prompt. If the call fails, abort with Synthesis failed: <reason>. and leave the daily file unchanged.
Construct the updated file content in memory:
## Summary section โ append the new section after the last bullet in ## Captures.## Summary section โ remove from the ## Summary heading through any immediately following ## Follow-ups section, stopping at the next level-2 heading that is not ## Follow-ups, or at EOF if none exists; insert the new section in its place. Idempotent.## Summary followed by prose, then optional ## Follow-ups with bulleted items (omit the heading and bullets entirely when no follow-ups).updated: in the frontmatter to today's date (the close-run date, even when closing a past day).Atomic write back via the CLI:
obsidian create \
path=daily/YYYY-MM-DD.md \
overwrite=true \
content="<full updated file content with \n escapes>"
The overwrite flag replaces the file in one operation; the wrapper keeps Obsidian's index consistent. If the call returns non-zero, abort with the wrapper's error and leave the daily file unchanged (the upstream CLI either succeeds atomically or reports an error before mutating).
Confirm with exactly one line:
Closed daily/YYYY-MM-DD.md (N follow-ups)
Omit the (N follow-ups) suffix entirely when there are none:
Closed daily/YYYY-MM-DD.md
Do not print the synthesis prose, the input context, the reasoning, or any other output. One line only.
You are synthesizing a daily capture log for {{ date }}.
## Daily Captures
{{ daily_file_content }}
## Related Activity
### Pending Notes
{{ pending_notes_content_if_any }}
### Wiki Pages Updated on {{ date }}
{{ wiki_pages_content_if_any }}
## Context
### Hot Cache
{{ hot_md_content }}
### Wiki Index
{{ index_md_content }}
## Task
Write a prose summary (1โ3 paragraphs) of the day's key insights, decisions, and progress. Then, optionally, add a `## Follow-ups` section with bulleted actionable items.
**Requirements:**
- Prose only in the main body; bullets only in `## Follow-ups`.
- Use Obsidian wikilinks (`[[Page title]]` or `[[wiki/path/to/page|alias]]`) to reference any pages mentioned in the input context. Only link pages that are present above; do not invent pages that don't exist.
- If there are no follow-ups, omit the `## Follow-ups` section entirely.
Output only the prose and optional section headers/bullets. Do not include the input summaries.
| Condition | Abort message |
|---|---|
| No vault configured | No vault configured โ run /wiki init first. |
| Invalid date format | Invalid date: <arg>. Expected YYYY-MM-DD. |
| Future date | Cannot close a future date: <date>. |
| Daily file not found | No daily file for YYYY-MM-DD. |
| Nothing to synthesize | Nothing to synthesize for YYYY-MM-DD. |
| LLM synthesis fails | Synthesis failed: <reason>. โ daily file left unchanged |
| File write fails | filesystem error โ daily file left in pre-close state (atomic write) |
Close today (no argument):
user> /daily-close
# Synthesizes daily/2026-04-27.md
assistant> Closed daily/2026-04-27.md (3 follow-ups)
Close a past date:
user> /daily-close 2026-04-20
# Closes daily/2026-04-20.md; updated: bumped to today (2026-04-27)
assistant> Closed daily/2026-04-20.md
Re-run (replaces prior summary):
user> /daily-close
# prior ## Summary section removed and replaced
assistant> Closed daily/2026-04-27.md (1 follow-up)
Empty day (no captures, no related activity):
user> /daily-close 2026-04-15
assistant> Nothing to synthesize for 2026-04-15.
File does not exist:
user> /daily-close 2026-03-01
assistant> No daily file for 2026-03-01.
Future date:
user> /daily-close 2026-05-01
assistant> Cannot close a future date: 2026-05-01.
Invalid date format:
user> /daily-close next Monday
assistant> Invalid date: next Monday. Expected YYYY-MM-DD.