Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 94
  • 143k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity 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-gbrain

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install setup-gbrain in Claude Code

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 →

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.

setup-gbrain Install

Add to stack

Loading.