query
Skill by garrytan
Answers questions from a gbrain knowledge base using keyword and hybrid search, synthesis, and page citations. It is for users who keep notes or people and company pages in a brain and want grounded answers.
Install query
Built from the published package, never by AI.
git clone --depth 1 https://github.com/garrytan/gbrain /tmp/gbrain && mkdir -p ~/.claude/skills && cp -r /tmp/gbrain/skills/query ~/.claude/skills/queryRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/garrytan/gbrain /tmp/gbrain && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/gbrain/skills/query ~/.gemini/antigravity-cli/skills/queryAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill tells an AI assistant how to answer questions from a gbrain brain. It decomposes a question into keyword, semantic and structural searches, reads the top results, and synthesizes an answer. Every claim is meant to carry a citation to a page slug, and gaps are flagged instead of filled from general knowledge. It also sets a source precedence: user statements first, then compiled truth, then timeline entries, then external sources. Conflicting sources are noted with both citations.
The skill covers memory verbs such as recall, entity and synthesize when connected over MCP, with fallbacks to search, query and get_page on older servers. It also covers graph traversal for relationship questions and token-budget options for tight context. It is aimed at people who use gbrain as a personal or team memory and want their assistant to answer from it.
Written from the project's SKILL.md and checked against it.
What it can do
- recallReads saved memory within a token budget, for questions about what was saved about a topic.
- searchRuns cheap keyword-style search for exact names, dates and terms in the brain.
- queryRuns full hybrid search for conceptual questions, with optional multi-query expansion.
- get_pageLoads a full page when a search chunk confirms it is relevant.
- list_pagesLists pages by type or filter for structural lookups.
- get_backlinksFinds pages that link to a given page, used for who-questions and connections.
- traverse_graphFollows typed links through the graph for relationship questions.
- get_timelineReads timeline entries for what-happened questions.
- entityReturns a zero-LLM card for a person, company or project with aliases and open threads.
- synthesizeProduces an expensive cross-page answer when evidence must combine across pages.
What you need
- A gbrain brain, connected over MCP or through the gbrain CLI
- gbrain 0.43 or later for the memory verbs
- An embedding provider for full hybrid search
Try asking
- What do we know about Acme Corp?
- Who works at Acme? Use the graph and show the connections.
- Recall the saved notes about the zebra telescope within 75 tokens.
Good to know
- Marked as non-mutating, so the skill is meant for reading the brain, not changing it.
- Without an embedding provider, search runs on keywords only and may miss notes.
- The memory verbs need gbrain 0.43 or later; older servers use search, query and get_page instead.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/query/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md11 KB -
routing-eval.jsonl538 B
Alternatives to query
All alternatives →Set up and diagnose a local agentmemory installation. It covers MCP connections, environment variables, ports, auth and feature flags, and is for users getting started or checking a connection.
Analyzes a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit links and topic clusters. Built for people who maintain LLM-generated markdown wikis.
Saves and loads timestamped reports for AI assistants, with keyword routing for fast lookup. It also runs an Actionability Gate that checks report links before delivery. Intended for morning briefings, meeting digests and research reports.
Removes a personal fact, preference, relationship detail, topic or past event from Muse's active memory. It also stops existing copies and automations from bringing it back.
Git Context Controller (GCC) is a skill that stores agent memory as a versioned file system under .GCC/. It suits multi-step projects that need milestone tracking, branching and context recovery across sessions.
Guides an evidence-first reading of a book, article, PDF or document set. Built for readers who want claims, evidence and recall rather than a short summary.
Compare with agentmemory-config, understand-knowledge or reports
query: common questions
Does the skill make up answers when the brain has no information?
No. The source says it should state that the brain does not have information on the topic instead of answering from general knowledge.
How does it handle conflicting notes?
It notes the contradiction and cites both sources rather than silently picking one. User statements rank highest in its source precedence.
What if search results look incomplete?
The source says a degraded or truncated result is not proof of a gap. It advises trying synonyms, exact names and hybrid search, and running gbrain doctor to check index health.
How do I install query?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is query free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is query safe to use?
It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to query?
Similar skills: agentmemory-config, understand-knowledge, reports, forget.
