Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 92
  • 34k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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/query

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install query in Claude Code

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

A

No 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 →

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.

Add to stack

Loading.