gbrain-integration-{{AGENT_NAME_LOWER}}

gbrain-integration-{{AGENT_NAME_LOWER}} is a skill for Claude Code, Codex from humanerd-drew/opencode-drewgent. It costs 46 tokens per session (1,963 once invoked), scanned A, original, MIT.

A deprecated guide for connecting GBrain, a tool for searching notes with text and meaning-based matching, to an AI agent and an Obsidian vault. It says to use SQLite FTS5, Ollama embeddings, and recall()/remember() tools instead.

In plain words
What is it for?
It is only useful when reviewing or removing an old GBrain integration from an Obsidian-based knowledge system.
Why use it?
Following it could lead to an outdated setup because the documented integration has been replaced.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for gbrain. Also seen: positional $N argument; built for gbrain; mentions OpenCode.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/humanerd-drew/opencode-drewgent/gbrain-integration-drewgent
Any agent
npx skills add humanerd-drew/opencode-drewgent --skill gbrain-integration-drewgent
Clone the repo
git clone --depth 1 https://github.com/humanerd-drew/opencode-drewgent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gbrain-integration-{{AGENT_NAME_LOWER}}

README.md
[![agentmods](https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/gbrain-integration-drewgent.svg)](https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/gbrain-integration-drewgent)
Your own site
<a href="https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/gbrain-integration-drewgent"><img src="https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/gbrain-integration-drewgent.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,963 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01963
Opus 5 $0.00023 $0.00981
Sonnet 5 $0.00009 $0.00393
Haiku 4.5 $0.00005 $0.00196

Measured 2d ago against content hash f3b4883e1854, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

gbrain-integration-{{AGENT_NAME_LOWER}} scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/mcp/gbrain-integration-drewgent/SKILL.md · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GBrain Integration for {{AGENT_NAME}}

Integrate GBrain (by Garry Tan) as an MCP server into {{AGENT_NAME}}/Hermes for hybrid search over the .{{AGENT_NAME_LOWER}} Obsidian vault.

Prerequisites

  • Homebrew
  • Ollama running with embedding model (mxbai-embed-large or nomic-embed-text)
  • Hermes Agent

Steps

1. Install Bun + GBrain

brew install oven-sh/bun/bun git clone https://github.com/garrytan/gbrain.git ~/gbrain cd ~/gbrain && bun install bun run build:all bun link

2. Initialize PGLite Brain

export PATH="$HOME/.bun/bin:$PATH" gbrain init --pglite --embedding-model openai:mxbai-embed-large --embedding-dimensions 1536

3. Configure Ollama as Embedding Backend

Write to ~/.gbrain/config.json with embedding_disabled: true, provider_base_urls: { openai: "http://localhost:11434/v1" }

Note: embedding_disabled: true because Ollama's OpenAI-compatible endpoint is rejected by OpenAI client key validation. Vector search needs real key.

4. Import Vault

gbrain sources add {{AGENT_NAME_LOWER}} --path ~/.{{AGENT_NAME_LOWER}} --name "{{AGENT_NAME}} Vault" gbrain sources default {{AGENT_NAME_LOWER}} gbrain import ~/.{{AGENT_NAME_LOWER}}/P0-brainstem --source {{AGENT_NAME_LOWER}} --yes --no-embed gbrain extract links --yes

5. Register MCP Server

Add to config.yaml under mcp_servers: gbrain: command: ~/.bun/bin/gbrain args: ["serve"] env: OPENAI_API_KEY: "ollama-local"

Set env via Python to ensure proper YAML dict format: import yaml with open('/.{{AGENT_NAME_LOWER}}/config.yaml') as f: d = yaml.safe_load(f) d['mcp_servers']['gbrain']['env'] = {'OPENAI_API_KEY': 'ollama-local'} with open('/.{{AGENT_NAME_LOWER}}/config.yaml', 'w') as f: yaml.dump(d, f, default_flow_style=False, allow_unicode=True, sort_keys=False)

6. Verify

Verify gbrain is connected via the MCP tools (check gbrain get_stats or gbrain search "test query"). The MCP server is configured in ~/.config/opencode/opencode.jsonc.

gbrain search "test query"

Read the full file on GitHub · 190 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 190 lines · 46 tokens per session scan A f3b4883e1854

Subscribe to this mod's changes

gbrain-integration-{{AGENT_NAME_LOWER}} is a skill published in the GitHub repository humanerd-drew/opencode-drewgent (2 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 1,963 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.