add-intent-router
БесплатноБез исполняемых скриптовНе проверенReplace an existing agent's hand-written routing (keyword if/else chains, regex, or an LLM call that only picks a route) with a Redis Iris Intent Router…
от redis★ 177 звёзд на GitHubОб этом скилле
Add Intent Router
One match() call in place of the code that decides where a message goes. The Router embeds the message, finds the nearest example phrasings, groups them by intent, applies a threshold, and returns the matching intents best first, each with the target you attached. No match is an empty result, not an error. The routes and their phrasings are content, not code: ask first, write intents.yaml, provision, load, then wire.
1. Discover
Read the project:
- Find where the agent decides what to do with a message:
if "refund" in text, a regex table, amatchstatement, a classifier prompt ("Classify this message as one of ..."), or a router node or conditional edge in a graph. - List every route it can take and what each one does: call a tool, hand off to a sub-agent, pick a prompt, or answer directly.
- Find real phrasings: test fixtures, logs, the keywords in the if/else, the examples in the classifier prompt.
- Async agent?
amatchandadefineare the async twins; every other method is sync only.
Then ask the developer these five questions, nothing more. A shrug takes the default.
| Ask | If the answer is | Configure |
|---|---|---|
| What are the routes today? | A list | One intent each in intents.yaml. Names use letters, digits, ., _ and - |
| Give three to five real phrasings for each route | Phrasings | examples for that intent. An intent with no examples never matches |
| What does each route dispatch to? | A tool, a sub-agent, a prompt | target: {type, ref, args}. The Router stores it and never interprets it |
| The code already knows | No target; dispatch on the intent name | |
| What should happen when nothing matches? | Fall back to the general agent (default) | Keep the existing default path for an empty result |
| Ask a clarifying question | That branch on an empty result | |
| Which embedding model? | OpenAI (default) | --provider openai --model text-embedding-3-small --dimensions 1536 |
| Another | iris intent-router service models lists what the deployment offers. The choice is fixed once the Router exists |
2. Get current facts from MCP
Do this before writing code. Never guess framework APIs from memory.
- Framework docs: query an available docs MCP (Context7, or the framework's own) for how the installed version routes: conditional edges, handoffs, or tool choice.
- Redis docs: if the Redis docs MCP is connected, use it for Intent Router concepts (intents, examples, thresholds).
- No MCP available: read the installed package source in the virtualenv. Say so in the report.
3. Configure
Write intents.yaml from the answers and commit it: it is the reviewable record of the routes.
intents:
- name: track_order
description: Where an order is and when it arrives
examples: ["where is my order", "track my package", "has my parcel shipped yet"]
target: {type: tool, ref: orders.track}
- name: refund_request
examples: ["I want my money back", "refund this order", "return and refund"]
target: {type: agent, ref: refunds}
minScore: 0.4 # stricter than the Router's default for this one
Provision from the terminal on a self-managed suite. A cloud profile refuses the control-plane commands with cloud_unsupported: the person creates the Router in Iris → Intent Router → New Intent Router and its key in Iris → Access & Identity. Add --local for a local stack (it assumes 127.0.0.1:9400 and 9401), or let the person export IRIS_INTENT_ROUTER_SERVICE_URL, IRIS_INTENT_ROUTER_SERVICE_TOKEN, IRIS_INTENT_ROUTER_URL, IRIS_IDENTITY_URL and IRIS_IDENTITY_TOKEN. Full reference: iris intent-router <command> --help (for example iris intent-router service create --help).
iris --json --no-input intent-router service create --name support --provider openai --model text-embedding-3-small --dimensions 1536 --role read --dry-run
iris --json --no-input intent-router service create --name support --provider openai --model text-embedding-3-small --dimensions 1536 --role read --wait --write-env .env
iris --json --no-input intent-router service check <routerId from the result> --env-file .env
Run the CLI as an agent
- Always put
--json --no-inputbefore the product name. You get one JSON value on stdout, errors as one JSON value on stderr, and no prompts. - Dry-run first: it sends nothing and lists every missing setting. If anything is missing, stop and hand off (step 4) before any write.
- Always deliver keys with
--write-env PATH(or--write PATHonservice key). Never runcreateorkeywith--jsonand no file: that prints the key into your transcript. - On
credential_required, stop. Tell the person which variable to set (details.env) and linkdetails.obtain. Never ask for a secret in chat, pass one on the command line, or echo,catorgrepan env file. - On
resource_exists, ask whether to--reuseor pick another name. Never delete to retry. If `create
Установить add-intent-router в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл add-intent-router?
Replace an existing agent's hand-written routing (keyword if/else chains, regex, or an LLM call that only picks a route) with a Redis Iris Intent Router through redis-iris, so a message maps to a defined intent and its dispatch target by example phrasings and a score threshold. Asks five questions (what the routes are today, a few real phrasings per route, what each route dispatches to, what happens when nothing matches, which embedding model), writes the answers to intents.yaml, provisions the Router from the terminal with `iris intent-router service create`, loads the intents with `iris intent-router intents add`, then wires `router.match()` where the agent decides today. Use when the agent routes with keywords or an extra LLM call, or the user asks for intent detection, intent routing, or semantic routing.
Как установить скилл add-intent-router?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл add-intent-router запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic