# Maintain

Brain health checks: back-link enforcement, citation audit, filing validation, stale...

- Repository: https://github.com/garrytan/gbrain (31427 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add garrytan/gbrain --skill maintain -g -a claude-code -y`
Codex: `npx skills add garrytan/gbrain --skill maintain -g -a codex -y`
Cursor: `npx skills add garrytan/gbrain --skill maintain -g -a cursor -y`
Gemini CLI: `npx skills add garrytan/gbrain --skill maintain -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add garrytan/gbrain`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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:

The rest: https://github.com/garrytan/gbrain/blob/HEAD/plugin-variants/gbrain-coding/skills/maintain/SKILL.md
