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.
npx agentmods add skills/agentsope/skillalchemy/agentsop-query-routingnpx skills add agentsope/SkillAlchemy --skill agentsop-query-routinggit clone --depth 1 https://github.com/agentsope/SkillAlchemyWrote 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/skills/agentsope/skillalchemy/agentsop-query-routing)<a href="https://agentmods.dev/skills/agentsope/skillalchemy/agentsop-query-routing"><img src="https://agentmods.dev/badge/skills/agentsope/skillalchemy/agentsop-query-routing.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 | $0.00086 | $0.06374 |
| Opus 5 | $0.00043 | $0.03187 |
| Sonnet 5 | $0.00017 | $0.01275 |
| Haiku 4.5 | $0.00009 | $0.00637 |
Grade A, and why
agentsop-query-routing 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 yesterday.
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 — 489 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Query-Type Routing · Enhancement Overlay
Third-person operating model for a coder agent that owns a multi-handler answering surface. Audience is the LLM agent writing/reviewing the routing code — not the end user.
One sentence: A retriever is shaped by the query type it was built for; a summary index, a vector index, and a text-to-SQL engine are not interchangeable — so classify the query and route first, then retrieve.
This is an ENHANCE overlay. It distills the cross-framework routing
pattern from three source skills. For the per-framework API, cross-link the
base skill: [[llamaindex]] (RouterQueryEngine), [[agentsop-dify]] (Question
Classifier node), [[agentsop-langgraph]] (conditional edges).
1. 何时激活 (Activation Rules)
Activate when any of the following holds:
- The system has multiple indices / tools / engines behind one entry point, and a query must be dispatched to exactly one (or a few) of them.
- Inbound queries differ in kind — at least two of: lookup ("what does the contract say about termination"), summarize ("give me the gist of doc Y"), compute/aggregate ("how many tickets closed last week"), compare ("diff the 2024 vs 2025 policy").
- A
VectorStoreIndex(or any single retriever) is being stretched to answer query types it was not built for, and quality is uneven across the mix. - The user names a routing primitive:
RouterQueryEngine,SelectorPromptTemplate,LLMSingleSelector, Dify Question Classifier, LangGraphadd_conditional_edges, "intent classifier", "text-to-SQL or RAG". - PR review touches a function that reads a query and returns which handler to call.
Do not activate when:
- One index/tool serves every query correctly — routing adds an LLM hop and a failure mode for no benefit (see §6 anti-pattern A1).
- The split is by who is asking (tenant / ACL), not what is asked — that
is filtering, route to
[[agentsop-multi-tenant-rag]]. - The downstream choice is fixed (always retrieve then summarize) — that is a static edge / linear pipeline, not a router.
What ships with it
3 files 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.
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.
- yesterday Changed · -16 lines · -228 tokens per session 7b592da34cde
- 5d ago First seen · 505 lines · 314 tokens per session scan A f1e6fd352843
agentsop-query-routing is a skill published in the GitHub repository agentsope/SkillAlchemy (361 stars, last pushed 3d ago), licensed MIT. It adds 86 tokens to every session and 6,374 once invoked, about $0.0004 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 skills, from other repositories
karpathy-llm-wiki
Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.
mixedbread-search
Build and query managed search indexes (Stores) using the Mixedbread Python and TypeScript SDKs. Use when creating knowledge bases, uploading documents, performing semantic or vector search, asking questions over documents, using agentic multi-step retrieval, combining store search with web results, filtering by…
mxbai-cli
Use the mxbai CLI to manage stores, upload files, search documents, ask questions, and sync directories from the terminal. Use when performing Mixedbread operations via command line, setting up CI/CD pipelines with store sync, or managing API keys.
ccg-docs
Generate Markdown documentation from code graphs, build RAG indexes for AI consumption, and lint documentation quality.
rag-evaluator
Generates tailored giskard.checks evaluation suites for RAG (Retrieval-Augmented Generation) systems. Use whenever a user describes a Q&A bot grounded in documents, a knowledge-base chatbot, a retrieval system, or wants to evaluate answer groundedness, faithfulness, hallucination, retrieval quality, citation accuracy…
local-rag-mcp
Use when querying, ingesting, or maintaining a local RAG MCP corpus for semantic document retrieval with privacy controls.