lemonade-router-builder
БесплатноЗапускает вложенные скриптыНе проверенTurns a natural-language description of routing intent into a valid Lemonade `collection.router` policy JSON. The skill generates and validates the JSON only…
от amd★ 523 звезды на GitHubОб этом скилле
Lemonade Router Config Generator
Generate a collection.router policy JSON from a plain-English description
of how requests should be routed. The skill produces and validates the JSON
only - it does not call the live server, register the policy, or run requests
through it. The JSON is accepted by the strict server-side parser on the first
try and stays editable in the desktop app's Hybrid Router editor - except
policies using zero_shot / systemone classifiers or on_truncation, which
the editor can't import yet (JSON-only; tell the user when you generate one).
Prerequisites
- Lemonade Server v11.5.0+ running locally (
lemonade server start). Required only to register and test the generated policy - the skill itself (JSON generation + offline validation) works without a live server.min_total_chars/max_total_charsneed v11.8.0+; thePOST /api/v1/routing/validatecheck in Step 8b needs v11.6.0+. - No GPU or ROCm dependency for authoring. The router policy is a JSON document; no hardware is needed to generate or validate it.
- Python (any 3.x) in PATH - used by the bundled offline validator
(
scripts/validate.py). No extra packages required.
The router picks one candidate model per request. Two authoring modes exist, and choosing the right one is the first decision:
| Mode | JSON shape | When |
|---|---|---|
| LLM-as-router | routing.router block |
The user describes intent only by meaning ("sensitive", "hard questions", "creative writing") with no concrete signals. A small LLM reads each prompt and picks the candidate. |
| Rules | routing.rules (+ optional routing.classifiers) |
The user names any concrete signal: keywords, regex, length, tools, images, metadata, PII/topic classifiers, thresholds, "first match", fallback logic. Deterministic, no extra LLM call for simple conditions. |
routing.router is mutually exclusive with routing.rules and
routing.classifiers - never emit both.
Step 1 - Extract from the user's words
- Candidates: the models that may answer requests. Verbatim model names
(e.g.
Gemma-3-4b-it-GGUF). If the user names none, ask - never invent model names.lemonade listorGET /api/v1/modelsshows what's available. A name the user did give may still not exist on the target host - the offline validator can't check that (Step 8b closes the gap). - Default / fallback: which candidate gets everything that matches nothing. If unstated, use the model the user framed as "local", "small", or "safe"; otherwise the first candidate mentioned.
- Signals: every condition mentioned (keywords, patterns, length, images, tools, topics, PII, safety) and which model each one routes to.
- Classifier models: models named for detection rather than answering (BERT-style encoders, embedding models, zero-shot routers, decision models, an LLM used as judge). Pick the classifier type from the table in Step 5 - the model's kind decides which types it can back.
Step 2 - Scaffold
Always exactly this envelope (the parser rejects unknown or missing keys):
{
"version": "1",
"model_name": "user.MyHybridRouter",
"recipe": "collection.router",
"components": [],
"routing": { }
}
versionis the literal string"1".model_namemust start withuser.; slug from the user's description if they gave a name (user.<Name>using only[A-Za-z0-9._-]). If they didn't name it, derive one from context instead of a fixed literal - e.g.user.<slug-of-default-candidate>-Router- so two different policies don't collide by default./pullis idempotent permodel_name: registering a second policy under the same name silently overwrites the first. If this conversation already produced an unnamed router, don't reuse the same derived name for the next one - ask, or pick a visibly different name.
Step 3 - Candidates and default
"candidates": ["<answering models>"],
"default_model": "<one of candidates>"
default_model MUST be listed in candidates. Candidates should be
chat-capable LLMs - not embedding, classification, or image models.
Step 4 - Mode A: LLM-as-router
"router": {
"type": "llm",
"model": "<small chat LLM>",
"prompt": "You route user requests to the best model. <one sentence per candidate: when to pick it, using the exact model name>."
}
modeldefaults to the most capable candidate, not the cheapest one. The router judges every single request that flows through the policy, so a weak judge silently misrouting everything is a worse default than the extra cost of a stronger one. State the choice in the summary you give the user -router.model: <chosen>(most capable candidate available; pick a smaller dedicated judge model yourself for lower per-request cost, at the risk of the failure mode below). If the user already named a separate model for this r
Установить lemonade-router-builder в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл lemonade-router-builder?
Turns a natural-language description of routing intent into a valid Lemonade `collection.router` policy JSON. The skill generates and validates the JSON only - it does not register it or call the live server. Use when the user wants to route requests between models ("route sensitive queries to X and everything else to Y"), generate a router/hybrid-router config or policy, author a collection.router JSON, split traffic between a small local model and a big/cloud model, add PII/jailbreak/topic classifiers to routing, route on a yes/no or graded question about the prompt using a decision model, or mentions Lemonade Router, routing rules, routing.router, candidates/default_model, keywords_any, semantic_similarity, zero_shot, systemone, decision models (Laya, Julia-1, d3), or LLM-as-router. Fills every field the user did not specify with safe defaults.
Как установить скилл lemonade-router-builder?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл lemonade-router-builder запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic