[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6N0T5SYRWGRF0YZDDBT08FN":3,"skill-same:01M6N0T5SYRWGRF0YZDDBT08FN":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":63,"repositoryHtmlUrl":64,"repositoryHomepageUrl":6,"ownerHtmlUrl":65,"ownerBlogUrl":66,"ownerDescription":67,"updatedAt":68,"install":69,"resources":81},"01M6N0T5SYRWGRF0YZDDBT08FN","setup",null,"Add keyless GBrain memory to an existing agent, or connect a hosted brain while preserving identity and configuration","garrytan\u002Fgbrain","garrytan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F19957?v=4","01M6DJCCDDG53MTYYRTXAXFG17","Garry Tan","01M6MZQZCEN3RRMD33E1X9ZZR9",32847,"MIT","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fskills\u002Fsetup\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"agent workspace","install","sync","brain","workspace","gbrain","health","my agent","stats","keyless","Existing","connect","true","up","page","memory","get","initialize","SET","2026-11-10 10:12:30",false,"---\nname: setup\ndescription: Add keyless GBrain memory to an existing agent, or connect a hosted brain while preserving identity and configuration\ntriggers:\n  - \"set up gbrain\"\n  - \"initialize brain\"\n  - \"gbrain setup\"\n  - \"install gbrain into this agent workspace\"\n  - \"add gbrain to my agent\"\ntools:\n  - get_stats\n  - get_health\n  - sync_brain\n  - put_page\nmutating: true\n---\n\n# Set up GBrain memory\n\nGive the agent the user already has a reliable memory. Preserve its identity,\nnative memory, existing instructions, and unrelated configuration. Start with\nkeyless storage and keyword retrieval. A private repository, identity interview,\nautomatic capture, paid API key, or background service is not a prerequisite.\n\n## Contract\n\n- Select the intended brain and source before inspecting or changing installation state.\n- Reuse a healthy installation; diagnose partial or conflicting state without reinitializing memory.\n- Relay the mandatory search-mode matrix and obtain the operator's choice.\n- Save explicit memories with provenance and verify a randomized write\u002Freadback.\n- Report software installation, native instruction activation, and cross-conversation recall separately.\n- Automatic capture, imports, connectors, schedules, and paid enrichment require explicit opt-in.\n\n## Phase 1: Choose the path\n\nUse the user's existing context; do not repeat choices they already made.\n\n| Intent | Action |\n| --- | --- |\n| Add memory inside Grok Bot | First choice: use the brain on your own computer over MCP — [remote-mcp](..\u002Fremote-mcp\u002FSKILL.md) publishes it (`--funnel`, the Bot runs in the vendor cloud), then [hosted harness access](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md) installs the private handoff in the Bot. No always-on machine: follow [Grok Bot](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fgrok-bot.md) and the isolated [setup helper](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fin-agent-setup.md). Root: `\u002Fworkspace\u002Fgbrain`, with data under `.gbrain`. |\n| Add memory inside Muse | First choice: use the brain on your own computer over MCP — [remote-mcp](..\u002Fremote-mcp\u002FSKILL.md) publishes it (`--funnel`), then [hosted harness access](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md) installs the private handoff in Muse. No always-on machine: follow [Muse](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fmuse.md). Either way, establish its durable user-files location first. Do not invent `MUSE.md`, a persistent path, or a native MCP mechanism. |\n| Memory for a bot that answers several people | `gbrain setup \u003Charness> --serves several --members \u003Cid,...>`; ask the user who the people are, never guess. Relay key file paths, never keys. Fix a `setup_serves_several`, `requester_scope_required` or `credential_scope_required` refusal with its `fix`. Pass `--stdio-member \u003Cid>` (claude-code, codex) only for a harness one person uses: it binds that harness's entry alone; refused where OpenClaw or Hermes runs. [Guide](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fsetup.md#a-brain-that-serves-several-people). |\n| Add memory to another existing agent | Follow [INSTALL_FOR_AGENTS.md](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002FINSTALL_FOR_AGENTS.md); the [coding-agent tutorial](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Ftutorials\u002Fconnect-coding-agent.md) covers Claude Code and Codex. |\n| Connect an existing hosted brain | Follow [mcp-access](..\u002Fmcp-access\u002FSKILL.md) and [hosted harness access](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md). Select native OAuth\u002FPKCE or a private machine handoff for the intended harness. |\n| Use the brain from other devices, apps or cloud agents over MCP | Follow [remote-mcp](..\u002Fremote-mcp\u002FSKILL.md): `gbrain mcp expose` publishes the local server on the Tailscale tailnet (Funnel only for cloud agents), then [mcp-access](..\u002Fmcp-access\u002FSKILL.md) \u002F hosted access selects native OAuth or a private machine handoff for each consumer. |\n| Explicitly create a new personal agent with identity and a private repo | Follow [BOOTSTRAP_FOR_AGENTS.md](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002FBOOTSTRAP_FOR_AGENTS.md). `gbrain bootstrap` is for this explicit request. |\n| Explicitly configure per-worktree code engines with shared artifacts | Follow [topologies](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Farchitecture\u002Ftopologies.md). Brain and source routing must be set independently. |\n\nIf intent is unclear, default to memory for the existing agent. Ask only for\nmissing information needed to choose a safe target, such as which existing\nbrain to connect or which Muse directory is durable.\n\n## Phase 2: Inspect, install, or repair\n\nFor an existing installation, use its recorded absolute launcher when present:\n\n```bash\ngbrain engine status --json\ngbrain engine status --probe\n```\n\nThese commands work while the database is down. Inspect the engine,\nconfiguration provenance, root, and source. Ambient database\u002FMCP settings or a\nworking-directory mount are not authorization to adopt that database.\n`GBRAIN_HOME` alone does not isolate all routing.\n\nFor Grok Bot\u002FMuse, let the setup helper inspect and isolate the chosen root.\nDo not run another global init around it. Its receipt distinguishes absent,\npartial, malformed, and conflicting state. Repair uses the retained\n`\u003Croot>\u002Fbin\u002Fgbrain-setup`; adoption and upgrades require explicit options.\nNever replace existing memory to recover from an initialization error.\n\nFor other local installations, resolve conflicting routing before following\nthe canonical distribution and keyless initialization:\n\n```bash\nbun install -g github:garrytan\u002Fgbrain#stable\ngbrain init --pglite --no-embedding\n```\n\nInstall Bun first if missing, following\n[INSTALL_FOR_AGENTS.md](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002FINSTALL_FOR_AGENTS.md). Do not use the unrelated\nnpm package named `gbrain`, or `bun add` in the user's current project.\nLocal\u002Fthin-client conversion requires explicit intent and preservation of the\nprevious configuration.\n\n**Required search-mode choice:** initialization may select a noninteractive\ndefault and print a nine-cell cost matrix with `[AGENT]` markers. Relay that\nmatrix and confirm the operator's choice before continuing. Follow Step 3.5 of\n[INSTALL_FOR_AGENTS.md](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002FINSTALL_FOR_AGENTS.md); use the printed matrix,\nnot remembered prices. Illustrative model API costs are separate from a\nharness subscription. This choice does not enable paid APIs or capture.\n\nIf the user explicitly wants Postgres, follow [engines](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002FENGINES.md)\nor [postgres-adopt](..\u002Fpostgres-adopt\u002FSKILL.md). `--prefer-postgres` is optional.\nTell the user once: on Postgres, a source with a checkout starts in classic\nmode, where the checkout is the source of truth and agents save pages as\ncommitted files followed by `gbrain sync`; direct saves need managed mode\n([unbound sources](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fwrite-refusals.md#unbound-sources-on-postgres)).\nSupabase uses a database connection string, not an anon key. Keep credentials\nprivate and do not copy ambient secrets into file configuration.\n\n### Hosted alternative\n\nSkip local database initialization, import, and maintenance installation.\nRead [mcp-access](..\u002Fmcp-access\u002FSKILL.md). If the target harness uses native\nOAuth\u002FPKCE, use its [native path](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md#native-oauth-path):\nregister the actual redirect URI and authentication method, initiate OAuth\ninside the client, and preserve the pending request through owner login and\nconsent. Do not install a machine handoff in an OAuth-only client.\n\nFor the machine path, the owner provisions a `memory-writer` grant through the\nauthenticated admin API using `gbrain mcp grant` and a private\n`--credentials-out` file. Use the actual harness identifier. A running PGLite\nserver must use its existing engine; do not open the live database in a second\nprocess. A URL or ordinary OAuth token is not administration authority.\n\nPrivately transfer the handoff to the intended harness, then install there:\n\n```bash\ngbrain connect https:\u002F\u002Fbrain.example.com\u002Fmcp --harness codex \\\n  --credentials-file \u002Fabsolute\u002Fprivate\u002Fagent-example.json --install\n```\n\nThin CLI adapters also need the verified persistent `--root`. Follow the\nadapter's reload instructions and the complete [hosted guide](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md).\nDo not grant `admin` merely to make a convenience health command pass.\nDelegation requires an explicit choice, bound tools, an active source, and a\npath policy. New delegation has unlimited spending and concurrency 1; explain\nthis before granting it.\n\n## Phase 3: Attach the memory instruction\n\nPreserve existing instruction files. Add one identified memory section through\nthe actual harness's supported mechanism. For Grok Bot\u002FMuse, use the generated\n`instructions\u002Fgbrain-skill.md`; generating a file does not prove activation.\n\nThe standing instruction must say:\n\n1. Recall relevant saved context before answering personal or ongoing-work questions.\n2. Save explicit requests to remember, with provenance and the intended brain\u002Fsource.\n3. Read the stored record before a correction; retire the old fact, save the correction, and verify it.\n4. Use `forget` for withdrawal from active memory. History, source material, and backups may remain.\n5. Automatic capture needs opt-in; paid enrichment and delegation need their own authority.\n6. Use the recorded absolute launcher when present. Verify each claimed change with an actual call.\n\nSources organize memory; they do not isolate agents sharing local files or\ncredentials. Preserve the user's native memory and identity.\n\n## Phase 4: Verify what actually works\n\nFollow the selected guide's commands. Save a randomized harmless fact with\nprovenance, keep the returned ID, and read it back in a separate call. Correct\nit, withdraw the test fact, and verify active recall omits it. Reconcile a lost\nmutation response before retrying.\n\nRun `gbrain doctor --json` for diagnostics. Missing optional embeddings are an\nunconfigured capability, not permission to add paid keys. A health score or a\nsuccessful process exit alone does not prove the memory round trip.\n\nFor hosted clients, run `gbrain mcp verify` with the private credentials file.\nReport transport, authentication, permissions, read\u002Fwrite, cleanup, and worker\nchecks separately. Overall `partial` (exit 2) means native evidence is missing.\n\nOpen a new conversation in the actual harness, ask for a second randomized\ntest fact without repeating it, and observe the recorded launcher or MCP call.\nIf the harness is unavailable, mark this check unverified. Clean up the\nfixture and report any failed cleanup by ID.\n\n## Optional capabilities and maintenance\n\nOnly proceed with capabilities the user requested:\n\n| Capability | Next step |\n| --- | --- |\n| Import selected notes or chat exports | Confirm the selected source; follow [ingest](..\u002Fingest\u002FSKILL.md) or [conversation archive](..\u002Fconversation-archive\u002FSKILL.md). Do not scan and import arbitrary directories. |\n| Connect an account | Follow [chat connectors](..\u002Fchat-connectors\u002FSKILL.md) or [Google setup](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fgoogle-connect.md), preserving their credential and consent boundaries. |\n| Automatic conversation capture | Follow [signal detector](..\u002Fsignal-detector\u002FSKILL.md) after opt-in. Recall and explicit remembering work without it. |\n| Paid retrieval or enrichment | Configure the chosen capability and budget separately. Existing API keys do not imply permission to spend. |\n| Scheduled maintenance | For in-agent installs, reuse the generated routine ID and absolute launcher; start with bounded `doctor --fast --json`. Observe native activation. Hosted clients use the host's existing schedule. |\n| Sync a selected file source | Follow [live sync](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Flive-sync.md). Keyless sync uses `--no-pull --no-embed`; do not implicitly add embedding or a worker. |\n| Import more data later | Offer [cold start](..\u002Fcold-start\u002FSKILL.md) as an optional next step; do not launch it automatically. |\n| Upgrade | Follow [gbrain-upgrade](..\u002Fgbrain-upgrade\u002FSKILL.md) and the installation's recorded repair\u002Fupgrade policy. |\n\nFacts, corrections, jobs, and accounting can exist only in the database.\nA Git clone is not a complete backup. For PGLite, use the\n[private backup and restore procedure](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fin-agent-setup.md#6-back-up-the-complete-local-database).\nTreat the whole archive as sensitive; off-VM copies require an explicit\ndestination. Restore into an absent new root, then reattach external roots,\nconnectors, and schedules explicitly.\n\n## Error recovery\n\n| Failure | Next action |\n| --- | --- |\n| Database unreachable | `gbrain engine status --probe`, then `gbrain db-repair`; apply safe fixes within authorized repair scope. |\n| Partial in-agent setup | Run the receipt's exact recovery command; preserve completed stages and memory. |\n| PGLite busy | Let the live owner finish, then retry. Never remove a live lock. |\n| Malformed or conflicting config | Report the conflict and intended target; do not reinitialize or overwrite unrelated settings. |\n| Lost hosted handoff | Resume delivery on the host; distinguish lost access-token delivery from lost client-secret delivery. |\n| Native instructions or routine unavailable | Keep the content and report the remaining activation step. |\n| Optional health check unavailable | Name the missing capability; do not silently expand grants, spend, or connector access. |\n\n## When it fails\n\nFollow the [agent operator protocol](..\u002Fconventions\u002Fagent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:\n\n- `gbrain init` prints `[AGENT]` blocks with the search-mode cost matrix: relay it and get the operator's choice before continuing.\n- An initialization error: never replace existing memory to recover. Run `gbrain doctor --json` and follow its `fix`.\n- `gbrain mcp verify` reports overall `partial` (exit 2): native evidence is missing; say activation is unverified instead of claiming it works.\n\n## Anti-Patterns\n\n- Replacing an existing agent's identity or creating a private repository during ordinary memory setup.\n- Treating ambient configuration, available API keys, or a successful probe as permission to adopt data or spend.\n- Automatically enabling capture, importing unrelated files, or installing a worker to improve a health score.\n- Reinitializing memory to repair a partial install, removing a live lock, or rotating credentials during ordinary grant repair.\n- Declaring native activation or cross-conversation recall complete without observing it.\n\n## Output Format\n\nReport the actual root\u002Fdatabase\u002Fsource or hosted endpoint, installed version,\nmemory round trip, instruction activation, cross-conversation evidence, and\ncleanup. Name pending steps and the exact repair action. Redact credentials.\n\nOnly declare observed stages complete. A CLI test, schedule file, fluent\nanswer, HTTP response, or job ID cannot certify the full native experience.\n","# Set up GBrain memory\n\nGive the agent the user already has a reliable memory. Preserve its identity,\nnative memory, existing instructions, and unrelated configuration. Start with\nkeyless storage and keyword retrieval. A private repository, identity interview,\nautomatic capture, paid API key, or background service is not a prerequisite.\n\n## Contract\n\n- Select the intended brain and source before inspecting or changing installation state.\n- Reuse a healthy installation; diagnose partial or conflicting state without reinitializing memory.\n- Relay the mandatory search-mode matrix and obtain the operator's choice.\n- Save explicit memories with provenance and verify a randomized write\u002Freadback.\n- Report software installation, native instruction activation, and cross-conversation recall separately.\n- Automatic capture, imports, connectors, schedules, and paid enrichment require explicit opt-in.\n\n## Phase 1: Choose the path\n\nUse the user's existing context; do not repeat choices they already made.\n\n| Intent | Action |\n| --- | --- |\n| Add memory inside Grok Bot | First choice: use the brain on your own computer over MCP — [remote-mcp](..\u002Fremote-mcp\u002FSKILL.md) publishes it (`--funnel`, the Bot runs in the vendor cloud), then [hosted harness access](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md) installs the private handoff in the Bot. No always-on machine: follow [Grok Bot](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fgrok-bot.md) and the isolated [setup helper](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fin-agent-setup.md). Root: `\u002Fworkspace\u002Fgbrain`, with data under `.gbrain`. |\n| Add memory inside Muse | First choice: use the brain on your own computer over MCP — [remote-mcp](..\u002Fremote-mcp\u002FSKILL.md) publishes it (`--funnel`), then [hosted harness access](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md) installs the private handoff in Muse. No always-on machine: follow [Muse](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fmuse.md). Either way, establish its durable user-files location first. Do not invent `MUSE.md`, a persistent path, or a native MCP mechanism. |\n| Memory for a bot that answers several people | `gbrain setup \u003Charness> --serves several --members \u003Cid,...>`; ask the user who the people are, never guess. Relay key file paths, never keys. Fix a `setup_serves_several`, `requester_scope_required` or `credential_scope_required` refusal with its `fix`. Pass `--stdio-member \u003Cid>` (claude-code, codex) only for a harness one person uses: it binds that harness's entry alone; refused where OpenClaw or Hermes runs. [Guide](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fsetup.md#a-brain-that-serves-several-people). |\n| Add memory to another existing agent | Follow [INSTALL_FOR_AGENTS.md](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002FINSTALL_FOR_AGENTS.md); the [coding-agent tutorial](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Ftutorials\u002Fconnect-coding-agent.md) covers Claude Code and Codex. |\n| Connect an existing hosted brain | Follow [mcp-access](..\u002Fmcp-access\u002FSKILL.md) and [hosted harness access](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md). Select native OAuth\u002FPKCE or a private machine handoff for the intended harness. |\n| Use the brain from other devices, apps or cloud agents over MCP | Follow [remote-mcp](..\u002Fremote-mcp\u002FSKILL.md): `gbrain mcp expose` publishes the local server on the Tailscale tailnet (Funnel only for cloud agents), then [mcp-access](..\u002Fmcp-access\u002FSKILL.md) \u002F hosted access selects native OAuth or a private machine handoff for each consumer. |\n| Explicitly create a new personal agent with identity and a private repo | Follow [BOOTSTRAP_FOR_AGENTS.md](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002FBOOTSTRAP_FOR_AGENTS.md). `gbrain bootstrap` is for this explicit request. |\n| Explicitly configure per-worktree code engines with shared artifacts | Follow [topologies](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Farchitecture\u002Ftopologies.md). Brain and source routing must be set independently. |\n\nIf intent is unclear, default to memory for the existing agent. Ask only for\nmissing information needed to choose a safe target, such as which existing\nbrain to connect or which Muse directory is durable.\n\n## Phase 2: Inspect, install, or repair\n\nFor an existing installation, use its recorded absolute launcher when present:\n\n```bash\ngbrain engine status --json\ngbrain engine status --probe\n```\n\nThese commands work while the database is down. Inspect the engine,\nconfiguration provenance, root, and source. Ambient database\u002FMCP settings or a\nworking-directory mount are not authorization to adopt that database.\n`GBRAIN_HOME` alone does not isolate all routing.\n\nFor Grok Bot\u002FMuse, let the setup helper inspect and isolate the chosen root.\nDo not run another global init around it. Its receipt distinguishes absent,\npartial, malformed, and conflicting state. Repair uses the retained\n`\u003Croot>\u002Fbin\u002Fgbrain-setup`; adoption and upgrades require explicit options.\nNever replace existing memory to recover from an initialization error.\n\nFor other local installations, resolve conflicting routing before following\nthe canonical distribution and keyless initialization:\n\n```bash\nbun install -g github:garrytan\u002Fgbrain#stable\ngbrain init --pglite --no-embedding\n```\n\nInstall Bun first if missing, following\n[INSTALL_FOR_AGENTS.md](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002FINSTALL_FOR_AGENTS.md). Do not use the unrelated\nnpm package named `gbrain`, or `bun add` in the user's current project.\nLocal\u002Fthin-client conversion requires explicit intent and preservation of the\nprevious configuration.\n\n**Required search-mode choice:** initialization may select a noninteractive\ndefault and print a nine-cell cost matrix with `[AGENT]` markers. Relay that\nmatrix and confirm the operator's choice before continuing. Follow Step 3.5 of\n[INSTALL_FOR_AGENTS.md](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002FINSTALL_FOR_AGENTS.md); use the printed matrix,\nnot remembered prices. Illustrative model API costs are separate from a\nharness subscription. This choice does not enable paid APIs or capture.\n\nIf the user explicitly wants Postgres, follow [engines](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002FENGINES.md)\nor [postgres-adopt](..\u002Fpostgres-adopt\u002FSKILL.md). `--prefer-postgres` is optional.\nTell the user once: on Postgres, a source with a checkout starts in classic\nmode, where the checkout is the source of truth and agents save pages as\ncommitted files followed by `gbrain sync`; direct saves need managed mode\n([unbound sources](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fwrite-refusals.md#unbound-sources-on-postgres)).\nSupabase uses a database connection string, not an anon key. Keep credentials\nprivate and do not copy ambient secrets into file configuration.\n\n### Hosted alternative\n\nSkip local database initialization, import, and maintenance installation.\nRead [mcp-access](..\u002Fmcp-access\u002FSKILL.md). If the target harness uses native\nOAuth\u002FPKCE, use its [native path](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md#native-oauth-path):\nregister the actual redirect URI and authentication method, initiate OAuth\ninside the client, and preserve the pending request through owner login and\nconsent. Do not install a machine handoff in an OAuth-only client.\n\nFor the machine path, the owner provisions a `memory-writer` grant through the\nauthenticated admin API using `gbrain mcp grant` and a private\n`--credentials-out` file. Use the actual harness identifier. A running PGLite\nserver must use its existing engine; do not open the live database in a second\nprocess. A URL or ordinary OAuth token is not administration authority.\n\nPrivately transfer the handoff to the intended harness, then install there:\n\n```bash\ngbrain connect https:\u002F\u002Fbrain.example.com\u002Fmcp --harness codex \\\n  --credentials-file \u002Fabsolute\u002Fprivate\u002Fagent-example.json --install\n```\n\nThin CLI adapters also need the verified persistent `--root`. Follow the\nadapter's reload instructions and the complete [hosted guide](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fhosted-harness-access.md).\nDo not grant `admin` merely to make a convenience health command pass.\nDelegation requires an explicit choice, bound tools, an active source, and a\npath policy. New delegation has unlimited spending and concurrency 1; explain\nthis before granting it.\n\n## Phase 3: Attach the memory instruction\n\nPreserve existing instruction files. Add one identified memory section through\nthe actual harness's supported mechanism. For Grok Bot\u002FMuse, use the generated\n`instructions\u002Fgbrain-skill.md`; generating a file does not prove activation.\n\nThe standing instruction must say:\n\n1. Recall relevant saved context before answering personal or ongoing-work questions.\n2. Save explicit requests to remember, with provenance and the intended brain\u002Fsource.\n3. Read the stored record before a correction; retire the old fact, save the correction, and verify it.\n4. Use `forget` for withdrawal from active memory. History, source material, and backups may remain.\n5. Automatic capture needs opt-in; paid enrichment and delegation need their own authority.\n6. Use the recorded absolute launcher when present. Verify each claimed change with an actual call.\n\nSources organize memory; they do not isolate agents sharing local files or\ncredentials. Preserve the user's native memory and identity.\n\n## Phase 4: Verify what actually works\n\nFollow the selected guide's commands. Save a randomized harmless fact with\nprovenance, keep the returned ID, and read it back in a separate call. Correct\nit, withdraw the test fact, and verify active recall omits it. Reconcile a lost\nmutation response before retrying.\n\nRun `gbrain doctor --json` for diagnostics. Missing optional embeddings are an\nunconfigured capability, not permission to add paid keys. A health score or a\nsuccessful process exit alone does not prove the memory round trip.\n\nFor hosted clients, run `gbrain mcp verify` with the private credentials file.\nReport transport, authentication, permissions, read\u002Fwrite, cleanup, and worker\nchecks separately. Overall `partial` (exit 2) means native evidence is missing.\n\nOpen a new conversation in the actual harness, ask for a second randomized\ntest fact without repeating it, and observe the recorded launcher or MCP call.\nIf the harness is unavailable, mark this check unverified. Clean up the\nfixture and report any failed cleanup by ID.\n\n## Optional capabilities and maintenance\n\nOnly proceed with capabilities the user requested:\n\n| Capability | Next step |\n| --- | --- |\n| Import selected notes or chat exports | Confirm the selected source; follow [ingest](..\u002Fingest\u002FSKILL.md) or [conversation archive](..\u002Fconversation-archive\u002FSKILL.md). Do not scan and import arbitrary directories. |\n| Connect an account | Follow [chat connectors](..\u002Fchat-connectors\u002FSKILL.md) or [Google setup](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fgoogle-connect.md), preserving their credential and consent boundaries. |\n| Automatic conversation capture | Follow [signal detector](..\u002Fsignal-detector\u002FSKILL.md) after opt-in. Recall and explicit remembering work without it. |\n| Paid retrieval or enrichment | Configure the chosen capability and budget separately. Existing API keys do not imply permission to spend. |\n| Scheduled maintenance | For in-agent installs, reuse the generated routine ID and absolute launcher; start with bounded `doctor --fast --json`. Observe native activation. Hosted clients use the host's existing schedule. |\n| Sync a selected file source | Follow [live sync](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Flive-sync.md). Keyless sync uses `--no-pull --no-embed`; do not implicitly add embedding or a worker. |\n| Import more data later | Offer [cold start](..\u002Fcold-start\u002FSKILL.md) as an optional next step; do not launch it automatically. |\n| Upgrade | Follow [gbrain-upgrade](..\u002Fgbrain-upgrade\u002FSKILL.md) and the installation's recorded repair\u002Fupgrade policy. |\n\nFacts, corrections, jobs, and accounting can exist only in the database.\nA Git clone is not a complete backup. For PGLite, use the\n[private backup and restore procedure](https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fdocs\u002Fguides\u002Fin-agent-setup.md#6-back-up-the-complete-local-database).\nTreat the whole archive as sensitive; off-VM copies require an explicit\ndestination. Restore into an absent new root, then reattach external roots,\nconnectors, and schedules explicitly.\n\n## Error recovery\n\n| Failure | Next action |\n| --- | --- |\n| Database unreachable | `gbrain engine status --probe`, then `gbrain db-repair`; apply safe fixes within authorized repair scope. |\n| Partial in-agent setup | Run the receipt's exact recovery command; preserve completed stages and memory. |\n| PGLite busy | Let the live owner finish, then retry. Never remove a live lock. |\n| Malformed or conflicting config | Report the conflict and intended target; do not reinitialize or overwrite unrelated settings. |\n| Lost hosted handoff | Resume delivery on the host; distinguish lost access-token delivery from lost client-secret delivery. |\n| Native instructions or routine unavailable | Keep the content and report the remaining activation step. |\n| Optional health check unavailable | Name the missing capability; do not silently expand grants, spend, or connector access. |\n\n## When it fails\n\nFollow the [agent operator protocol](..\u002Fconventions\u002Fagent-operator-protocol.md) for any gbrain error `code`, exit code, `[AGENT]` block or notice block. Specific to this skill:\n\n- `gbrain init` prints `[AGENT]` blocks with the search-mode cost matrix: relay it and get the operator's choice before continuing.\n- An initialization error: never replace existing memory to recover. Run `gbrain doctor --json` and follow its `fix`.\n- `gbrain mcp verify` reports overall `partial` (exit 2): native evidence is missing; say activation is unverified instead of claiming it works.\n\n## Anti-Patterns\n\n- Replacing an existing agent's identity or creating a private repository during ordinary memory setup.\n- Treating ambient configuration, available API keys, or a successful probe as permission to adopt data or spend.\n- Automatically enabling capture, importing unrelated files, or installing a worker to improve a health score.\n- Reinitializing memory to repair a partial install, removing a live lock, or rotating credentials during ordinary grant repair.\n- Declaring native activation or cross-conversation recall complete without observing it.\n\n## Output Format\n\nReport the actual root\u002Fdatabase\u002Fsource or hosted endpoint, installed version,\nmemory round trip, instruction activation, cross-conversation evidence, and\ncleanup. Name pending steps and the exact repair action. Redact credentials.\n\nOnly declare observed stages complete. A CLI test, schedule file, fluent\nanswer, HTTP response, or job ID cannot certify the full native experience.\n",{"name":5,"tools":48,"mutating":53,"triggers":54,"description":7},[49,50,51,52],"get_stats","get_health","sync_brain","put_page",true,[55,56,57,58,59],"set up gbrain","initialize brain","gbrain setup","install gbrain into this agent workspace","add gbrain to my agent","master","1e2fdc28a560c4a80a6e1f2d164d598032de41ff","skills\u002Fsetup",4902,"https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain","https:\u002F\u002Fgithub.com\u002Fgarrytan","https:\u002F\u002Fblog.garrytan.com","Writes software, dreams. ","2026-11-14 04:11:30",{"source":8,"skillName":5,"commands":70,"prompt":80,"zipAvailable":53},[71,74,77],{"tool":72,"command":73},"npx","npx skills add garrytan\u002Fgbrain --skill setup",{"tool":75,"command":76},"bunx","bunx skills add garrytan\u002Fgbrain --skill setup",{"tool":78,"command":79},"pnpm","pnpm dlx skills add garrytan\u002Fgbrain --skill setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Fskills\u002Fsetup\u002FSKILL.md",[],[83,95,101,121,148,162],{"skillNo":84,"name":85,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":43},"01M6N109FNGH1PK49T734PZXGB","query-helper","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fquery-helper\u002FSKILL.md",[],[89,90,91,92,38,93,94],"query helper","helper","query","search","find","false",{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":43},"01M6N108A23GW6NGQEQ0E7GV0A","broken","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbroken\u002FSKILL.md",[],[97],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":43},"01M6N105E88C5K2H03H0CC79G1","brain-ops","Read, enrich, and write brain pages with source attribution.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog\u002Fskills\u002Fbrain-ops\u002FSKILL.md",[],[108,27,109,36,110,38,111,112,37,113,91,114,115,116,117,118,119,120,92],"brain ops","ops","attribution","read","write","look","pages","people","with","enrich","web","path","source",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":132,"publishedAt":43},"01M6N102GRMF22TVCNT6RK5MRD","meeting-prep","Build a briefing before you meet someone, from their recent threads, open loops and what they care about.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Fmeeting-prep\u002FSKILL.md",[127],{"categoryNo":128,"categoryName":129,"taxonomyType":130,"taxonomyTypeDesc":131},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[133,134,135,136,137,92,138,139,140,91,94,141,142,143,144,145,146,147],"meeting","prep","meeting prep","me","prepare","brief","open","build","loops","about","you","briefing","threads","for","Meet",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":43},"01M6N1005QK7REHX5KGMNR5PF0","inbox-zero","Triage the inbox into replies, delegations and archives.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Finbox-zero\u002FSKILL.md",[],[155,156,157,92,158,94,159,160,161],"inbox zero","ZeRO","inbox","clear","replies","my","triage",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":43},"01M6N0ZXQ8RRRW71PNV61T57GP","deal-memo","Draft an investment memo from the deal pages and the founder history already in the brain.","https:\u002F\u002Fgithub.com\u002Fgarrytan\u002Fgbrain\u002Fblob\u002Fmaster\u002Ftest\u002Ffixtures\u002Fskill-catalog-query\u002Fskills\u002Fdeal-memo\u002FSKILL.md",[],[169,170,171,114,27,172,173,112,174,36,92,175],"deal memo","deal","memo","draft","investment","history","founder"]