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.
npx agentmods add instructions/jame581/logseqbrain/claude-mdgit clone --depth 1 https://github.com/jame581/LogseqBrainWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02414 | $0.02414 |
| Opus 5 | $0.01207 | $0.01207 |
| Sonnet 5 | $0.00483 | $0.00483 |
| Haiku 4.5 | $0.00241 | $0.00241 |
Grade A, and why
LogseqBrain CLAUDE.md 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this repo is
A Claude Code plugin (logseq-brain) that gives Claude persistent memory via a user-owned Logseq graph. There is no build, no tests, no runtime code — the plugin is entirely markdown skills (skills/<name>/SKILL.md) plus .claude-plugin/plugin.json. Claude itself is the runtime: skills instruct Claude to read/write markdown files in the user's ClaudeBrain graph using the standard Read/Write/Edit/Bash tools.
Target: Logseq OG (the markdown version) only. Logseq split in 2026 — OG moved to https://github.com/logseq/og and is in maintenance mode (security and Electron upgrades, no new features), while the DB/SQLite version continues at the original repo. There is no API or CLI for file graphs (@logseq/cli serves DB graphs only), so all leverage here is file layout, property discipline, and ripgrep. Do not propose DB-version features.
The plugin is distributed via the skillsmith marketplace, the Gemini extension URL, and (for Cowork) a locally-built logseq-brain.plugin zip. The .plugin archive is a build artifact — gitignored (*.plugin), not checked in. Edit files under skills/ and .claude-plugin/, never inside an archive.
Architecture
Five skills make up the save/load cycle against a Logseq graph:
- brain-init — First-time graph setup (creates
pages/Index.md,Meta.md,Decisions.md,logseq/config.edn,journals/.gitkeep) and adds new project pages. New project pages ship with a digest scaffold, so a fresh page never lands in amissing-digestreport. - brain-load — Reads a project page back into the session. Since v0.10.0 the default is digest mode: one
Read(offset 0, limit 20)of the page-top properties +## Digest, plus today's journal's mention(s) of the project (shrunk to fit), and then nothing else — everything further is fetched on demand through the escalation ladder, announced. A page with no digest falls back to the pre-v0.10.0 brief mode unchanged and is offered a digest, never given one uninvited. Also full mode, fuzzy project name matching, and cross-graph search ("what do we know about X"). - brain-save — Surgically appends session logs, decisions, plan updates to the relevant
Projects___<Name>.mdpage via Edit. Also updates journals, Meta, Index. Detects cross-project decisions and decision conflicts (marks old asstatus:: superseded); seeds/updates taskstatus::, suggests rotation of Session Logs past 64 KB/40 entries, refreshes the project'sIndex.mdone-liner on every save, prompts on decision-shaped statements, and runs a mechanical post-write verify grep over the files it wrote. Since v0.10.0, step 9 of 13 unconditionally refreshes the page's digest — properties plus the## Digestsection, with the Map bullet recomputed from the file rather than remembered. - brain-status — Dashboard across all project pages, built from a single ripgrep over digest properties since v0.10.0; pages not yet backfilled fall back to section-targeted reads one page at a time. Flags stale projects; groups task pages by
status::. Separatebrain-statsanalytics mode. - brain-doctor — Graph-hygiene lint/repair (v0.8.0, extended in v0.9.0). Scans pages + journals for format violations that spawn phantom pages or broken macros (
{{ }}mis-used for inline code, bare#number/hex tags, un-namespaced[[Task]]links,[[file://]]links, junk/description links), reports them, and — after a backup — repairs them. Includes thejira-markupresidue check and the guided task-status backfill. v0.10.0 takes the rule catalog to 14 — addingmissing-digest,stale-digest,oversized-digest, and (wave A)stale-map, all report-tier except the safe-only subset ofoversized-digest— plus a guided whole-graph digest backfill ("backfill digests") that states its read cost before spending it. Maintenance tool, run on demand; not part of the per-session save/load cycle.
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.
- 3d ago First seen · 75 lines · 2,414 tokens per session scan A 011b83177fa4
LogseqBrain CLAUDE.md is an instructions file published in the GitHub repository jame581/LogseqBrain (17 stars, last pushed 1mo ago), licensed MIT. It adds 2,414 tokens to every session, about $0.0121 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.
Other instructions, from other repositories
android-tools-mcp CLAUDE.md
Instructions for amsavarthan/android-tools-mcp, covering android-tools-mcp, build, run / test, connect with claude code and architecture.
phantom-neural-cortex copilot-instructions.md
Instructions for LEEI1337/phantom-neural-cortex, covering github copilot custom instructions, project context, code style & standards, typescript/javascript and python.
ClawRouter CLAUDE.md
Claude Code instructions for BlockRunAI/ClawRouter, covering clawrouter, commands, project structure, key dependencies and conventions.
InvestSkill GEMINI.md
Instructions for yennanliu/InvestSkill, covering investskill — gemini cli setup & usage guide, installation & setup, quick start, navigate to the investskill directory and start gemini cli (loads gemini.md automatically).
apex-accelerator iac-bicep-best-practices.instructions.md
Bicep-specific IaC best practices for Azure templates. Security baseline, naming, AVM mandate, anti-patterns.
memex GEMINI.md
Instructions for STiFLeR7/memex, covering memex, agent instructions, execution mode, non-negotiables and what is in scope.