route-by-query-shape

route-by-query-shape is a skill for Claude Code, Codex from Bitterbot-AI/bitterbot-desktop. It costs 40 tokens per session (283 once invoked), scanned A, original, MIT.

An interceptor that sends relationship-based memory questions, such as who worked on a topic, to a knowledge graph instead of ordinary text search.

In plain words
What is it for?
Use it when looking for people connected to an event, topic, or piece of work in stored conversation or knowledge data.
Why use it?
Relationship questions can be missed when the system searches only through separate text passages.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when looking for people connected to an event, topic, or piece of work in stored conversation or knowledge data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bitterbot-ai/bitterbot-desktop/route-by-query-shape
About the project

Bitterbot is a local-first personal AI agent that runs on a user’s devices, keeps persistent memories, performs tasks, and can exchange reusable skills with other agents. It is intended for people who want a personal assistant that remains available across conversations and activities. The catalogue entries provide instructions and agents for working with Bitterbot.

Bitterbot-AI/bitterbot-desktop · 2,461 stars · on GitHub · bitterbot.ai

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.

Any agent
npx skills add Bitterbot-AI/bitterbot-desktop --skill route-by-query-shape
Clone the repo
git clone --depth 1 https://github.com/Bitterbot-AI/bitterbot-desktop

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 route-by-query-shape

README.md
[![agentmods](https://agentmods.dev/badge/skills/bitterbot-ai/bitterbot-desktop/route-by-query-shape/github.svg)](https://agentmods.dev/skills/bitterbot-ai/bitterbot-desktop/route-by-query-shape)
Your own site
<a href="https://agentmods.dev/skills/bitterbot-ai/bitterbot-desktop/route-by-query-shape"><img src="https://agentmods.dev/badge/skills/bitterbot-ai/bitterbot-desktop/route-by-query-shape/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for route-by-query-shape

Your own site · 80×15
<a href="https://agentmods.dev/skills/bitterbot-ai/bitterbot-desktop/route-by-query-shape"><img src="https://agentmods.dev/badge/skills/bitterbot-ai/bitterbot-desktop/route-by-query-shape.svg" alt="Reviewed on agentmods" width="80" 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 283 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00040 $0.00283
Opus 5 $0.00020 $0.00142
Sonnet 5 $0.00008 $0.00057
Haiku 4.5 $0.00004 $0.00028

Measured 10d ago against content hash 28c105058450, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

route-by-query-shape 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 10d 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.

skills/route-by-query-shape/SKILL.md · 27 lines

What it actually says

route-by-query-shape

When you ask Bitterbot a relationship question — "who did I talk to about Q4?", "who worked with me on Foo?" — the vector-based memory_search often misses because the answer lives in entity relationships, not in chunk text. The graph backend gets these right.

This interceptor watches memory_search calls, detects relationship-shaped queries, extracts the salient entity, and re-routes the call to the graph backend before it executes.

What you'll see

For relationship questions, the agent will hit the knowledge graph rather than searching through unstructured text. Expect noticeably better hit rates on "who did X with Y" style questions.

Implementation

Built-in interceptor route-by-query-shape:relationship lives in src/agents/skills/builtin-interceptors/route-by-query-shape.ts. Fires up to 12 times per session.

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. 10d ago First seen · 27 lines · 40 tokens per session scan A 28c105058450

Subscribe to this mod's changes

route-by-query-shape is a skill published in the GitHub repository Bitterbot-AI/bitterbot-desktop (2,461 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 283 once invoked, about $0.0002 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.