Skip to content
AI & Agents
Skill

/route-by-query-shape

When the agent calls memory_search with a relationship-shaped query ("who did I talk to about X"), redirect to the knowledge_graph backend where it will actually find the answer.

BOOST
From plugin
bitterbot-desktop
2.5k66 skills
Install
$ npx -y skills add bitterbot-ai/bitterbot-desktop --skill route-by-query-shape --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/route-by-query-shape

Context preview

The summary Claude sees to decide when to auto-load this skill.

When the agent calls memory_search with a relationship-shaped query ("who did I talk to about X"), redirect to the knowledge_graph backend where it will actually find the answer.

SKILL.md

route-by-query-shape.SKILL.md
name: route-by-query-shape
description: When the agent calls memory_search with a relationship-shaped query ("who did I talk to about X"), redirect to the knowledge_graph backend where it will actually find the answer.
tier: executable
bitterbot:
  always: false
  interceptors:
    - id: route-by-query-shape:relationship
      builtin: true
      activates_on: memory_search with relationship-shaped query
      intervention: modify (route to knowledge_graph backend)

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.

Ships withbitterbot-desktop

Bitterbot - a mesh of agents that turns shared experience into collective capability.

Get the whole plugin
Stats
2,465
Stars
417
Forks
Active
Maintenance
TypeScript
Language
MIT
License
5m ago
Last commit
6mo ago
Created
6h ago
Added

Repo: bitterbot-ai/bitterbot-desktop

Other skills on bitterbot-desktop.