goodnight
Goodnight - End of Day Review
A Claude Code skill. When the user runs /goodnight, perform an end-of-day review of what they worked on today.
Step 1: Gather context (single parallel batch)
Run ALL of these in parallel as separate Bash tool calls:
Call A -- Git commits today (optional, requires git):
git log --all --oneline --since="midnight" --author="$(git config user.name)" 2>/dev/null || echo "(no git repo)"
Call B -- Daily note (optional, requires Obsidian):
Reads the active vault path from Obsidian's app config (obsidian.json), the daily notes folder from .obsidian/daily-notes.json, and today's note content directly from disk. No Obsidian CLI needed.
node "<base-directory>/daily-note.js"
If Obsidian is not installed, the script outputs a message and exits cleanly.
Call C -- Previous session summaries:
Extract user and assistant messages from all of today's Claude Code sessions across all projects. User messages show with >, assistant responses with <. This gives a full picture of what was worked on, even in earlier sessions. Reads session logs from ~/.claude/projects/.
node "<base-directory>/sessions-today.js"
Replace <base-directory> with the actual base directory path provided when the skill is invoked.
That's it -- three parallel calls, no sequential steps.
Step 2: Summarize
From the results (especially the session logs which capture the full day's work), write a concise summary with these sections:
## End of Day Review
*Generated at HH:MM*
### Done
- completed items
### In Progress
- unfinished items with context
### Ideas
- new ideas or observations (omit section if none)
### Tomorrow
- carry-over items
Keep it casual, use bullet points, use wikilinks where relevant. Include the current time in the *Generated at HH:MM* line. If there's very little evidence, ask the user what they worked on.
Step 2.5: Ask what's missing
After presenting the summary, ask: "Anything I missed? Meetings, offline work, ideas?"
If the user adds anything, incorporate it into the summary before saving.
Step 3: Ask to save
Ask: "Want me to add this to today's daily note?"
Use the daily notes folder discovered in Call B. The daily note filename is YYYY-MM-DD.md (local date).
Saving logic -- the review is idempotent:
- Read the existing daily note content (from Call B).
- Check if it contains the marker
## End of Day Review.- If the marker exists: the user ran
/goodnightbefore. Replace everything from---before## End of Day Reviewto the end of the file with the new review. This lets the user re-run/goodnightafter doing more work without duplicating. Preserve all content above the---. - If no marker exists but the note has content: append a
---divider followed by the review. - If the note doesn't exist: create it with the review content.
- If the marker exists: the user ran
The review block always starts with --- + blank line + ## End of Day Review, making it easy to find and replace.
To write the note, use the Obsidian CLI if available (obsidian create for new notes, obsidian append for existing ones), or write directly to disk as a fallback.