mcpbeat Sign in

Session Brain Skill for Claude

> Build and maintain a topic graph over your agent session history. Reads every Claude session transcript plus the pruned sessions that survive only in history.jsonl, clusters them by topic using local TF-IDF (no API calls, no embeddings), and writes an interactive graph you can open in a browser. Use when the user says "/session-brain", "build my session map", "cluster my claude sessions", "map my session history", "rebuild the session graph", "show me my session graph", "what have I been working on lately", "what topics have gone stale". Different from over the raw sessions and never writes to the vault.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
3103
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/Ar9av/obsidian-wiki --skill session-brain

The instruction itself

6 sections, as written by the author

Session Brain

Builds a searchable topic graph over your agent session history. The output is a sidecar

at ~/.claude/session-brain/ — the vault is never touched.

All the heavy lifting is deterministic Python in the obsidian-wiki CLI. Your only job is to

name the clusters, which takes exactly one turn and requires reading no transcripts.

When to use which skill

| Goal | Skill |

|---|---|

| Build or refresh the graph; survey topics | session-brain (this one) |

| Find and load a specific past session | session-search |

| Distil sessions into permanent vault pages | wiki-history-ingest / claude-history-ingest |

Step 1: Build

obsidian-wiki sessions-build --json

Roughly 3 seconds cold on ~1000 sessions, well under a second incrementally — it re-reads only

transcripts whose size or mtime changed. Useful flags:

| Flag | When |

|---|---|

| --full | Ignore all caches and re-read everything |

| --mutual | Tighter, smaller clusters (mutual-kNN edges only) |

| --half-life N | Change the recency half-life (default 90 days) |

| --min-sim 0.15 | Fewer, stronger edges — use if the graph is too dense to read |

| --skip name | Exclude a project. Match is substring-based; pass the bare name, because cache dirs start with - and argparse reads that as a flag |

Report the headline numbers: total sessions, how many have transcripts vs. are history-only,

edges, and cluster count.

Step 2: Name the unnamed clusters

obsidian-wiki sessions-clusters --unnamed --json

Each cluster comes with top_terms and exemplars (its three highest-degree sessions, whose

titles are already in graph.json). That is all you need. Do not open transcripts to name a

cluster — the whole design goal is that naming costs one turn regardless of corpus size.

Write a 3–5 word name and a one-sentence summary per cluster, then:

obsidian-wiki sessions-name --from - <<'EOF'
[{"id": 3, "name": "warden telemetry pipeline", "summary": "Building and debugging the redacted telemetry chain."}]
EOF

Names are stored in names.json keyed by the cluster's dominant vocabulary, not its id — so they

survive rebuilds even though cluster ids are positional and shift as the corpus grows. On repeat

runs --unnamed is usually empty and this step is free.

If a cluster's terms are genuinely incoherent, name it honestly ("mixed — short sessions")

rather than inventing a theme.

Step 3: Report the map

Read clusters.json and tell the user:

  • Biggest topics — by size
  • What's hot — highest momentum (activity in the last 30 days vs. the 60 before it)
  • What's gone quietdormant: true (low recency *and* nothing in 60 days)
  • Where topics meetbridges, the sessions that connect two otherwise separate topics.

These are often the most interesting sessions in the graph.

Then offer the visualisation:

open ~/.claude/session-brain/graph.html

Node size is session length, brightness is recency, hollow rings are history-only sessions, and

gold borders are bookmarked ones. The time slider and search box filter together.

Notes

  • Never write to the vault from this skill. If the user wants session knowledge in the vault,

that is wiki-history-ingest.

  • History-only sessions are real. Roughly 40% of a long-lived cache exists only as prompts in

history.jsonl; those get graph nodes and are findable, but can never be loaded. Say so plainly

rather than implying they are missing.

  • The graph is derived data. If it looks wrong, --full rebuilds from scratch; nothing is lost.

Other skills for the same job

different authors, same section of the catalogue
Skill Creator
by anthropics
vendor ×10

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

56k tokens scripts
Pufferlib
by ComeOnOliver
×3

This skill should be used when working with reinforcement learning tasks including high-performance RL training, custom environment development, vectorized parallel simulation, multi-agent systems, or integration with existing RL environments (Gymnasium, PettingZoo, Atari, Procgen, etc.). Use this skill for implementing PPO training, creating PufferEnv environments, optimizing RL performance, or developing policies with CNNs/LSTMs.

28k tokens scripts
Run Evals
by flutter
vendor ×2

Run evaluations for one, multiple, or all skills using the agent orchestration framework. Make sure to use this skill whenever the user asks to run evals, test a skill's performance, run benchmarks, or compare baseline versus with-skill execution.

2k tokens
LLM Application Dev Prompt Optimize
by ComeOnOliver
×2

You are an expert prompt engineer specializing in crafting effective prompts for LLMs through advanced techniques including constitutional AI, chain-of-thought reasoning, and model-specific optimizati

6k tokens
Nowait Reasoning Optimizer
by ComeOnOliver
×2

Implements the NOWAIT technique for efficient reasoning in R1-style LLMs. Use when optimizing inference of reasoning models (QwQ, DeepSeek-R1, Phi4-Reasoning, Qwen3, Kimi-VL, QvQ), reducing chain-of-thought token usage by 27-51% while preserving accuracy. Triggers on "optimize reasoning", "reduce thinking tokens", "efficient inference", "suppress reflection tokens", or when working with verbose CoT outputs.

8k tokens scripts
Evolving AI Agents
by Orchestra-Research
×1

Provides guidance for automatically evolving and optimizing AI agents across any domain using LLM-driven evolution algorithms. Use when building self-improving agents, optimizing agent prompts and skills against benchmarks, or implementing automated agent evaluation loops.

36k tokens
Context Manager
by lingxling
×1

Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems.

2k tokens
Zach Seller Skill Creator
by zach22-1999
×1

亚马逊卖家专用的 skill 创建器(中文)。当用户想把一个亚马逊运营/自媒体/日常工作流程变成可复用的 skill 时使用。触发场景包括但不限于:用户说"我想做一个 skill""把这个流程变成 skill""帮我写个自动化""优化我已有的 skill""给这个工作流做个自动化",即使用户没用"skill"这个词,只要在描述"以后每次都这样做"的重复性工作时也应触发。本 skill 的核心差异:强制用户先回答 6 个业务问题(业务目标/过去做法/具体步骤/方法论/调用方式/期望输出)再进入创建流程,防止产出空洞 skill。Create new skills, improve existing skills, run evals and benchmarks — tailored for Amazon sellers with a Chinese-first workflow.

63k tokens scripts zh

How to use it

Copy the folder

Take ar9av/session-brain from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.