setup-gbrain

Installs and configures the gbrain CLI, MCP registration, and per-repo trust policy for coding agents.

1|Updated Jul 23, 2026
One-click install
npx skills add https://github.com/sanjanb/my-agent-harness --skill setup-gbrain-sanjanb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-gbrain
Source: https://github.com/sanjanb/my-agent-harness/tree/main/skills/setup-gbrain
Command: npx skills add https://github.com/sanjanb/my-agent-harness --skill setup-gbrain-sanjanb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up a persistent memory and semantic search backend (gbrain) for a coding agent involves many manual steps: installing the CLI, initializing a local PGLite or Supabase store, registering the MCP server, and defining trust policies per git remote. This Skill automates that entire flow with a single command and is idempotent, so re-running it repairs missing pieces instead of duplicating work. ## Core Features & Use Cases - End-to-end gbrain setup: Installs the gbrain CLI, initializes a local PGLite or Supabase brain, and registers the MCP server (local stdio or remote HTTP with bearer token verification). - Transcript and memory ingest: Ingests Claude Code and Codex session transcripts, learnings, timelines, and design docs into gbrain, with optional gitleaks secret scanning and per-repo deny policies. - Trust policy and artifacts sync: Captures per-remote trust policy, provisions a private artifacts repo for cross-machine sync, and writes a GBrain configuration block to CLAUDE.md. - Use Case: A developer on a new machine runs the setup once and the agent gains semantic code search (gbrain search, code-def, code-refs) plus recall of prior sessions, with a GREEN/YELLOW/RED verdict block confirming each component. ## Quick Start Ask the agent to set up gbrain on this machine, including installing the CLI, initializing the brain store, and registering the MCP server.

Frequently Asked Questions about setup-gbrain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up gbrain for my coding agent?

Run the setup-gbrain skill, which installs the gbrain CLI, initializes a local PGLite or Supabase brain, registers the MCP server, and captures a per-remote trust policy. The flow is idempotent, so re-running it repairs only missing pieces.

How do I connect gbrain over a remote MCP server?

Use the Path 4 remote MCP flow: provide the MCP URL and a bearer token issued by the brain admin. The skill verifies connectivity, classifies NETWORK, AUTH, or MALFORMED failures, and registers the server at user scope via claude mcp add.

Does gbrain setup scan my transcripts for secrets?

Per-file gitleaks scanning during memory ingest is opt-in and off by default. Enable it with the --scan-secrets flag or the GSTACK_MEMORY_INGEST_SCAN_SECRETS environment variable; sessions with positive findings are skipped entirely.

Can I use gbrain with Supabase instead of local storage?

Yes, the setup flow supports both local PGLite and Supabase engines. With Supabase configured, code and transcripts go to Supabase Storage while curated memory syncs through the brain-linked git repo.

What happens to repos under a deny trust policy?

Repos under a deny trust policy are skipped entirely during ingest. Neither code nor transcripts from those repos are ingested into gbrain, and sessions without a resolvable git remote are skipped by default.