query

A command for researching a non-trivial question, combining information from multiple sources, and saving the resulting answer in a knowledge graph—a linked collection of notes and facts.

In plain words
What is it for?
Answering multi-part questions, comparing entities, making strategic decisions, and documenting research that should remain available.
Why use it?
It prevents repeated research by preserving the synthesis so it can be found and extended later.

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

Made for: Claude Code, Codex.

Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 890 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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.00021 $0.00890
Opus 5 $0.00010 $0.00445
Sonnet 5 $0.00004 $0.00178
Haiku 4.5 $0.00002 $0.00089

Measured 2d ago against content hash 4cc8193c8ba3, 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 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.

.claude/skills/query/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/query — Ask, Synthesize, File-Back

LLM-wiki pattern: every non-trivial query produces a new synthesis page. The wiki compounds.

Usage

/query {question} — ask and file /query --ephemeral {question} — answer without filing (for trivial lookups)

When to Use

  • Any question requiring synthesis across 2+ entities
  • Strategic decisions ("should we X?")
  • Comparative analysis ("difference between X and Y")
  • How-to that combines multiple sources
  • Anything you'd want to NOT re-derive next time

When NOT to Use

  • Factual lookups ("what's X's email") — use grep
  • Trivial questions ("how many entities")
  • Clarifications within the current session

Pipeline

Step 1: Search Existing

grep -rl "{keywords}" knowledge/

Check whether the question (or a close variant) was already filed. If yes:

  • Read the existing synthesis.
  • Decide: augment, supersede, or refer.

Step 2: Gather Sources

Find relevant entities:

  • Always check your domain hubs first — if your graph has a MOC or hub note for the question's domain (e.g. knowledge/moc/{domain}.md), start there.
  • By tag: grep -rl "domain/{X}" knowledge/
  • By concept: grep -rl "concept-name" knowledge/
  • By person: check knowledge/people/
  • Relevant transcripts/sources: check reports/

List sources explicitly — every claim needs a source.

Step 3: Synthesize

Produce an answer with:

  • Direct answer first (results-first).
  • Reasoning backed by evidence from sources.
  • Each claim cites [[source-entity]].
  • Contradictions flagged explicitly.
  • Uncertainty quantified.

Step 4: Score

Apply the context/scoring-gate.md criteria (≥80/100). If below: iterate.

Step 5: File Back

Create a new entity at knowledge/concepts/query_{slug}_{date}.md:

---
type: synthesis
tags: [domain/{X}, type/synthesis, query]
updated: {today}
question: "{original question}"
sources: [[entity1]], [[entity2]], ...
score: {0-100}
---
# {Question}

## Answer
{direct synthesis}

## Evidence
- From [[entity1]]: {quote/paraphrase}
- From [[entity2]]: {quote/paraphrase}

## Caveats
{what's uncertain, what's missing}

## Connections
- [[related-entity]]

Read the full file on GitHub · 107 lines

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. 2d ago First seen · 107 lines · 21 tokens per session scan A 4cc8193c8ba3

Subscribe to this mod's changes

query is a skill published in the GitHub repository xcota/pos (52 stars, last pushed 1mo ago), licensed MIT. It adds 21 tokens to every session and 890 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

ori-memory

Persistent agent memory with learning retrieval. Knowledge graph on markdown files — capture insights, decisions, research, and learnings during work, then retrieve them weeks or months later. Use when knowledge is too valuable to lose but too much to inject into every prompt.

aayoawoyemi/Ori-Mnemos · 54 tokens

rtg-knowledge-graph-mcp

Operate the Vellis RTG Knowledge Graph MCP server for agent-driven graph work. Use when an agent has RTG MCP tools such as rtgvalidategraph, rtgapplylivegraphchanges, rtgstageknowledgechanges, rtgapplymigrationcutover, rtgexecutequery, snapshots, or ledger replay, especially for schema evolution, validation recovery…

volantlabs/vellis · 87 tokens

python-component-implementation

Implement, review, or revise Python realizations of components from accepted textual SysML v2 contracts and generated views. Use when creating or aligning Python protocols, component classes, reference implementations, implementation bindings, or black-box contract tests.

volantlabs/vellis · 51 tokens

documentation-sync

Keep human documentation synchronized with canonical SysML v2 models, generated component and application views, implementation realizations, repository tooling, skills, and workflow rules. Use after model, code, generated-view, README, AGENTS, skill, command, or public behavior changes.

volantlabs/vellis · 57 tokens

sysml-reference

Ground textual SysML v2 and KerML authoring, review, language-semantics decisions, construct selection, and official-validator diagnosis in the repository's checksum-pinned specification corpus. Use for questions or changes involving parts, references, features, actions, bindings, successions, flows, ports…

volantlabs/vellis · 92 tokens

model-hygiene-review

Audit accepted SysML v2 component or application models against implementations, protocols, consumers, tests, generated evidence, predecessor contracts, and git history before proposing remediation. Use for periodic model hygiene, suspected model/implementation drift, migration-loss reviews, verification-closure…

volantlabs/vellis · 72 tokens