brain-doctor
Skill by jame581
Lints and repairs the Claude Brain Logseq graph, finding format mistakes that create phantom pages or broken macros. Built for people who keep a Claude Brain graph in Logseq and want to clean it up.
Install brain-doctor
Built from the published package, never by AI.
git clone --depth 1 https://github.com/jame581/LogseqBrain /tmp/LogseqBrain && mkdir -p ~/.claude/skills && cp -r /tmp/LogseqBrain/plugin/skills/brain-doctor ~/.claude/skills/brain-doctorRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/jame581/LogseqBrain /tmp/LogseqBrain && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/LogseqBrain/plugin/skills/brain-doctor ~/.gemini/antigravity-cli/skills/brain-doctorAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
brain-doctor is an agent skill for the Claude Brain Logseq graph. It scans the whole graph for format mistakes that can silently corrupt it, such as phantom pages and broken macros. It reports what it finds, grouped by whether the issue can be fixed automatically or needs the user's decision. Its triggers include "lint brain", "check brain health", "fix brain" and "backfill digests".
Detection runs through a shared helper command, brain lint --all, and the skill follows a catalog of rules for meaning, tiers and remediation. Report mode changes nothing. Fix mode makes a backup and asks for confirmation before any write. Judgment cases such as broken links and duplicate entries are left for the user to decide. Loads, saves, status checks and first-time setup are handled by other skills. The skill is aimed at people who maintain a Logseq graph used with Claude.
Written from the project's SKILL.md and checked against it.
What it can do
- Whole-graph lintScans every mechanical rule and the digest rules, reporting each finding by file, line and tier.
- Report modeSummarizes issues in auto-fixable and needs-your-call groups without changing any file.
- Fix modeRepairs findings after a backup and confirmation, with mechanical classes fixed in one pass.
- Digest backfillBuilds missing digests after stating the read cost and getting one confirmation.
- Digest rebuildRebuilds the digest for a named project when asked to rebuild digest for a project.
- Backup before writesCopies the pages, journals and logseq folders to a timestamped folder before any change.
- Post-repair verificationRe-lints changed files and checks backtick parity after repairs.
- Activity loggingRecords each run with brain activity so changes are traceable.
What you need
- Logseq with a Claude Brain graph
- Bash shell, or Git for Windows (Git Bash) on PowerShell-only Windows
Try asking
- lint brain
- Why are there empty pages in my brain graph?
- Backfill digests for my project pages
Good to know
- Broken-link, duplicate-entry and structural-integrity changes are never written automatically.
- Empty pages left by fixed text remain until Logseq is re-indexed.
- Close Logseq or pause Sync during a bulk fix.
- Not for loads, saves, status checks or first-time setup.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: plugin/skills/brain-doctor/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to brain-doctor
All alternatives →Set up and diagnose a local agentmemory installation. It covers MCP connections, environment variables, ports, auth and feature flags, and is for users getting started or checking a connection.
Analyzes a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit links and topic clusters. Built for people who maintain LLM-generated markdown wikis.
Saves and loads timestamped reports for AI assistants, with keyword routing for fast lookup. It also runs an Actionability Gate that checks report links before delivery. Intended for morning briefings, meeting digests and research reports.
Removes a personal fact, preference, relationship detail, topic or past event from Muse's active memory. It also stops existing copies and automations from bringing it back.
Git Context Controller (GCC) is a skill that stores agent memory as a versioned file system under .GCC/. It suits multi-step projects that need milestone tracking, branching and context recovery across sessions.
Guides an evidence-first reading of a book, article, PDF or document set. Built for readers who want claims, evidence and recall rather than a short summary.
Compare with agentmemory-config, understand-knowledge or reports
brain-doctor: common questions
Does brain-doctor change my graph automatically?
Report mode changes nothing. Fixes run only after a backup and confirmation, and some classes, such as broken links and duplicate entries, are never written automatically.
Why are there empty pages left after a fix?
Logseq never deletes a page once it has parsed one, so empty pages survive until the graph is re-indexed in Logseq (All graphs, then Re-index).
What does a digest backfill do?
It builds missing Digest sections for pages. It reports the read cost and asks for one confirmation first, with project pages included by default.
How do I install brain-doctor?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is brain-doctor free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is brain-doctor safe to use?
It scores 52 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to brain-doctor?
Similar skills: agentmemory-config, understand-knowledge, reports, forget.
