К основному содержанию
скилл CX Codex

sent-routing-strategist — скилл для Claude Code: маршрутизация

Разбирает, как сообщение Sent доходит до получателя: автоматическая маршрутизация или закреплённый канал, что реально делает массив channel и почему сообщение получило статус FAILED, FILTERED или BLOCKED.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add sentdm/sent-plugin --skill sent-routing-strategist -a claude-code
Открыть на GitHub

Что делает sent-routing-strategist

Скилл помогает выбрать значение поля channel и понять, что произошло с отправкой. Главная ловушка: массив channel — это список для широковещательной рассылки, а не порядок предпочтений. ["whatsapp", "sms"] на двух получателей даёт четыре сообщения и четыре списания. Поля fallback и синтаксиса упорядоченных предпочтений нет.

Автоматическая маршрутизация и есть механизм отката. Если опустить channel или передать ["sent"], платформа сама подбирает маршрут и при сбое на уровне маршрута переходит между каналами и провайдерами, но не более трёх пар. Закрепление канала (["sms"], ["whatsapp"], ["rcs"]) ограничивает подбор этим каналом и никогда не переходит на другой: если подходящего маршрута нет, сообщение остаётся FAILED, а не откатывается молча. Любое значение вне sent, sms, whatsapp и rcs возвращает 400.

Диагностика опирается на статус и историю активности: message.routed, message.delivered, GET /v3/messages/{id}/activities. Статус FILTERED — это политический барьер, повторять отправку нельзя. BLOCKED — проблема аккаунта: баланс, квота онбординга или неутверждённый шаблон; запрос при этом принимается с 202. Канал auto означает, что сообщение завершилось до попытки маршрута. Внутренние коды причин Sent записывает, но в ответах API и вебхуках не отдаёт, поэтому разбор идёт по комбинации статуса и канала. Отдельно стоит помнить про цену: рассылка на 1 000 получателей по двум каналам — это 2 000 сообщений.

Какие задачи решает

  • выбрать между автоматической маршрутизацией и закреплённым каналом
  • объяснить, почему массив из двух каналов дал двойное списание
  • настроить откат с WhatsApp на SMS для конкретного номера
  • разобрать, почему сообщение зависло в статусе FAILED или BLOCKED
  • посчитать бюджет рассылки до отправки батча

Примеры запросов агенту

  • Почему сообщение с channel: ["whatsapp", "sms"] списалось дважды?
  • Хочу откат с WhatsApp на SMS — что передать в channel?
  • Сообщение получило статус FILTERED, можно ли повторить отправку?

Как установить sent-routing-strategist

1Через Skills CLI (Vercel)

npx skills add sentdm/sent-plugin --skill sent-routing-strategist -a claude-code

2Вручную: положить файлы

~/.claude/skills/sent-routing-strategist/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/sent-routing-strategist/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о sent-routing-strategist

Как установить sent-routing-strategist в Claude?

Выполните npx skills add sentdm/sent-plugin --skill sent-routing-strategist -a claude-code. Скилл появится в ~/.claude/skills/sent-routing-strategist/SKILL.md.

Что делает sent-routing-strategist?

Помогает выбрать значение поля channel и разобрать итог отправки: какой маршрут был выбран, сработал ли откат и что означает статус FAILED, FILTERED, BLOCKED или канал auto.

Как работает откат с WhatsApp на SMS?

Это частный случай автоматической маршрутизации. Сообщение в WhatsApp принимается, падает по причине на стороне получателя, переходит на другой маршрут и записывает правило, что WhatsApp для этого номера недоставим. При закреплённом канале WhatsApp такого не произойдёт.

Исходный текст

SKILL.md · MIT
---
name: sent-routing-strategist
description: Decides how a Sent message should reach the recipient — automatic routing versus a pinned channel, what the channel array actually does, how fallback and reroute work, and why a message ended as FAILED, FILTERED, BLOCKED, or channel "auto". Use when choosing the channel field, expecting WhatsApp-to-SMS fallback, debugging an unexpected route or duplicate charges from multiple channels, or interpreting message status and activity evidence.
---

# Sent Routing Strategist

Routing is where the most expensive Sent misconceptions live. Two facts govern almost every decision:

1. **The `channel` array is a broadcast list, not a preference order.** `["whatsapp", "sms"]` with two recipients creates four messages and four charges. There is no `fallback` field and no ordered-preference syntax.
2. **Automatic routing is the fallback mechanism.** Omit `channel`, or send `["sent"]`, and the platform selects a route, then reroutes across up to three distinct channel-and-provider pairs when a route-level failure occurs.

