# Gbrain Upgrade

> Check and apply upstream gbrain upgrades safely, while keeping the Codex port's local substrate honest.

- Skill: `mphaxise/gbrain-upgrade` (Agent Skill)
- Install (CLI): `npx skillmds@latest add mphaxise/gbrain-upgrade`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mphaxise/gbrain-upgrade/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: mphaxise (https://skillmd.com/u/mphaxise)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/mphaxise/gbrain-upgrade

---


# GBrain Upgrade

Use this skill when the user asks to update, upgrade, or verify upstream GBrain availability.

This port was reconciled against `garrytan/gbrain` at commit
`0b47afbf402a4e27a648bb9d131ce584461461ea`.

## Workflow

1. Determine which layer is being updated:
   - upstream `gbrain` CLI
   - this Codex port's GBrain skill files
   - this repo's local `brain/` substrate
2. Check local state before mutation:
   - `git status --short`
   - `codex --version`
   - `command -v gbrain`
   - `python3 scripts/brain_doctor.py`
3. Refresh the current official Codex manual before judging whether a local fallback is still necessary:
   - `node "${CODEX_HOME:-$HOME/.codex}/skills/.system/openai-docs/scripts/fetch-codex-manual.mjs"`
   - review the relevant skills, MCP, plugins, memories, automations, sandboxing, and local environment sections
4. If the upstream CLI exists, use read-only upgrade checks first:
   - `gbrain self-upgrade --check-only --json` when available
   - `gbrain --version`
   - `gbrain doctor`
5. Apply upgrades only after the user approves, unless they explicitly requested the upgrade.
6. Re-run local validation after any update.

## Codex Adaptation

- This skill never runs a command parsed out of an `UPGRADE_AVAILABLE` marker.
- The only allowed upstream self-upgrade commands are hardcoded `gbrain self-upgrade` or `gbrain upgrade`.
- If the upstream CLI is absent, continue with this repo's file-backed GBrain port and report the absence plainly.
- Prefer current documented Codex capabilities over older Claude Code compatibility fallbacks; keep the file-backed brain and CLI/MCP fallbacks only where current host state requires them.

## Guardrails

- Do not block unrelated work on an optional upstream CLI upgrade.
- Do not convert this repo's local `brain/` corpus into another storage backend during an upgrade.
- Do not claim full upstream parity after only updating the Codex skill port.
- Do not rely on stale memory for Codex host behavior when the official manual can be refreshed.

