maintain
What it does
This skill runs a health check on your personal brain. It looks for stale facts, orphan pages, dead links, missing citations, and misfiled notes.
When to use it
- ✓When you ask your agent to check the health of your brain or run maintenance.
- ✓When you want to find pages with broken links, missing sources, or out-of-date facts.
- ✓When you want a count of problems in each area of your brain, with a fix for each one.
Skill link
https://github.com/garrytan/gbrain/blob/master/plugin-variants/gbrain-coding/skills/maintain/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Check my brain for broken links, old facts, and pages nobody links to, and tell me how to fix them.”
5 new skills a week. 1 minute to read.
How it works
The agent reviews each part of the brain, from links and citations to file placement and tags. It reports counts for each area and a suggested fix for every problem it finds.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Maintain Skill
Periodic brain health checks and cleanup.
Contract
This skill guarantees:
- All health dimensions are checked (stale, orphan, dead links, cross-refs, backlinks, citations, filing, tags)
- Each issue found has a specific fix action
- Back-link iron law is enforced
- Citation format is validated against the standard
- Results are reported with counts per dimension
Phases
Ownership failures are an inspection boundary
Routine maintenance, startup checks, doctor --fix, and a request to "fix what's
broken" do not authorize writer topology changes. On owner_unavailable or a
writer coordination refusal, inspect gbrain sources writer status --brain <id> --json on the selected host first and report the owner, epoch, enabled state and
blocked recovery to the operator. Do not claim a checkout, activate managed mode,
transfer an owner, replace identities, or remove ownership markers as a repair.
When the status reads enabled: false and the refusal says unbound_source,
the brain is in classic mode on purpose: report that writes go through the
checkout (file, commit, gbrain sync) and leave it classic.
Deliberate administration requires a separately approved topology change and the
action-specific intent plus reviewed state precondition described in
docs/architecture/topologies.md. Neither a TTY nor --yes nor
--confirm-quiesced substitutes for that decision. Remote credentials remain
ineligible for local writer administration.
Autonomous path (v0.36.4.0) — when you want to reach a target score
If the user asks "get my brain to 90/100" or "fix what's broken", preview first and ask before applying anything:
gbrain doctor --remediation-plan --json # preview: job steps + repair steps
# Show the user the repair steps (each "requires user agreement") and the cost.
# Only after the user agrees (plan_hash from the preview binds the approval):
gbrain doctor --remediate --yes --include-repairs --expect <plan_hash> --target-score 90 --max-usd 5
--remediation-plan prints a dependency-ordered list of job steps (sync before
extract, embed after consolidate, etc.) with per-step est_seconds and
est_usd_cost, and, independent of the score target, the PROTECTED repair steps
for every gbrain repair kind with pending items. Each step carries the exact
command that applies it, and the plan ends with one combined command.
--remediate runs the repair steps only with --include-repairs (the user's
agreement; without it they are listed as skipped), then walks the job plan,
submitting each step as a Minion job and re-checking score between steps.
--max-usd N is a cumulative cost cap across the run and every --resume: a
paid step that would exceed it is not started, free steps still run, and the run
stops with a resume command that keeps the cap and the agreement.
When the target score is unreachable for the brain (empty brain with no entity
pages → graph_coverage caps at 70; unconfigured embedding key → caps at 60),
job steps stop with a list of what's missing rather than looping; included repair
steps still run. --json classifies each finding cleared, pending,
consent_required, operator_required (follow its instruction) or
unsupported (report it; nothing clears it yet). After an upgrade, follow the
recipe in docs/guides/repair.md#recover-after-upgrading-to-this-release.
Use the per-dimension walk below (Phase 2 onward) when:
- The user explicitly asks for a dimension-by-dimension audit
- You're investigating why score is stuck below
--remediate's ceiling - A specific dimension needs manual judgment that the auto path skips
Manual path
- Run health check. Check gbrain health (
get_health) to get the dashboard.get_healthneeds admin scope; without it, callget_brain_health(read scope), which returns bands only (write capacity, write failures, ghost pages, unsearchable chunks), and skip the dimensions it cannot answer: stale pages, orphan pages, dead links, embed coverage, link and timeline counts and the brain score. Name the skipped dimensions in the report and ask for an admin token, or forgbrain doctor --jsonon the brain host, to cover them. - Check each dimension:
Stale pages
Pages where compiled_truth is older than the latest timeline entry. The assessment hasn't been updated to reflect recent evidence.
- Check the health output for stale page count
- For each stale page: read the page from gbrain, review
FAQ
Does it fix problems on its own?
It focuses on finding problems and naming a fix for each. It does not make major changes to how your brain is stored.
Does it check citations?
Yes. It checks that facts follow the standard citation format and reports any that do not.
Can it find pages that nothing links to?
Yes. It looks for orphan pages, which are pages no other page links to.
Details
Original description by the author
Brain health checks: back-link enforcement, citation audit, filing validation, stale info detection, orphan pages, and benchmarks. Use when asked to check brain health, run maintenance, or audit quality.
repo: garrytan/gbrain
Popularity
- GitHub stars
- 31k
- Ranking position
- #9261
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
gbrain
31kLets your agent search a shared company knowledge brain for facts about people, projects and decisions, and save durable notes to it.
brain-ingest-gate
31kChecks new content against an existing knowledge brain before it is added, to avoid duplicates and resolve named entities first.
brain-link-discipline
31kMakes sure your agent includes a working link to each brain page it reports, in the same message, so you can open it right away.
brain-ops
31kGives your agent the core routine for a knowledge brain: check existing context first, save explicit notes with their source, and link related pages.
Similar skills
technical-documentation
394kHelps your agent write and review clear technical docs and agent instruction files, so people and AI tools can follow them easily.
architecture-decision-records
280kHas your agent record important project structure decisions. It helps to understand the reasoning behind choices and maintain a clear history of changes.
code-tour
280kLets your agent create step-by-step code walkthroughs with exact file and line references. Useful for intros, explanations, and reviews.