## Decide the channel value

| Intent | Correct value | Reason |
| --- | --- | --- |
| Reach the recipient however works best | omit `channel` or `["sent"]` | Enables route selection and reroute |
| Guarantee one specific channel | `["sms"]`, `["whatsapp"]`, or `["rcs"]` | Pinning restricts matching to that channel and never crosses channels |
| Deliberately deliver the same content on several channels | `["whatsapp", "sms"]` | Broadcast; expect one message and one charge per pair |
| "Try RCS, fall back to SMS" | omit `channel` or `["sent"]` | An ordered array would broadcast; automatic routing performs the fallback |

Any value outside `sent`, `sms`, `whatsapp`, and `rcs` returns `400`. When a user asks for ordered fallback, name the misconception explicitly before writing code, because the failure mode is duplicate delivery and duplicate cost rather than an error.

## What a pinned channel gives up

Pinning restricts route matching to the named channel. Rules without a channel constraint still match and resolve to the pinned channel, so pinning does not require channel-specific rules to exist. A pinned send never crosses to a different channel, though same-channel provider hops remain possible when a rule permits them. If no route exists on the pinned channel, the message ends `FAILED` with no route matched — it does not silently fall back.

Pin when a compliance, contractual, or content constraint requires a specific channel. Otherwise prefer automatic routing.

## Reading the outcome

`POST /v3/messages` returns `202` with per-recipient `message_id` values. For automatic routing, the echoed per-recipient channel is not a resolved route and is never updated afterward. Resolve the truth from evidence:

| Question | Evidence |
| --- | --- |
| Which route was actually attempted | `message.routed` event, or `channel` on `GET /v3/messages/{id}` after routing |
| Did the recipient's device receive it | `message.delivered` |
| What sequence of routes was tried | `GET /v3/messages/{id}/activities` |
| Why did it stop | Terminal status plus channel value |

## Terminal status interpretation

| Status | Meaning | Correct response |
| --- | --- | --- |
| `FAILED` | A route attempt failed; automatic routing may still enqueue another attempt | Inspect the latest message state and activities before treating it as final |
| `FILTERED` | Policy gate — consent block or route denial | Never retry; a consent block is a compliance stop |
| `BLOCKED` | Account precondition — balance, onboarding quota, unapproved template | Fix the account condition, then send again |
| `SCHEDULED` | Parked by quiet-hours policy | Wait; it re-enters the pipeline automatically |

An outcome whose `channel` is `auto` means the message ended before any route was attempted. The causes are no matching route, invalid template parameters, a consent block, or an account precondition. Account preconditions do not reject the send request: it is accepted with `202` and the affected messages surface as `BLOCKED`.

Sent records internal send-time reason codes on the message for these cases, but does not return them in API responses or webhooks, so diagnosis relies on the status-and-channel combination plus the activity history. The mapping from observable evidence to root cause is tabulated in [references/routing-diagnosis.md](references/routing-diagnosis.md).

## Reroute behavior

A failed route is retried only when the terminal failure signals a route or carrier problem another route might overcome: undeliverable by this route, provider service unavailable, provider timeout, or transport error. Every other failure stays `FAILED`.

Reroute reuses the **same `message_id`** and re-runs the pipeline, so `message.queued` and `message.routed` fire again, consent gates re-apply on every attempt, and already-attempted routes are excluded. The ceiling is three distinct channel-and-provider pairs across the initial send and all reroutes.

The WhatsApp-to-SMS behavior customers ask about is a specific case of this: a WhatsApp message accepted and then failed for a recipient-side reason reroutes and records a recipient-scoped rule that WhatsApp is not deliverable for that number, so subsequent automatic sends skip WhatsApp for that recipient. It requires automatic routing; a pinned WhatsApp send cannot produce it.

## How automatic routing selects a route

Routes come from platform-maintained rules evaluated at send time against recipient attributes (country, number prefix, exact number, carrier, number type, ported state), sender, template attributes, channel, and whether the destination is international. Ordering is: exact-recipient rules first, then account-scoped before global, then match specificity, then rule priority, then longer number prefix, then the older rule. Inactive, deleted, expired, and below-threshold rules are excluded. Candidates whose template has an explicit non-approved review status on that channel are dropped, while a channel with no recorded review is not blocked. The first surviving candidate wins and the rest remain available as fallback routes.

