maintain

maintain is a skill for Claude Code from garrytan/gbrain. It costs 44 tokens per session (7,433 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 · 33,897 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,433 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.07433
Opus 5.5 $0.00018 $0.02973
Sonnet 5.5 $0.00009 $0.01487
Haiku 4.5 $0.00004 $0.00743

Measured 8d ago against content hash 89118a76f4fd, 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 8d 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, 279 lines differ
  • maintain — 83% identical, 273 lines differ
plugin-variants/gbrain-coding/skills/maintain/SKILL.md · 614 lines

How it starts

The opening of the file, as written. The whole thing — 614 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 · 614 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. 8d ago Changed · +3 lines 89118a76f4fd
  2. 9d ago Changed · +2 lines 886159a6baee
  3. 11d ago Changed · -1 lines cef26dd09622
  4. 19d ago Changed · +4 lines 6f3f3584ae0a
  5. 21d ago Changed · +4 lines caca12a4e724
  6. 1mo ago Changed · +2 lines 577df95df875
  7. 1mo ago Changed · +7 lines f2c61a8947a3
  8. 1mo ago Changed · +6 lines 6ae1d1a71d76
  9. 1mo ago Changed · +1 lines 03e8616ed41e
  10. 1mo ago First seen · 586 lines · 44 tokens per session scan A a7225cb031c8

Subscribe to this mod's changes

maintain is a skill published in the GitHub repository garrytan/gbrain (33,897 stars, last pushed today), licensed MIT. It adds 44 tokens to every session and 7,433 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

maintain compared with skills from other repositories

maintain next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
maintaingarrytan/gbrainSkill34ktodayMITA44Claude Code
knowledge-ingestopenclaw/openclawSkill396ktodayMITA80Claude Code, Codex
mem0-oss-to-platformmem0ai/mem0Skill70ktodayApache-2.0A217Claude Code, Codex
forgetasgeirtj/system_prompts_leaksSkill74ktodayCC0-1.0A0Claude Code, Codex
Cortexdanielmiessler/LifeOSSkill21k16d agoMITA184Claude Code
ha-data-storesshiwenwen/hope-agentSkill1.9kyesterdayMITA115Claude Code, Codex
memoryopensquilla/opensquillaSkill7.2k9d agoApache-2.0A44Claude Code, Codex