From knowledge-gardener
Use when the user wants to wrap up the current Claude Code session by writing what was worked on to today's daily note in the vault, so the next session can pick up context. Drives recap.manual_recap to upsert the per-session two-layer recap block (Timeline + KPT).
How this skill is triggered — by the user, by Claude, or both
Slash command
/knowledge-gardener:garden-recapThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Capture the current session's work — what happened (Timeline) plus Keep / Problem / Try — into today's daily note. Designed to be invoked **before** the user ends a session so future sessions (today or later) can recover context without re-reading the entire transcript.
Capture the current session's work — what happened (Timeline) plus Keep / Problem / Try — into today's daily note. Designed to be invoked before the user ends a session so future sessions (today or later) can recover context without re-reading the entire transcript.
The normal path drives the recap.manual_recap CLI instead of hand-editing the daily note. The CLI upserts a per-session kg-recap-sid:{sid8} block — an append-only ### Timeline plus a replaceable ### KPT section — the SAME block the auto-recap Stop hook maintains. Manual and auto recaps therefore converge on one block per session.
garden-plant (atomic note, not daily journal entry)garden-watergarden-surveyThe normal flow is four steps: identify the session, author the KPT, preview, apply. The CLI does the aggregation, block upsert, commit, and cursor advance — this skill does NOT hand-edit the daily note in the normal path. (A no-log recollection fallback is preserved under Step 2 for legacy sessions with no capture log.)
Follow Pre-flight Setup in using-knowledge-gardener to resolve $KG_VAULT and load vault conventions. Additionally read the daily-note template and the KPT convention wherever the README points to them.
From the conventions + template, extract for this skill (at minimum):
If any of these are not discoverable from the README or templates, stop and ask the user. Do not invent defaults.
Format today's date per the filename convention and build the absolute daily-note path under the daily-note folder. Hold onto this path — Step 4 / Step 5 pass it to the CLI as --daily-path. The CLI only appends the kg-recap-sid recap block; it does not seed the daily-note template. So if today's note does not exist yet, create it from the template first (Write tool) so it carries the vault's frontmatter/sections, then run the CLI.
Identify the active session and confirm a capture log exists:
PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m recap.aggregate --json
By default this picks the most-recently-modified session log for today (≈ the active session). Parse sessions[0].sid8 — this is the <sid8> you pass to the CLI in Steps 4–5. The Timeline the CLI will write is aggregated by the CLI itself from this same log; you do not assemble it by hand.
sessions is non-empty and sessions[0].entry_count is > 0 → a capture log exists. Continue to Step 3.sessions is empty OR sessions[0].entry_count is 0 → there is no capture log (older plugin install, or the session predates capture). The two-layer path cannot run; fall back to the No-log fallback below, then STOP (do not run recap.manual_recap).Only for the no-capture-log case. This is the older free-form, template-driven recap: you hand-edit today's daily note from recollection + git log, exactly as before the two-layer CLI existed.
git log):
date for "now".git log --since='<session-start>' --oneline --author='<git user>' (or git log --since=<today-00:00> --oneline); use git diff --stat for not-yet-committed work. Aggregate as a short list with one-line descriptions.date: <today> frontmatter, or git -C "$KG_VAULT/.." log --since=<today-00:00> --name-only, to find newly-added notes.Bash head/cat, which doesn't count toward the Edit tool's per-file read tracking).plant: <date> daily (session recap); append → water: <date> daily session recap. <date> matches the daily-note filename format. Don't --no-verify.Then STOP — the no-log case is done here.
A capture log exists (Step 2). From the full conversation (richer than the hook's transcript slice):
Author the ### KPT section using the vault's KPT convention (Keep / Problem / Try, per the README/template). Cap each list to ~5 bullets.
git log. Keep / Problem / Try are interpretation — what to repeat, what hurt, what to try next.KPT_FILE="$(mktemp --suffix=.md)"
# write the "### KPT\n..." content into "$KPT_FILE" (Write tool)
Also author a ### Timeline activity log using the aggregator timeline (from Step 2 JSON) plus the full conversation as sources. Apply the same activity-unit rules as the auto path:
HH:MM–HH:MM time range.TIMELINE_FILE="$(mktemp --suffix=.md)"
# write "### Timeline\n- HH:MM–HH:MM <activity>\n..." into "$TIMELINE_FILE" (Write tool)
The CLI replaces the block's existing KPT with $KPT_FILE's content and uses $TIMELINE_FILE as the Timeline when --timeline-file is passed. Omitting --timeline-file falls back to the deterministic filtered timeline aggregated from the capture log.
With the daily-note path from Step 1 and <sid8> from Step 2, preview the upsert:
PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m recap.manual_recap \
--sid <sid8> --daily-path <abs daily path> \
--kpt-file "$KPT_FILE" --timeline-file "$TIMELINE_FILE" --dry-run
--dry-run prints a unified diff of the daily note and writes nothing. Show that diff to the user with the one-line rationale: "Capturing today's session into the per-session recap block so the next session can pick up context."
Trigger phrases that count as implicit approval: "wrap up and write it" / "ここまでまとめて書いて".
(Exit code 3 = nothing to recap — no session log. That shouldn't happen here because Step 2 already confirmed entry_count > 0; if it does, drop to the No-log fallback.)
Re-run the SAME command without --dry-run:
PYTHONPATH="${CLAUDE_PLUGIN_ROOT}" python3 -m recap.manual_recap \
--sid <sid8> --daily-path <abs daily path> \
--kpt-file "$KPT_FILE" --timeline-file "$TIMELINE_FILE"
The CLI writes the two-layer block atomically (Timeline from $TIMELINE_FILE, KPT replace), derives the topic from the KPT's first Keep: bullet, commits (water: <date> <HH:MM> 〜 <topic>), and advances the per-session cursor — so a later auto Stop inherits this KPT as prior-KPT instead of overwriting it. (--timeline-file is optional; omitting it falls back to the deterministic filtered timeline aggregated from the capture log, as described in Step 3.)
Don't --no-verify and don't hand-edit the block afterward. If you need a different insertion point for a brand-new block, pass --insert-before <heading> (default appends at EOF); to write without committing, pass --no-commit.
sessions empty or entry_count 0): take the No-log fallback (recollection) under Step 2, then stop. Don't try to force the CLI.Stop already ran): re-running is safe — the CLI appends-with-dedup on the Timeline and replaces only the KPT. Review the --dry-run diff before applying so you don't clobber a richer KPT with a thinner one.$KPT_FILE and re-run Step 5. Don't --no-verify.git log / actual conversation, not paraphrased memory. The CLI's Timeline is aggregated from the capture log, so the factual layer is mechanically grounded; only the KPT is your interpretation.kg-recap-sid:{sid8} block, so a session never ends up with two competing recaps.water: commit. The daily note may collect multiple sessions, but each recap is its own commit so history stays readable.Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub kohei-wada/knowledge-gardener --plugin knowledge-gardener