brain-init

brain-init is a skill for Claude Code from jame581/LogseqBrain. It costs 71 tokens per session (1,584 once invoked), scanned A, original, MIT.

A setup tool for a Logseq graph, which is a folder of linked notes, used as an external project memory called Claude Brain. It can create the graph structure or add a project page to an existing graph.

In plain words
What is it for?
Use it for first-time Claude Brain setup or to add a new project page. It responds to commands such as “init brain” and “add project to brain,” but not loading, saving, or status checks.
Why use it?
Starting a note-based project memory by hand requires creating configuration, index, and metadata files in the right places. This defines that initial structure and handles adding projects.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

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

Good fit Use it for first-time Claude Brain setup or to add a new project page. It responds to commands such as “init brain” and “add project to brain,” but not loading, saving, or status checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jame581/logseqbrain/brain-init
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-init
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-init

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jame581/logseqbrain/brain-init"><img src="https://agentmods.dev/badge/skills/jame581/logseqbrain/brain-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,584 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.00071 $0.01584
Opus 5.5 $0.00028 $0.00634
Sonnet 5.5 $0.00014 $0.00317
Haiku 4.5 $0.00007 $0.00158

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

Security

Grade A, and why

brain-init 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-init/SKILL.md · 117 lines

How it starts

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

Brain Init

Initialize the Claude Brain Logseq graph or add a new project page to an existing graph.

Prerequisites

Resolve the graph path per skills/_shared/path-resolution.md. If the resolved folder is empty or missing core files, this skill performs first-time setup (below). Otherwise it adds a new project to the existing graph. The helper (below) is required from step 4 on.

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.

First-Time Graph Setup

If the graph folder is empty or missing core files, initialize it:

  1. Create logseq/config.edn with minimal Logseq config:
{:meta/version 1
 :preferred-format "Markdown"
 :journal/page-title-format "yyyy-MM-dd"
 :journal/file-name-format "yyyy_MM_dd"}
  1. Create pages/Index.md — the master index page:
type:: index
description:: Master index of Claude's brain — all projects and key pages

- ## Projects
  - _No projects yet. Use "init brain project [name]" to add one._
- ## Quick Links
  - [[Meta]] — preferences, working style, conventions
  - [[Decisions]] — cross-project decision log

Read the full file on GitHub · 117 lines

Files

What ships with it

1 file 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 · +9 lines 54375548cdb7
  2. 1mo ago Changed cba085b1abc6
  3. 1mo ago First seen · 108 lines · 71 tokens per session scan A 200c2b683fa8

Subscribe to this mod's changes

brain-init is a skill published in the GitHub repository jame581/LogseqBrain (18 stars, last pushed today), licensed MIT. It adds 71 tokens to every session and 1,584 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