session-brain

Builds a topic graph over Claude session history using local TF-IDF clustering.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill session-brain-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-brain
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/session-brain
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill session-brain-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Long-lived Claude session histories accumulate hundreds of transcripts that are impossible to survey manually, making it hard to see what topics you have worked on, what is active, and what has gone stale. ## Core Features & Use Cases - Topic clustering: Reads every session transcript plus history-only sessions from history.jsonl and clusters them with local TF-IDF, with no API calls or embeddings. - Interactive graph output: Writes a browser-viewable graph to ~/.claude/session-brain/ with node size, recency, and bookmark indicators, plus momentum and dormancy metrics per cluster. - One-turn cluster naming: Provides top terms and exemplar sessions per cluster so clusters can be named without reading transcripts, with names surviving rebuilds. - Use Case: Run the build, name the handful of unnamed clusters, then report the biggest topics, hottest areas, dormant themes, and bridge sessions connecting separate topics. ## Quick Start Ask the agent to build your session map and show what topics you have been working on lately.

Frequently Asked Questions about session-brain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I cluster my Claude session history by topic?

Run obsidian-wiki sessions-build --json to read all session transcripts and history.jsonl entries, then cluster them with local TF-IDF. The build takes about 3 seconds cold on roughly 1000 sessions and is incremental afterward.

How do I name clusters without reading every transcript?

Run obsidian-wiki sessions-clusters --unnamed --json to get each cluster's top terms and three exemplar session titles. Write a short name and summary from that alone, then submit them with obsidian-wiki sessions-name.

Does session clustering require API calls or embeddings?

No, clustering uses local TF-IDF with no API calls and no embedding models. All computation runs deterministically through the obsidian-wiki CLI on your machine.

What happens to sessions that only exist in history.jsonl?

History-only sessions get graph nodes and remain findable, but they can never be loaded since their transcripts were pruned. Roughly 40 percent of a long-lived cache exists only as prompts in history.jsonl.

Why does my session graph look wrong or too dense?

Rebuild from scratch with the --full flag, which ignores all caches and re-reads everything. If the graph is too dense, raise --min-sim or use --mutual for tighter mutual-kNN edges.

Does session-brain write anything to my Obsidian vault?

No, it writes only to a sidecar directory at ~/.claude/session-brain/ and never touches the vault. For distilling sessions into vault pages, use the wiki-history-ingest skill instead.