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.
npx agentmods add skills/humanerd-drew/opencode-drewgent/gbrain-integration-drewgentnpx skills add humanerd-drew/opencode-drewgent --skill gbrain-integration-drewgentgit clone --depth 1 https://github.com/humanerd-drew/opencode-drewgentWrote 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.
[](https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/gbrain-integration-drewgent)<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>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.
| Model | Per session | Once 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 |
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.
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"
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.
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.
- 2d ago First seen · 190 lines · 46 tokens per session scan A f3b4883e1854
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.
Other skills, from other repositories
knowledge-base-management
Obsidian 知识库全生命周期管理:三层架构、素材入库(ABC分级)、健康检查、GBrain/GraphRAG/LLM Wiki 三件套集成、目录整理.
feishu-memory-recall
Cross-group memory, search, and event sharing for OpenClaw Feishu agents.
daily-journal
A passive daily work journal that Claude keeps FOR you so you never have to write it yourself. Append short entries after meaningful work (what was done, what you focused on, artifacts touched) to 01-daily/journal/YYYY-MM-DD.md. Run a guided reflection at night or in the morning. Use when you run /daily-journal, say…
harvest
Capture durable session learnings, stage for human promotion to 05-knowledge/lizard, and propose skill/CLAUDE.md patches. Triggered by /harvest, SessionEnd hook staging, or nightly enhance. Never writes durable knowledge without your approval.
memory-hygiene
Periodic trust sweep of persistent memory and durable knowledge notes - re-verifies environment-dependent claims against the live environment, stamps lastverified + confidence, and proposes archiving drifted entries.
knowledge-consolidation
Build frameworks from scattered insights across all braindumps and notes.