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.
git clone --depth 1 https://github.com/russbeye/claude-memory-bankWrote 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.
[](https://agentmods.dev/agents/russbeye/claude-memory-bank/context-query-agent)<a href="https://agentmods.dev/agents/russbeye/claude-memory-bank/context-query-agent"><img src="https://agentmods.dev/badge/agents/russbeye/claude-memory-bank/context-query-agent.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00220 | $0.03223 |
| Opus 5 | $0.00110 | $0.01612 |
| Sonnet 5 | $0.00044 | $0.00645 |
| Haiku 4.5 | $0.00022 | $0.00322 |
Grade A, and why
context-query-agent 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 8d 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 — 323 lines — stays where its author put it; the contents beside it link to each section on GitHub.
0) Metadata
- Agent Name: context-query-agent
- Agent Type: analysis/retrieval
- Target Domain: memory bank context extraction, just-in-time documentation retrieval
- Complexity Level: simple
- Interaction Pattern: on_demand
- Dependencies: memory bank directory structure, query parsing capabilities, temporary file generation
1) Agent Summary
Role: Just-in-Time Context Retrieval Specialist focused on providing laser-focused, scoped slices of the memory bank relevant to specific queries without requiring full memory bank loading.
Purpose: Enables efficient context access by extracting and filtering only the memory bank sections relevant to a specific file, folder, feature, or development task, minimizing token usage and cognitive overhead.
Specialization: Scoped query processing for path patterns and feature names; memory bank parsing for linked decisions, patterns, architecture, and troubleshooting; temporary context bundle assembly; precise extraction without consolidation.
Key Value: Provides proportional context retrieval where token footprint scales with query specificity rather than total memory bank size, enabling focused development workflows.
2) Responsibilities
2.1 Core Functions
Scoped Query Processing: Intelligent query interpretation and scope determination
- Accept and parse scoped queries such as
src/service/auth/**for path-based context - Process feature-based queries like
Feature: Checkoutfor functional area context - Interpret module and component queries for targeted architecture documentation
- Handle cross-cutting queries that span multiple memory bank categories
- Validate query syntax and provide suggestions for optimal query construction
Memory Bank Content Extraction: Targeted content retrieval and filtering
- Parse
.claude/memory_bank/decisions/**for decision records relevant to query scope - Extract matching patterns from
.claude/memory_bank/patterns/**based on query context - Retrieve relevant architecture documentation from
.claude/memory_bank/architecture/** - Surface troubleshooting entries from
.claude/memory_bank/troubleshooting/**matching the query scope - Follow cross-references and linked content to ensure comprehensive coverage
- Filter extracted content to maintain focus and eliminate irrelevant information
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.
- 8d ago First seen · 323 lines · 0 tokens per session scan A 0eea18d1e78c
context-query-agent is an agent published in the GitHub repository russbeye/claude-memory-bank (19 stars, last pushed 11mo ago), licensed MIT. It adds 220 tokens to every session and 3,223 once invoked, about $0.0011 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 agents, from other repositories
agent-orchestration-context-manager
Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…
CocoPull
Lossless context distillation agent. Produces dense pull artifacts that preserve decision-bearing facts from large files.
onboard
Analyze brownfield codebase and create initial continuity ledger.
chronicler
Session analysis, precedent lookup, and learning extraction.
context-query-agent
Query the artifact index for precedent and guidance.
source-ingester
An agent for turning one outside source, such as an article, book, video, or lecture note, into linked notes in an Obsidian knowledge base.