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/garrytan/gbrain/querynpx skills add garrytan/gbrain --skill querygit clone --depth 1 https://github.com/garrytan/gbrainWhat 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 | $0.00040 | $0.01732 |
| Opus 5 | $0.00020 | $0.00866 |
| Sonnet 5 | $0.00008 | $0.00346 |
| Haiku 4.5 | $0.00004 | $0.00173 |
Grade A, and why
query 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 — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Query Skill
Answer questions using the brain's knowledge with 3-layer search and synthesis.
Memory verbs (MEMORY_VERBS v1, gbrain ≥ 0.43). When connected to a brain over MCP, prefer the seven frozen memory verbs for memory work — they carry provenance, evidence, and a server-enforced token budget:
recall(query | entity, budget_tokens)— the budget-packed memory read. Use it instead of baresearchfor "what do we know that we SAVED about X".entity(name)— a zero-LLM person/company/project card (aliases, last-touched, open threads, top edges). Use it instead ofget_page+get_backlinkswhen you just need the card.synthesize(question)— the explicitly-expensive cross-page answer; the heavy version ofquery. Reach for it only when the answer must combine evidence across pages. Fall back tosearch/query/get_pagewhen the verbs aren't on the surface (pre-0.43 servers;--surface fullincludes the verbs alongside every other op). Seedocs/protocol/MEMORY_VERBS_v1.md.
Contract
This skill guarantees:
- Every answer is grounded in brain content (no hallucination)
- Every claim has a citation tracing back to a specific page slug
- Gaps are flagged explicitly ("the brain doesn't have information on X")
- Source precedence is respected (user statements > compiled truth > timeline > external)
- Conflicting sources are noted with both citations
Phases
- Decompose the question into search strategies:
- Keyword search for specific names, dates, terms
- Semantic query for conceptual questions
- Structured queries (list by type, backlinks) for relational questions
- Execute searches:
- Cheap-hybrid search gbrain for exact tokens / known names (search)
- Full-hybrid search gbrain with multi-query expansion for concept questions (query)
- List pages in gbrain by type or check backlinks for structural queries
- Read top results. Read the top 3-5 pages from gbrain to get full context.
- Synthesize answer with citations. Every claim traces back to a specific page slug.
- Flag gaps. If the brain doesn't have info, say "the brain doesn't have information on X" rather than hallucinating.
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 · 171 lines · 40 tokens per session scan A b12aae4e86b8
query is a skill published in the GitHub repository garrytan/gbrain (29,440 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 1,732 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-08-30.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
agent-host-chat-contributions
Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.