setup-gbrain
Skill by garrytan
Set up gbrain, a persistent knowledge base, for a coding agent. It installs the CLI, initializes a local PGLite or Supabase brain, and registers the MCP server for Claude Code and Codex CLI.
Install setup-gbrain
Built from the published package, never by AI.
git clone --depth 1 https://github.com/garrytan/gstack /tmp/gstack && mkdir -p ~/.claude/skills && cp -r /tmp/gstack/setup-gbrain ~/.claude/skills/setup-gbrainRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/garrytan/gstack /tmp/gstack && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/gstack/setup-gbrain ~/.gemini/antigravity-cli/skills/setup-gbrainAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill sets up gbrain, a persistent knowledge base, on a local machine so a coding agent such as Claude Code can call it as both a CLI and an MCP tool. It detects the current state, asks where the brain should live, installs the gbrain CLI if it is missing, and initializes either a local PGLite brain or a Supabase brain. It registers the local MCP server for Claude Code and Codex CLI when they are installed, and it records the setup in CLAUDE.md and AGENTS.md.
The skill also covers a per-remote trust policy for repositories and an ingest gate for transcripts and memory. It is meant for developers who want a memory layer their coding agent can read and write. A PGLite brain needs no accounts and stays on one machine. Users whose openclaw or hermes agents run in cloud containers can share a brain with local Claude Code only through a shared Supabase Postgres database.
Written from the project's SKILL.md and checked against it.
What it can do
- Detect stateChecks whether gbrain is on PATH, its config, engine, and doctor status before setup.
- Install CLIInstalls the gbrain command-line tool when it is missing.
- Initialize brainCreates a local PGLite brain or connects to a Supabase brain.
- Auto-provision SupabaseCreates a new Supabase project using a Personal Access Token.
- Register MCP serverRegisters the local gbrain MCP server in Claude Code and Codex CLI when installed.
- Trust policySets a per-remote trust policy for the current repository.
- Persist configurationWrites a GBrain Configuration block to CLAUDE.md and AGENTS.md.
- Engine switchMigrates an existing brain between the PGLite and Supabase engines.
What you need
- Claude Code or Codex CLI for automatic MCP registration
- Supabase account and Personal Access Token for auto-provisioning
- Supabase Session Pooler connection string for an existing Supabase brain
- macOS, Linux or Windows
Try asking
- setup gbrain
- install gbrain and create a local PGLite brain
- connect gbrain to my existing Supabase database
Good to know
- Automatic MCP registration covers Claude Code and Codex CLI only.
- Other local hosts such as Cursor need a manual gbrain serve entry in their MCP config.
- Sharing a brain with cloud agents requires a shared Supabase Postgres database.
Security check
B- Allowed to use Bash, Write, Edit without limitsIn
SKILL.md
Checked automatically: setup-gbrain/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: BashReadWriteEditGlobGrepAskUserQuestionBash(~/.claude/skills/gstack/bin/gstack-skill-load:*)
-
SKILL.md35 KB -
SKILL.md.tmpl30 KB -
memory.md20 KB -
sections/brain-init.md12 KB -
sections/brain-init.md.tmpl11 KB
Show all 15 files
-
sections/claude-md-persist.md3 KB -
sections/claude-md-persist.md.tmpl3 KB -
sections/engine-remediation.md4 KB -
sections/engine-remediation.md.tmpl4 KB -
sections/local-mcp.md5 KB -
sections/local-mcp.md.tmpl5 KB -
sections/manifest.json2 KB -
sections/preamble.md1 KB -
sections/transcript-gate.md5 KB -
sections/transcript-gate.md.tmpl5 KB
Alternatives to setup-gbrain
All alternatives →Set up and diagnose a local agentmemory installation. It covers MCP connections, environment variables, ports, auth and feature flags, and is for users getting started or checking a connection.
Analyzes a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit links and topic clusters. Built for people who maintain LLM-generated markdown wikis.
Saves and loads timestamped reports for AI assistants, with keyword routing for fast lookup. It also runs an Actionability Gate that checks report links before delivery. Intended for morning briefings, meeting digests and research reports.
Removes a personal fact, preference, relationship detail, topic or past event from Muse's active memory. It also stops existing copies and automations from bringing it back.
Git Context Controller (GCC) is a skill that stores agent memory as a versioned file system under .GCC/. It suits multi-step projects that need milestone tracking, branching and context recovery across sessions.
Guides an evidence-first reading of a book, article, PDF or document set. Built for readers who want claims, evidence and recall rather than a short summary.
Compare with agentmemory-config, understand-knowledge or reports
setup-gbrain: common questions
What is the difference between a PGLite brain and a Supabase brain?
PGLite is a local brain on one machine with zero accounts. Supabase is a Postgres database that can be shared with cloud agents or teammates.
Can I connect to a gbrain run by someone else?
Yes. Path 4 registers a remote gbrain MCP server running HTTP transport, using an MCP URL and a bearer token, with no local brain database.
Does this work with Cursor?
The gbrain CLI goes on PATH for other local hosts. Cursor users can add gbrain serve to their own MCP config manually after setup.
How do I install setup-gbrain?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is setup-gbrain free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is setup-gbrain safe to use?
It scores 94 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (allowed to use bash, write, edit without limits). Review the code before you install. How grades work.
What are alternatives to setup-gbrain?
Similar skills: agentmemory-config, understand-knowledge, reports, forget.