There is no fixed channel preference order, so never promise "RCS first, then WhatsApp, then SMS." Read [references/routing-model.md](references/routing-model.md) before making any claim about why a specific route was chosen.

## Cost and volume consequences

Because broadcast multiplies messages by recipients, review any multi-channel array against expected spend before sending. A 1,000-recipient send with two channels is 2,000 messages. The per-request recipient ceiling is 1,000, and documented pacing pairs full batches with roughly one request per second to stay inside the 200-requests-per-minute budget.

RCS today carries text plus up to four suggestion chips, mapped from template buttons, and every outbound RCS message receives an appended STOP chip. Do not design an RCS-pinned flow that depends on rich cards, carousels, or media.

## Boundaries

Use `sent-messaging` to execute a single send with confirmation, `sent-two-way-messaging` for consent and inbound keyword semantics, `messaging-performance-analyzer` for aggregate delivery-rate regressions, and `sent-webhook-engineer` for receiving and deduplicating the events this skill teaches you to read.

© sentdm · MIT · sentdm/sent-plugin

Похожие скиллы

Всё по теме «Бэкенд и API» →
twilio-content-template-builder официальный Twilio Создаёт и отправляет шаблоны сообщений через Twilio Content API: WhatsApp, SMS, RCS и MMS с переменными и одобрением Meta. CX Codex GP ChatGPT ★ 7 596звёзд репо twilio-messaging-overview официальный Twilio Скилл-навигатор по каналам Twilio Messaging: помогает выбрать SMS, WhatsApp, RCS или Messenger и провести настройку от первого сообщения до мониторинга. CX Codex GP ChatGPT 1установок omni-combos-routing cheaper-inference Скилл создаёт и настраивает связки моделей с разными стратегиями маршрутизации, цепочками fallback и метриками. Пригодится для управления OmniRoute через API. CX Codex +1 1 200установок whatsapp membrane Скилл подключает WhatsApp к вашему агенту: отправка текста, картинок, документов, реакций и шаблонов. Пригодится, когда нужно вести переписку из кода. CX Codex +1 368установок integrate-whatsapp gokapso Скилл подключает WhatsApp к продукту через Kapso, помогает выдавать ссылки на онбординг, ловить события через вебхуки и отправлять сообщения. CX Codex +1 4 700установок whatsapp-automation claude-office-skills Скилл описывает автоматизацию WhatsApp Business: поддержку клиентов, чат-ботов, уведомления о заказах и рассылки. CX Codex +1 6 500установок

Из того же набора15

template-builder-ui Скилл помогает спроектировать интерфейс конструктора шаблонов под контракт Sent v3, настроить предпросмотр каналов и валидацию перед отправкой на модерацию. CX Codex +1 2 900установок waba-embedded-signup Помогает подключить WhatsApp Business Account через Sent и не перепутать три разных пути интеграции. Пригодится при настройке профилей, токенов и колбэков. CX Codex +1 2 900установок waba-template-author Скилл преобразует текст рассылки в валидный payload для Sent v3 API и проверяет шаблон на требования политик WhatsApp. Пригодится при сборке служебных, рекламных и OTP-сообщений. CX Codex +1 2 900установок sent Разбирает расплывчатые просьбы про Sent и отправляет их в нужный скилл или операцию через MCP-сервер. CX Codex +1 2 900установок sent-profile-provisioning Скилл проводит создание, правку и удаление Sender Profiles в Sent через MCP-инструменты и REST-жизненный цикл профиля. Пригодится, когда нужно завести тенанта и довести профиль до состояния, в котором он может отправлять. CX Codex +1 2 700установок sent-integration-starter Скилл настраивает интеграцию с API Sent v3: от выбора SDK и ключей до идемпотентных отправок и проверки вебхуков. Пригодится при подключении сервиса в проект или обработке ошибок 429 и 409. CX Codex +1 2 700установок sent-webhook-engineer Скилл для сборки и отладки приёмников вебхуков Sent v3: проверка подписи, отсев повторов, дедупликация событий и разбор лога доставки. CX Codex +1 2 700установок sent-two-way-messaging Проектирует входящие сценарии в Sent: обработку ключевых слов отписки, статус согласия контактов, автоответы в WhatsApp и историю переписки. Пригодится при настройке чат-ботов и службы поддержки. CX Codex +1 2 700установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой