query

query is a skill for Claude Code, Codex from cynthiajones34/GBrain. It costs 40 tokens per session (1,462 once invoked), scanned A, a copy of query, MIT.

A question-answering workflow for finding information in a GBrain knowledge base. It searches by words, meaning, and page relationships, then cites the pages used.

In plain words
What is it for?
Use it for lookups, research questions, finding related pages, checking backlinks, and producing answers with traceable citations.
Why use it?
It reduces unsupported answers by tying claims to stored sources. It also points out missing information and conflicting sources instead of hiding them.

Skill for Claude CodeCodex

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/cynthiajones34/gbrain/query
Any agent
npx skills add cynthiajones34/GBrain --skill query
Clone the repo
git clone --depth 1 https://github.com/cynthiajones34/GBrain

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 query

README.md
[![agentmods](https://agentmods.dev/badge/skills/cynthiajones34/gbrain/query.svg)](https://agentmods.dev/skills/cynthiajones34/gbrain/query)
Your own site
<a href="https://agentmods.dev/skills/cynthiajones34/gbrain/query"><img src="https://agentmods.dev/badge/skills/cynthiajones34/gbrain/query.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,462 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 92% copy Near-identical to another mod 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 $0.00040 $0.01462
Opus 5 $0.00020 $0.00731
Sonnet 5 $0.00008 $0.00292
Haiku 4.5 $0.00004 $0.00146

Measured 4d ago against content hash e155a0804998, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 4d 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.

Origin

This is a copy

92% identical to query — 19 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/query/SKILL.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 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.

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

  1. 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
  2. Execute searches:
    • Keyword search gbrain for FTS matches (search)
    • Hybrid search gbrain for semantic+keyword with expansion (query)
    • List pages in gbrain by type or check backlinks for structural queries
  3. Read top results. Read the top 3-5 pages from gbrain to get full context.
  4. Synthesize answer with citations. Every claim traces back to a specific page slug.
  5. Flag gaps. If the brain doesn't have info, say "the brain doesn't have information on X" rather than hallucinating.

Anti-Patterns

  • Answering from general knowledge when the brain has relevant content
  • Hallucinating facts not in the brain
  • Silently picking one source when sources conflict
  • Loading full pages when search chunks are sufficient
  • Ignoring source precedence (user statements are highest authority)

Output Format

Answers should include:

  • Direct response to the question
  • Citations: "According to [Source: people/jane-doe, compiled truth]..."
  • Gap flags: "The brain doesn't have information on X"
  • Conflict notes when sources disagree

Quality Rules

  • Never hallucinate. Only answer from brain content.
  • Cite sources: "According to concepts/do-things-that-dont-scale..."
  • Flag stale results: if a search result shows [STALE], note that the info may be outdated
  • For "who" questions, use backlinks and typed links to find connections
  • For "what happened" questions, use timeline entries
  • For "what do we know" questions, read compiled_truth directly

Read the full file on GitHub · 156 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. 4d ago First seen · 156 lines · 40 tokens per session scan A e155a0804998

Subscribe to this mod's changes

query is a skill published in the GitHub repository cynthiajones34/GBrain (0 stars, last pushed 28d ago), licensed MIT. It adds 40 tokens to every session and 1,462 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to query, differing in 19 lines, and is treated as a copy.