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 skills/jame581/logseqbrain/brain-doctornpx skills add jame581/LogseqBrain --skill brain-doctorgit clone --depth 1 https://github.com/jame581/LogseqBrainWrote 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.
[](https://agentmods.dev/skills/jame581/logseqbrain/brain-doctor)<a href="https://agentmods.dev/skills/jame581/logseqbrain/brain-doctor"><img src="https://agentmods.dev/badge/skills/jame581/logseqbrain/brain-doctor.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00114 | $0.02449 |
| Opus 5 | $0.00057 | $0.01224 |
| Sonnet 5 | $0.00023 | $0.00490 |
| Haiku 4.5 | $0.00011 | $0.00245 |
Grade A, and why
brain-doctor 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 5d 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 — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Brain Doctor
Scan the whole graph for the format mistakes that silently corrupt a Logseq graph — inline code wrapped in {{ }} (broken macros), bare #number/hex tags and un-namespaced [[links]] (phantom empty pages), [[file://]] links, junk/description links, and un-fenced Jira markup residue — plus data-quality checks — malformed properties, broken/duplicate entries, and missing-structure gaps (see the full catalog in skills/_shared/hygiene-rules.md) — then report them and, on confirmation, repair them. This is a maintenance tool: run it on demand, not as part of the save/load cycle.
See skills/_shared/hygiene-rules.md for the full catalog: each rule with its detection pattern, auto-fixable tier, and remediation. The compose-time rules these checks enforce live in skills/_shared/logseq-format.md.
Modes
- Report (default, "lint brain" / "check brain health" / "why are there empty pages"): detect and summarize, change nothing.
- Fix ("fix brain" / "clean up brain" / explicit "yes, fix them" after a report): repair after a backup, with the user's confirmation.
If the trigger is ambiguous, run Report first and offer to fix.
Prerequisites
Resolve the graph path per skills/_shared/path-resolution.md.
Process
-
Scan. For each rule in
skills/_shared/hygiene-rules.mdwithenforced-at: scan(all 14), run its detection acrosspages/andjournals/. Collect counts and 1–2 example locations per rule. Stay read-only in this phase. -
Report. Present a compact health summary grouped by the rule's
auto-fixablefield:- Auto-fixable (
yes/safe-only):code-in-braces,bare-hash-tag,unnamespaced-link,file-link,malformed-property(safe tiers only). - Needs your call (
report):description-link,broken-link(with suggested matches),duplicate-entry(the duplicate groups),structural-integrity(missing props / stub sections),jira-markup(unfenced Jira residue — suggests the fence wrap),missing-digest(pages with no digest, largest first),stale-digest(digest older than the page),stale-map(Map claims figures that no longer match the page's measured bytes),oversized-digest(digest over the 800 B cap — report only; never trim on-disk content automatically). Example:
Brain health: 16 issues across 8 pages Auto-fixable (5): 3 {{code}}, 1 bare #tag, 1 malformed property Needs your call (7): 2 broken links (1 likely typo → suggests [[Tasks/CRMGM-1982]]), 3 duplicate Session Log entries, 2 pages missing last-updated:: Digests (4): 4 pages with no digest (Fat 109 KB, …) — say "backfill digests"The headline total counts every bucket — 5 + 7 + 4 = 16. Digests are broken out for readability, never excluded from the count; a total that quietly omits a bucket is the same under-reporting this release exists to eliminate. If the graph is clean, say so and stop — no backup, journey-log just
ran brain-doctor (clean). - Auto-fixable (
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.
- 5d ago First seen · 88 lines · 114 tokens per session scan A e80115224979
brain-doctor is a skill published in the GitHub repository jame581/LogseqBrain (17 stars, last pushed 1mo ago), licensed MIT. It adds 114 tokens to every session and 2,449 once invoked, about $0.0006 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 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…
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"…
Context Doctor
Identify and repair degradation in system prompt, external memory, and skills preventing you from following instructions or remembering information as well as you should.
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…
memory-recall
Search and recall relevant memories from past sessions via memsearch. Use when the user's question could benefit from historical context, past decisions, debugging notes, previous conversations, or project knowledge -- especially questions like 'what did I decide about X', 'why did we do Y', or 'have I seen this…
system-monitor
Monitor system health: CPU, memory, disk, processes, and network. Alert on thresholds via any channel.