session-brain

session-brain is a skill for Claude Code from Ar9av/obsidian-wiki. It costs 59 tokens per session (977 once invoked), scanned A, original, MIT.

A local tool that builds a searchable graph of topics found in past Claude coding-agent sessions.

In plain words
What is it for?
Use it to build or refresh the session graph and group older sessions by topic; use session-search instead when looking for one specific session.
Why use it?
It helps you survey previous work without manually reading every transcript, while keeping the graph outside the Obsidian vault.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the obsidian-wiki plugin — 40 skills, 2 hooks shipped together

Good fit Use it to build or refresh the session graph and group older sessions by topic; use session-search instead when looking for one specific session.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ar9av/obsidian-wiki/session-brain
About the project

obsidian-wiki is a framework that helps AI agents build and maintain an interconnected knowledge base from text-based material in an Obsidian vault. It is for people who want their agents to remember discoveries, connect related information, and answer questions with wiki-link citations. Catalogue add-ons provide the agent skills, instructions, agents, and configuration used to create and maintain these wikis.

Ar9av/obsidian-wiki · 3,613 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Ar9av/obsidian-wiki --skill session-brain
Clone the repo
git clone --depth 1 https://github.com/Ar9av/obsidian-wiki

Made for: Claude Code.

Or install obsidian-wiki, the plugin that ships this one along with the rest of its 40 skills, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for session-brain

README.md
[![agentmods](https://agentmods.dev/badge/skills/ar9av/obsidian-wiki/session-brain/github.svg)](https://agentmods.dev/skills/ar9av/obsidian-wiki/session-brain)
Your own site
<a href="https://agentmods.dev/skills/ar9av/obsidian-wiki/session-brain"><img src="https://agentmods.dev/badge/skills/ar9av/obsidian-wiki/session-brain/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for session-brain

Your own site · 80×15
<a href="https://agentmods.dev/skills/ar9av/obsidian-wiki/session-brain"><img src="https://agentmods.dev/badge/skills/ar9av/obsidian-wiki/session-brain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 977 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 60
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.00977
Opus 5.5 $0.00024 $0.00391
Sonnet 5.5 $0.00012 $0.00195
Haiku 4.5 $0.00006 $0.00098

Measured 17d ago against content hash f1239b7635fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

session-brain scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.skills/session-brain/SKILL.md · 95 lines

How it starts

The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

Read the full file on GitHub · 95 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 17d ago Changed · -7 lines · -94 tokens per session f1239b7635fe
  2. 1mo ago First seen · 102 lines · 153 tokens per session scan A e72dc2189e2c

Subscribe to this mod's changes

session-brain is a skill published in the GitHub repository Ar9av/obsidian-wiki (3,613 stars, last pushed 3d ago), licensed MIT. It adds 59 tokens to every session and 977 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

llm-wiki

Maintain a personal team knowledge base using the LLM Wiki pattern — incremental ingest, query, and lint operations on a layered wiki architecture.

TheSmuks/ai-project-template · 31 tokens

llmwiki

Build and use a persistent, citation-traceable knowledge wiki from documents, research papers, notes, or project documentation. Use for llmwiki projects, retrieving reusable evidence for an agent task, or compiling a corpus for repeated questions. A one-off file read or live web search does not need a wiki.

atomicstrata/llm-wiki-compiler · 66 tokens

llm-wiki

Build and maintain a persistent, interlinked Obsidian-compatible markdown wiki using Karpathy's LLM Wiki pattern. Extension-backed with auto-generated metadata, guardrails, and 14 custom tools (+3 opt-in agent-trajectory tools).

zosmaai/pi-llm-wiki · 52 tokens

link-memory

Use after important user-approved decisions, when durable context should be proposed or reviewed, and for explicit Link memory lifecycle work: remember, recall, review, update, archive, restore, forget, or explain local memories through the CLI without requiring MCP.

gowtham0992/link · 0 tokens

link-retrieve

Use before answering work that may depend on user memory, project history, source-backed notes, or prior decisions; retrieve compact Link context through the CLI without loading the whole wiki or requiring MCP.

gowtham0992/link · 42 tokens

link-ingest

Use when raw files are present, source pages look stale, or a user asks to ingest notes into Link; refresh source-backed wiki pages, propose memories, and validate updates through the CLI without MCP.

gowtham0992/link · 44 tokens