brain-save

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 CodeCodex

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.

agentmods
npx agentmods add skills/jame581/logseqbrain/brain-save
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, Codex.

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,849 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00077 $0.02849
Opus 5 $0.00039 $0.01425
Sonnet 5 $0.00015 $0.00570
Haiku 4.5 $0.00008 $0.00285

Measured 2d ago against content hash af1e2bdbfc96, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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/brain-save/SKILL.md · 96 lines

How it starts

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

Brain Save

Persist session context — decisions, progress, plans, implementation details — to the Claude Brain Logseq graph for cross-session and cross-device continuity.

Prerequisites

Resolve the graph path per skills/_shared/path-resolution.md.

What to Save

Six categories — see references/categories.md for each one's format and rules. The orchestrator decides which apply based on what the session covered:

  1. Session Log Entry (always)
  2. Decisions (when made — see references/decisions.md for conflict + cross-project rules)
  3. Plan Updates (when plans changed — replace, don't append)
  4. Implementation Details (when significant)
  5. Jira Task Context (when tasks were worked on — store pointers, not full plans)
  6. User Preferences & Meta (when newly discovered — update pages/Meta.md)

Save Process

  1. Identify target project(s). Look for project names mentioned, files/repos discussed, or explicit user statements ("we're working on X"). If multiple projects, save to each. If unclear, ask: "This touched [X] and [Y] — save to both?"

  2. Verify project page exists. Glob for pages/Projects___<ProjectName>.md. If missing:

    • Tell user: "No project page found for [name]. Want me to create one first?"
    • If yes, hand off to brain-init "Adding a New Project" flow, then continue.
    • If no, list available projects and let the user pick.
    • Never write session data to a non-existent project page.

    Task pages: a save may also target a task page (pages/Tasks___<ID>.md) when the session was about that task. Task pages have no fixed template, but their page-top property block must contain status:: with one of active | blocked | done. If the page exists without status::, seed status:: active as part of this save. If the session content signals completion ("merged", "deployed", "closed", "released", "hotovo"), suggest status:: done — never write a status change the user didn't confirm (same rule as auto-save). If no task page exists for a worked task, keep the Current Plan pointer entry only — don't create Tasks___<ID>.md uninvited; offer to create one and only do so if the user wants it.

Read the full file on GitHub · 96 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. 2d 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 (17 stars, last pushed 1mo ago), licensed MIT. It adds 77 tokens to every session and 2,849 once invoked, about $0.0004 per session on Opus 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

Use at the start of a build or coding session on a Curator-tracked project, and again when context runs low. Activates on "continue", "resume", "where did we leave off", "catch me up on this project", and on the save side "save state", "write a handoff", "checkpoint this", "I am running low on context", "before we…

talirezun/the-curator · 215 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", "deep research my second brain", "find every source that mentions Y", "what does our cohort wiki say"), WRITE ("save to my wiki", "compile our findings", "put this in my projects…

talirezun/the-curator · 194 tokens

review-implementing

Process and implement code review feedback systematically. Use when user provides reviewer comments, PR feedback, code review notes, or asks to implement suggestions from reviews. Activates on phrases like "implement this feedback", "address review comments", "fix review issues", "apply these suggestions", or when…

LEEI1337/phantom-neural-cortex · 68 tokens

using-git-worktrees

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification.

LEEI1337/phantom-neural-cortex · 35 tokens

git-pushing

Stage, commit, and push git changes with conventional commit messages. Use when user wants to commit and push changes, mentions pushing to remote, or asks to save and push their work. Also activates when user says "push changes", "commit and push", "push this", "push to github", or similar git workflow requests.

LEEI1337/phantom-neural-cortex · 70 tokens

code-quality-check

Automated code quality verification checklist.

LEEI1337/phantom-neural-cortex · 10 tokens