brain-save

brain-save is a skill for Claude Code from jame581/LogseqBrain. It costs 77 tokens per session (2,455 once invoked), scanned A, original, MIT.

A session-memory skill that saves context, decisions, progress, plans, and related project details to a Logseq graph, a connected collection of notes.

In plain words
What is it for?
Use it when you want to save progress, record a decision, remember information, or wrap up work before quitting.
Why use it?
It preserves important work between sessions and devices instead of relying on the current conversation alone.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the logseq-brain plugin — 5 skills shipped together

Good fit Use it when you want to save progress, record a decision, remember information, or wrap up work before quitting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jame581/logseqbrain/brain-save
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 jame581/LogseqBrain --skill brain-save
Clone the repo
git clone --depth 1 https://github.com/jame581/LogseqBrain

Made for: Claude Code.

Or install logseq-brain, the plugin that ships this one along with the rest of its 5 skills.

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 brain-save

README.md
[![agentmods](https://agentmods.dev/badge/skills/jame581/logseqbrain/brain-save/github.svg)](https://agentmods.dev/skills/jame581/logseqbrain/brain-save)
Your own site
<a href="https://agentmods.dev/skills/jame581/logseqbrain/brain-save"><img src="https://agentmods.dev/badge/skills/jame581/logseqbrain/brain-save/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 brain-save

Your own site · 80×15
<a href="https://agentmods.dev/skills/jame581/logseqbrain/brain-save"><img src="https://agentmods.dev/badge/skills/jame581/logseqbrain/brain-save.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,455 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.
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.00077 $0.02455
Opus 5.5 $0.00031 $0.00982
Sonnet 5.5 $0.00015 $0.00491
Haiku 4.5 $0.00008 $0.00246

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

Security

Grade A, and why

brain-save 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 26d 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.

plugin/skills/brain-save/SKILL.md · 88 lines

How it starts

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

Brain Save

Persist session context to the Claude Brain Logseq graph, for continuity across sessions and devices. A routine save is: save-begin, one Read, three Edits, save-finish. It reads no file but this one.

Running the helper

  • Bash: sh "<this skill's base directory>/../_shared/bin/brain" <command> …
  • PowerShell-only Windows: & "$(Split-Path (Split-Path (Get-Command git).Source))\bin\bash.exe" "<base>/../_shared/bin/brain" <command> …
  • Neither works: stop and say "logseq-brain needs Git for Windows (Git Bash) — https://git-scm.com/download/win".
  • In Cowork, always pass --graph <connected folder>. Elsewhere pass --graph only when the graph is not configured. It may go anywhere on the line. On exit 2 with graph not resolved, follow skills/_shared/path-resolution.md, then pass --graph.
  • Put text arguments in single quotes; a ' inside becomes '\''. In double quotes the shell runs backticks and expands $.
  • Exit 0 clean, 1 findings (act on them), 2 error (act on its reason; don't retry blindly). Quote every coverage: line. Never recompute a figure it printed. Its graph: line is the folder for your own Read, Edit and Write calls.

Save process

  1. Targets. Take the project from the names, files and repos discussed, or the user's words. If unclear, ask: "This touched [X] and [Y] — save to both?" Several pages are saved one at a time, each running steps 2–7 before the next begins.

  2. brain save-begin <page> [--also FILE…]. Don't list the graph first. It baselines the page, pages/Index.md and today's journal, and prints what you edit:

    • == digest: the property block and ## Digest (a map: stale or missing here is expected: save-finish recomputes the Map);
    • == session-log: the newest entry;
    • == current-plan;
    • == anchors: the page's Index line and the end of today's ## Sessions.

    Name every other file this save may write with --also: pages/Meta.md, pages/Decisions.md, pages/Tasks___<ID>.md. If the need appears while composing, rerun save-begin with the full list before the first Edit, never after: a rerun resets the baselines.

    • page not found (exit 2): never write to a missing page. Offer to create it via brain-init's "Adding a New Project". If declined, list the projects (brain status) and let the user pick.
    • Task pages: the page-top block must hold status:: with active | blocked | done. Seed status:: active if it's missing. On completion signals ("merged", "deployed", "closed", "released", "hotovo"), suggest status:: done, and never write a status change the user didn't confirm. Read or edit a task page only to change its status::, passing it in --also. A worked task with no page gets only the Current Plan pointer and an offer to create it. Never create one uninvited.

Read the full file on GitHub · 88 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 26d ago Changed · -16 lines 538b8065e7b2
  2. 1mo ago Changed · +8 lines 4a19223494d3
  3. 1mo ago First seen · 96 lines · 77 tokens per session scan A af1e2bdbfc96

Subscribe to this mod's changes

brain-save is a skill published in the GitHub repository jame581/LogseqBrain (18 stars, last pushed today), licensed MIT. It adds 77 tokens to every session and 2,455 once invoked, about $0.0003 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

curator-continuity

Apply at the start of a build or coding session on a Curator-tracked project, and again as your own context fills, without waiting to be asked. Activates on "continue", "resume", "where did we leave off", "pick up where we left off", "what were we working on", "catch me up on this project", and on the save side "save…

talirezun/the-curator · 228 tokens

my-curator

Use when interacting with the user's My Curator second brain via the my-curator MCP. Activates for READ ("what does my wiki say about X", "what do I know about X", "search my notes", "deep research my second brain", "find every source that mentions Y", "what does our cohort wiki say"), WRITE ("save to my wiki"…

talirezun/the-curator · 206 tokens

memory-system

A guide to giving an AI agent persistent, user-specific memory across conversations. It covers what to remember, how to store it, how to update or compress it, and when to use memory instead of a shared knowledge base.

bojieli/ai-agent-book · 95 tokens

memanto-companion

Inspect and manage the cross-session engineering memory that Memanto maintains for your Claude Code skills. Use when the user asks what Memanto remembers, wants to see their engineering profile, manually recall context for a skill, or store a decision. The automatic lifecycle hooks handle capture/injection on their…

moorcheh-ai/memanto · 72 tokens

openlore

Query and publish to an OpenLore knowledge repository over SSH using ordinary shell commands. Use when a task needs project documentation, runbooks, shared team knowledge, or a place to publish findings.

aakarim/OpenLore · 42 tokens

Context Doctor

Investigate and repair an agent's context — memory, system prompt, and skills — using observed behavior as evidence. Use when the user asks to audit, clean up, or fix your memory or context, or runs /doctor. Do not load for routine memory reads or edits, or requests that merely mention memory.

letta-ai/letta-code · 66 tokens