Skip to content
Data
Skill

/setup

Add keyless GBrain memory to an existing agent, or connect a hosted brain while preserving identity and configuration

From plugin
gbrain
30k77 skills
Install
$ npx -y skills add garrytan/gbrain --skill setup --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/setup

Context preview

The summary Claude sees to decide when to auto-load this skill.

Add keyless GBrain memory to an existing agent, or connect a hosted brain while preserving identity and configuration

SKILL.md

setup.SKILL.md
name: setup
description: Add keyless GBrain memory to an existing agent, or connect a hosted brain while preserving identity and configuration
triggers:
  - "set up gbrain"
  - "initialize brain"
  - "gbrain setup"
  - "install gbrain into this agent workspace"
  - "add gbrain to my agent"
tools:
  - get_stats
  - get_health
  - sync_brain
  - put_page
mutating: true

Set up GBrain memory

Give the agent the user already has a reliable memory. Preserve its identity, native memory, existing instructions, and unrelated configuration. Start with keyless storage and keyword retrieval. A private repository, identity interview, automatic capture, paid API key, or background service is not a prerequisite.

Contract

  • Select the intended brain and source before inspecting or changing installation state.
  • Reuse a healthy installation; diagnose partial or conflicting state without reinitializing memory.
  • Relay the mandatory search-mode matrix and obtain the operator's choice.
  • Save explicit memories with provenance and verify a randomized write/readback.
  • Report software installation, native instruction activation, and cross-conversation recall separately.
  • Automatic capture, imports, connectors, schedules, and paid enrichment require explicit opt-in.

Phase 1: Choose the path

Use the user's existing context; do not repeat choices they already made.

| Intent | Action | | --- | --- | | Add memory inside Grok Bot | Follow [Grok Bot](../../docs/guides/grok-bot.md) and the isolated [setup helper](../../docs/guides/in-agent-setup.md). Root: `/workspace/gbrain`, with data under `.gbrain`. | | Add memory inside Muse | Follow [Muse](../../docs/guides/muse.md). Establish its durable user-files location first. Do not invent `MUSE.md`, a persistent path, or a native MCP mechanism. | | Add memory to another existing agent | Follow [INSTALL_FOR_AGENTS.md](../../INSTALL_FOR_AGENTS.md); the [coding-agent tutorial](../../docs/tutorials/connect-coding-agent.md) covers Claude Code and Codex. | | Connect an existing hosted brain | Follow [hosted harness access](../../docs/guides/hosted-harness-access.md). Provision on the host and install the private handoff inside the intended harness. | | Explicitly create a new personal agent with identity and a private repo | Follow [BOOTSTRAP_FOR_AGENTS.md](../../BOOTSTRAP_FOR_AGENTS.md). `gbrain bootstrap` is for this explicit request. | | Explicitly configure per-worktree code engines with shared artifacts | Follow [topologies](../../docs/architecture/topologies.md). Brain and source routing must be set independently. |

If intent is unclear, default to memory for the existing agent. Ask only for missing information needed to choose a safe target, such as which existing brain to connect or which Muse directory is durable.

Phase 2: Inspect, install, or repair

For an existing installation, use its recorded absolute launcher when present:

gbrain engine status --json
gbrain engine status --probe

These commands work while the database is down. Inspect the engine, configuration provenance, root, and source. Ambient database/MCP settings or a working-directory mount are not authorization to adopt that database. `GBRAIN_HOME` alone does not isolate all routing.

For Grok Bot/Muse, let the setup helper inspect and isolate the chosen root. Do not run another global init around it. Its receipt distinguishes absent, partial, malformed, and conflicting state. Repair uses the retained `<root>/bin/gbrain-setup`; adoption and upgrades require explicit options. Never replace existing memory to recover from an initialization error.

For other local installations, resolve conflicting routing before following the canonical distribution and keyless initialization:

bun install -g github:garrytan/gbrain#latest-stable
gbrain init --pglite --no-embedding

Install Bun first if missing, following [INSTALL_FOR_AGENTS.md](../../INSTALL_FOR_AGENTS.md). Do not use the unrelated npm package named `gbrain`, or `bun add` in the user's current project. Local/thin-client conversion requires explicit intent and preservation of the previous configuration.

**Required search-mode choice:** initialization may select a noninteractive default and print a nine-cell cost matrix with `[AGENT]` markers. Relay that matrix and confirm the operator's choice before continuing. Follow Step 3.5 of [INSTALL_FOR_AGENTS.md](../../INSTALL_FOR_AGENTS.md); use the printed matrix, not remembered prices. Illustrative model API costs are separate from a harness subscription. This choice does not enable paid APIs or capture.

If the user explicitly wants Postgres, follow [engines](../../docs/ENGINES.md) or [postgres-adopt](../postgres-adopt/SKILL.md). `--prefer-postgres` is optional. Supabase uses a database connection string, not an anon key. Keep credentials private and do not copy ambient secrets into file configuration.

Hosted alternative

Skip local database initialization, import, and maintenance installation. The owner provisions a `memory-writer` grant on the brain host or through its authenticated admin API using `gbrain mcp grant` and a private `--credentials-out` file. Use the actual harness identifier. A running PGLite server must use its existing engine; do not open the live database in a second process. A URL or ordinary OAuth token is not administration authority.

Privately transfer the handoff to the intended harness, then install there:

gbrain connect https://brain.example.com/mcp --harness codex \
  --credentials-file /absolute/private/agent-example.json --install

Thin CLI adapters also need the verified persistent `--root`. Follow the adapter's reload instructions and the complete [hosted guide](../../docs/guides/hosted-harness-access.md). Do not grant `admin` merely to make a convenience health command pass. Delegation requires an explicit choice, bound tools, an active source, and a path policy. New delegation has unlimited spending and conc

Read more
Ships withgbrain

Give the agent you already use a memory you control. GBrain stores explicit facts with their sources, supports corrections and withdrawal, and makes the same memory available across your agents.

Get the whole plugin
Stats
29,904
Stars
4,463
Forks
Active
Maintenance
TypeScript
Language
MIT
License
3d ago
Last commit
5mo ago
Created

Repo: garrytan/gbrain

Other skills on gbrain.

brain-ops
Skill

brain-ops

Brain knowledge base operations. The core read/write cycle: brain-first lookup, read-enrich-write loop, source attribution, ambient enrichment, back-linking.…

@garrytan@garrytanView Skill