/second-brain:session-managerfrom second-brain
Manages session metadata (name, project, tags, summary) on an Obsidian session note. Syncs the session name from /rename, updates the terminal window title, and reads/writes session properties.
Ships in second-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You own four properties on the current session's note: session_name, project, tags and
summary. Ownership reads by stage. The hooks seed a note when the session starts and never overwrite a
value that is already there. You are the only writer while the session runs. Once it has ended, the
recap writes the session's description — its project, tags and summary — from the whole
conversation, overwriting what is there, because by then it has more context than anyone had during the
session (ADR-0006).
Everything else on the note belongs to the hooks.
| Property | Type | Holds |
|---|---|---|
session_name | text | The session's name, kept in step with /rename |
project | text | The knowledge-bank domain the work belongs to, one of the vault's projects/ folders, empty when it belongs to none |
tags | list | Categorization, drawn from the vault's existing tags |
summary | text | One line on what the session accomplished |
project names a domain, never a repository or directory: those are tags. A value outside the domain
set is unresolved, which is what a note written before this rule holds, so treat it as empty and set it
properly rather than leaving it to be read as a domain.
Run all five steps on every invocation, before the user's request and whatever they asked for.
1. Locate the note. The SessionStart hook injects a docs path into your system prompt:
Session docs path: {KB_PATH}/_sessions/2026-03-04/abc123-def456/docs/
Everything from _sessions/ onward is vault-relative. Drop the trailing docs/ and append
session.md, giving _sessions/2026-03-04/abc123-def456/session.md. Read it:
obsidian vault="knowledge-bank" read path="<vault-relative-path>"
If no docs path was injected, ask the user for the session folder.
2. Sync the name. /rename writes a customTitle to the transcript, which the note does not see:
source skills/common/obsidian_helpers.sh
read_custom_title "<cwd from the note>" "<session_id from the note>"
When that title differs from session_name, adopt it:
obsidian vault="knowledge-bank" property:set name="session_name" value="<title>" path="<vault-relative-path>"
3. Name the terminal. Give the enclosing container the session's name, as a real Bash call. The
helper detects tmux or the Herdr TUI from $TMUX_PANE and $HERDR_PANE_ID itself, and under the Herdr TUI
it also names the agent so other agents can reach this session by name:
source skills/common/obsidian_helpers.sh
rename_terminal_window "<session_name>"
The helper is best-effort and reports nothing, so confirm the result yourself rather than assuming it:
[ -n "$HERDR_PANE_ID" ] && herdr pane list | grep -o "\"label\":\"[^\"]*\"" | grep -c "<session_name>"
[ -n "$TMUX_PANE" ] && tmux display-message -p '#W'
Done when: the container's label reads back as the session name, or session_name is empty and
there was nothing to apply.
4. Report the four properties.
**Current Session**
- session_name: <value or empty>
- project: <value or empty>
- tags: <value or empty>
- summary: <value or empty>
Add one more line when forked_from or delegated_by is set, naming where the session came from, so a
copied project and copied tags are visibly inherited rather than looking chosen:
- lineage: forked from <name or id> | delegated by <name or id>
5. Dispatch. Carry out the user's request. When the request names no property, ask with the AskUserQuestion tool which of the four to update.
obsidian vault="knowledge-bank" property:set name="<property>" value="<value>" [type="list"] path="<vault-relative-path>"
Tags take an extra step: they are canonicalized against the vault's existing tags and confirmed before anything is written. Read tag-canonicalization.md when the request involves tags.
Confirm every write back to the user, and use the AskUserQuestion tool for confirmations so the user gets a real prompt. This skill acts on the current session alone.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
session-management, obsidian, note-taking, terminal-renaming
Other plugins' skills for the same job
6 skills in this plugin
/kb-ingestIngest external sources into the knowledge bank through interactive study or quick filing. Two modes — Quick (summarize → file) and Study (theme-by-theme deep dive with online research and personal notes → multi-layer KB output → optional blog/slack synthesis). Triggers on "ingest this", "study this article", "add to knowledge bank", "learn from this", "process this article", "take notes on this", "what are the key takeaways", "break this down for me", or when user provides external reference material for long-term retention. Also use when user says "let's go through this", wants to deeply engage with a source document, or shares an article/gist/doc and asks about its content./kb-lintHealth-check the knowledge bank for orphan documents, stale content, broken WikiLinks, index drift, and missing frontmatter. Generates a severity-graded report. Use this skill whenever the user mentions lint, health check, KB maintenance, stale docs, broken links, orphan pages, missing references, knowledge bank quality, or hasn't run a check in a while. Also trigger when the user asks "what's not cross-referenced?", "are there any dead links?", or expresses concern about KB quality./knowledge-bank-lookupDelegates knowledge bank lookups to Explore subagents with reflections-first strategy that learns from past mistakes. Checks /reflections/ directory before documentation to extract documented failures to avoid and proven approaches to apply. Automatically triggers when user mentions services ([project-a], [project-b], [project-c], Claude Code), requests investigations, or queries past lessons. Returns structured, actionable insights achieving 69-94% context reduction. (project, gitignored)/session-recapDocument Claude Code sessions by extracting knowledge into cross-referenced documentation. Triggers on "recap the session", "summarize the work", or after significant code changes./wdymFrom-zero decode of this session's agent work for the person supervising it. Use when the person does not follow something the agent said or showed ('wdym', 'what do you mean'), wants it from zero ('like I have no context', 'from scratch'), asks what a word, step or output of this session means or why the agent did it that way, asks for proof ('how did you verify', 'prove it'), or says 'wdym debrief'. An explanation for an audience other than the person belongs to the eli5 skill; a pure visual request belongs to show-me.npx claudepluginhub sxhmilyoyo/sundayhao-plugins --plugin second-brain