maintain

maintain is a skill for Claude Code from garrytan/gbrain. It costs 44 tokens per session (7,007 once invoked), scanned A, original, MIT.

A maintenance and health-check tool for a knowledge base. It checks citations, links, organization, stale information, missing pages, and other quality issues.

In plain words
What is it for?
Use it to audit brain health, find specific issues and fixes, or automatically improve the health score under a set cost cap.
Why use it?
It finds problems that make stored information harder to trust or retrieve, and can propose or run ordered repair steps within a spending limit.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: mentions subagents; built for gbrain.

Part of the gbrain-coding plugin — 21 skills shipped together

Good fit Use it to audit brain health, find specific issues and fixes, or automatically improve the health score under a set cost cap.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/garrytan/gbrain/maintain
About the project

GBrain is a memory and retrieval layer for AI agents that searches, connects, and synthesizes information from stored sources. It is used to give coding agents and autonomous agents access to knowledge beyond their current code, including shared company information with access controls. The catalogue add-ons help agents operate GBrain and connect it to agent workflows.

garrytan/gbrain · 31,034 stars · on GitHub

Install

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.

Any agent
npx skills add garrytan/gbrain --skill maintain
Clone the repo
git clone --depth 1 https://github.com/garrytan/gbrain

Made for: Claude Code.

Or install gbrain-coding, the plugin that ships this one along with the rest of its 21 skills.

Wrote 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.

agentmods badge for maintain

README.md
[![agentmods](https://agentmods.dev/badge/skills/garrytan/gbrain/maintain/github.svg)](https://agentmods.dev/skills/garrytan/gbrain/maintain)
Your own site
<a href="https://agentmods.dev/skills/garrytan/gbrain/maintain"><img src="https://agentmods.dev/badge/skills/garrytan/gbrain/maintain/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for maintain

Your own site · 80×15
<a href="https://agentmods.dev/skills/garrytan/gbrain/maintain"><img src="https://agentmods.dev/badge/skills/garrytan/gbrain/maintain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,007 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 357
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 416
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 451
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 459
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Excessive Agency · line 464
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.07007
Opus 5.5 $0.00018 $0.02803
Sonnet 5.5 $0.00009 $0.01401
Haiku 4.5 $0.00004 $0.00701

Measured 3d ago against content hash 6ae1d1a71d76, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

maintain 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

  • maintain — 86% identical, 246 lines differ
  • maintain — 83% identical, 240 lines differ
plugin-variants/gbrain-coding/skills/maintain/SKILL.md · 593 lines

How it starts

The opening of the file, as written. The whole thing — 593 lines — stays where its author put it; the contents beside it link to each section on 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

Read the full file on GitHub · 593 lines

Changes

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.

  1. 3d ago Changed · +6 lines 6ae1d1a71d76
  2. 6d ago Changed · +1 lines 03e8616ed41e
  3. 8d ago Changed · +3 lines a7225cb031c8
  4. 9d ago Changed · +3 lines c8ce4eb13c36
  5. 11d ago Changed · +4 lines c4db6f877ddc
  6. 12d ago Changed · -10 lines 32f68f61c55d
  7. 13d ago Changed · +22 lines 29d5e31faa15
  8. 14d ago Changed · +1 lines 6938634105a6
  9. 15d ago Changed 454a670231ea
  10. 16d ago First seen · 563 lines · 44 tokens per session scan A 6528d9fb5d23

Subscribe to this mod's changes

maintain is a skill published in the GitHub repository garrytan/gbrain (31,034 stars, last pushed today), licensed MIT. It adds 44 tokens to every session and 7,007 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other skills, from other repositories

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

forget

Remove a personal fact, preference, relationship detail, topic, or prior event from Muse's active memory and stop existing copies or automations from bringing it back. Use for explicit requests such as 'forget that', 'don't remember this about me', or 'remove that from your memory'. Do not use when 'forget it' merely…

asgeirtj/system_prompts_leaks · 74 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens

establishing-project-context

Use when the user asks to establish shared project language, or project work exposes a conflicting, renamed, or deprecated domain term that needs active semantic modeling. Routine small tasks stay on the fast path.

GanyuanRan/Aegis · 45 tokens