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

migrate-to-sent — скилл для Claude Code: миграция с Twilio

Скилл migrate-to-sent планирует и выполняет переезд с Twilio, Sinch, Infobip, Vonage или MessageBird на Sent v3: маппит отправку, статусы, вебхуки, отписки и шаблоны, затем режет трафик поэтапно с dual-run и откатом.

MIT 2 700 установок ★ 40 обновлён 2026-10-20

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

Что делает migrate-to-sent

Скилл ведёт по пяти проблемам, которые возникают при любой миграции с крупного CPaaS-провайдера. Первая — упорядоченный fallback: на Sent массив channel транслируется как broadcast-список, поэтому перенос упорядоченного массива из Twilio или Sinch даёт одно сообщение и один списаный заряд на каждую пару получатель-канал. Тесты это пропустят, а продакшн-расходы умножатся. Правило простое: никогда не переносить упорядоченный список каналов, а отдать маршрутизацию платформе через автоматический routing.

Статусные словари не совпадают: Sent добавляет ROUTED и SCHEDULED, у которых нет аналогов у конкурентов. Обработчики, которые считают любой не-доставленный терминальный статус поводом для ретрая, будут ретраить блокировки согласия — это compliance-нарушение, а не баг. Числовые коды ошибок вроде Twilio 21610 переписываются на строковые семейства error.code.

Вебхук-подпись Sent — это x-webhook-signature: v1,{base64}, HMAC-SHA256 поверх {x-webhook-id}.{x-webhook-timestamp}.{raw_body}. Ключ получается из signing secret: снять префикс whsec_, остаток декодировать из base64. Отметки времени вне 300 секунд отбрасываются. Так как Sent не даёт per-event id, ключи дедупликации выводят из семантики payload. Приёмник скилл советует строить через sent-webhook-engineer, а не переделывать верификатор прежнего провайдера.

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

  • маппить send-вызовы, статусы и вебхуки со старого провайдера на Sent v3
  • не допустить broadcast-переплаты при переносе упорядоченного массива каналов
  • переписать ретраи, чтобы они не трогали блокировки согласия
  • сверить suppression-списки и не потерять отписки при переезде
  • перевести WhatsApp-шаблоны на именованные параметры до cutover

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

  • Составь план миграции с Twilio на Sent v3 и найди все места, где нужен перевод кода
  • Проверь наши вебхук-обработчики и перепиши верификацию подписи под Sent
  • Найди в репозитории упорядоченные массивы каналов и покажи, как заменить их на автоматическую маршрутизацию

Как установить migrate-to-sent

1Через Skills CLI (Vercel)

npx skills add sentdm/sent-plugin --skill migrate-to-sent -a claude-code

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

~/.claude/skills/migrate-to-sent/SKILL.md

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

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

Вопросы о migrate-to-sent

Как установить migrate-to-sent в Claude Code?

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

Что делает migrate-to-sent?

Планирует и выполняет миграцию с Twilio, Sinch, Infobip, Vonage или MessageBird/Bird на Sent v3: маппит send-вызовы, статусные словари, схемы подписи вебхуков, списки отписок, шаблоны и модель тенантов, затем ведёт переключение через dual-run с откатом.

Почему нельзя просто перенести упорядоченный список каналов?

На Sent массив channel — это broadcast-список. Перенос упорядоченного массива даёт одно сообщение и один списаный заряд на каждую пару получатель-канал, тесты это пропускают, а расходы в проде растут. Нужно опустить channel или отправить ["sent"] и отдать маршрутизацию платформе.

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

SKILL.md · MIT
---
name: migrate-to-sent
description: Plans and executes a migration from Twilio, Sinch, Infobip, Vonage, or MessageBird/Bird to Sent v3 — mapping send calls, status vocabularies, webhook signature schemes, opt-out stores, templates, and tenancy models, then cutting over safely with dual-run and rollback. Use when replacing an incumbent CPaaS provider, translating provider code or webhook handlers to Sent, or planning a phased cutover and its verification gates.
---

# Migrate to Sent

Every migration from a major CPaaS provider hits the same five translation problems. Work them in this order, because the first one silently doubles cost and is invisible in tests.

## 1. Ordered fallback becomes automatic routing

Incumbent platforms express cross-channel delivery through different caller-side arrays, failover objects, messaging-service features, or application-level priority configuration. Do not assume those shapes have a direct Sent request-field equivalent.

**Sent's `channel` array is a broadcast list.** Porting an ordered array produces one message and one charge per recipient-channel pair, which passes tests and multiplies production spend. The correct translation is automatic routing — omit `channel` or send `["sent"]` — which lets the platform select a route and reroute across up to three channel-and-provider pairs on the same `message_id`. Details belong to `sent-routing-strategist`; the migration rule is simply: **never port an ordered channel list.**

## 2. Status vocabularies do not line up

Incumbent statuses map onto Sent's, but Sent adds two states that have no equivalent and that break naive retry logic.

| Sent status | Closest incumbent analogue | Migration note |
| --- | --- | --- |
| `QUEUED` | Twilio `queued`, Sinch `QUEUED_ON_CHANNEL` | Accepted, not sent |
| `ROUTED` | no analogue | Route chosen; fires again on reroute |
| `SENT` | Twilio `sent`, Sinch `MESSAGE_SUBMIT` | Provider handoff only |
| `DELIVERED` | `delivered` everywhere | The first proof of handset receipt |
| `READ` | Twilio `read`, Sinch `READ` | WhatsApp and RCS only |
| `FAILED` | `failed`, `undelivered` | May still reroute; not necessarily final |
| `FILTERED` | Twilio error 21610 (opt-out) | **Policy gate. Never retry** |
| `BLOCKED` | account-level errors | **Account precondition.** Fix the account, then resend |
| `SCHEDULED` | no analogue | Quiet-hours parking; resumes automatically |

Two consequences for ported code. Handlers that treat every non-delivered terminal state as retryable will retry consent blocks, which is a compliance failure rather than a bug. And handlers keyed on numeric provider error codes — Twilio's `21610` is the classic — must be rewritten against Sent's string `error.code` families.

## 3. Webhook verification is a rewrite, not a port

No two providers sign the same way, and no Sent SDK ships a verifier.

| Provider | Scheme |
| --- | --- |
| Twilio | `X-Twilio-Signature`, base64 HMAC-**SHA1** over the full URL plus sorted POST parameters |
| Sinch | HMAC-SHA256 over `body.nonce.timestamp`, four `x-sinch-webhook-signature*` headers, or OAuth 2.0 |
| Infobip | Basic, HMAC-SHA256 over the raw body, or OAuth on a notification profile; **the header name is account-configured** |
| Vonage | JWT in `Authorization: Bearer`, or a legacy `sig` parameter |
| MessageBird/Bird | `messagebird-signature`, base64 HMAC-SHA256 over timestamp, URL, and a SHA-256 body hash |
| **Sent** | `x-webhook-signature: v1,{base64}`, HMAC-SHA256 over `{x-webhook-id}.{x-webhook-timestamp}.{raw_body}` |

Sent's key is the signing secret with `whsec_` stripped and the remainder base64-decoded, compared in constant time, with timestamps outside 300 seconds rejected. Because Sent provides no per-event id, dedupe keys must be derived from payload semantics. Build the receiver with `sent-webhook-engineer` rather than adapting the incumbent's verifier.

## 4. Opt-out stores must be reconciled, not migrated by copy

Every provider keeps its own suppression list — Twilio Advanced Opt-Out, Infobip Blocklist, Sinch OPT_IN/OPT_OUT events. Sent enforces consent at the platform level before events reach the application, stores it as `opt_out` on the contact, and applies it **channel-agnostically**: a `STOP` on SMS suppresses WhatsApp and RCS too.

Reconciliation rules: export the incumbent's suppression list before cutover, treat any opt-out on any incumbent channel as a global Sent opt-out, and never clear `opt_out` to "clean up" migrated data. Sent's ten default keywords are `STOP`, `CANCEL`, `UNSUBSCRIBE`, `QUIT`, `END`, `START`, `UNSTOP`, `SUBSCRIBE`, `HELP`, `INFO`, matched only when the entire trimmed body equals the keyword — so incumbent-specific keywords need custom keyword entries. Rewrite any incumbent keyword matcher as an exact local consent mirror and audit mechanism; the matcher must not write consent to Sent again. Consent semantics belong to `sent-two-way-messaging`.

## 5. Templates and tenancy are re-registered, not transferred

WhatsApp templates live with the WABA, so the migration question is whether the WABA moves. Positional placeholders (`{{1}}`, `{{2}}`) become **named** parameters in Sent, which means every call site that passed an ordered array must pass a named map. Approval is asynchronous and arrives as a `templates` webhook event, so build the template inventory before cutover rather than during it.

Tenancy maps as follows, with the boundary decision owned by `sender-profile-architect` and the API work by `sent-profile-provisioning`:

| Incumbent construct | Sent equivalent |
| --- | --- |
| Twilio subaccount | Sender Profile |
| Twilio Messaging Service | routing plus profile configuration, not a caller-side pool |
| Infobip Application or Entity | Sender Profile |
| Sinch Conversation API app | Sender Profile |
| Provider API credential per tenant | Profile-scoped API key, or organization key with `x-profile-id` |

## Migration sequence

1. **Inventory** every send call site, webhook handler, status branch, template, suppression list, and credential. Use `scripts/inventory_scan.py` to find them mechanically. It reads local regular files inside the selected repository, skips symbolic links and environment files, and reports paths, line numbers, and migration guidance without source excerpts. It makes no network requests.
2. **Map** each item using [references/provider-mapping.md](references/provider-mapping.md), flagging ordered-fallback arrays and numeric error codes as required rewrites.
3. **Stand up Sent in parallel**: credentials, one webhook per environment, verified receiver, templates re-registered and approved.
4. **Prove equivalence in sandbox** with `"sandbox": true`, then with a small live cohort confirmed to `DELIVERED`.
5. **Dual-run** with a traffic split, comparing delivery rates, latency, and cost per message on the same message classes.
6. **Cut over** by message class — lowest-risk transactional first, marketing last — keeping the incumbent receiver live.
7. **Decommission** only after a full billing cycle of clean data, then revoke incumbent credentials.

Sequencing detail, verification gates, and rollback triggers are in [references/cutover-playbook.md](references/cutover-playbook.md).

## Mistakes that survive testing

- Porting an ordered channel array. Doubles cost, never errors.
- Treating `FILTERED` as retryable. Compliance exposure.
- Reusing the incumbent's signature verifier. Every delivery returns 401.
- Assuming `202` means delivered. Sent acknowledges acceptance only.
- Keeping positional template placeholders. Parameters silently mismatch.
- Retrying on `401`. Ten consecutive auth failures lock the credential with escalating lockout.
- Omitting `Idempotency-Key` during dual-run. A timeout retry sends twice.
- Sending `x-profile-id` with a profile-scoped key. Returns `403`.
- Copying an incumbent's `Authorization: Bearer` pattern. Sent authenticates with `x-api-key`.

## Boundaries

This skill owns provider mapping and line-by-line migration planning. Hand the resulting Sent client and resilience work to `sent-integration-starter`, channel semantics to `sent-routing-strategist`, receiver construction to `sent-webhook-engineer`, WhatsApp onboarding to `waba-embedded-signup`, and US campaign registration to `sms-10dlc-registration`.

© sentdm · MIT · sentdm/sent-plugin

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

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
sandbox-migrate-to-next cloudflare Скилл sandbox-migrate-to-next для Claude Code переносит Cloudflare Sandbox со стабильной версии пакета на предварительный релиз @cloudflare/sandbox@next (SDK 1.0). Готовит код к переходу на будущий стабильный релиз. CX Codex +1 85 000установок convex-migrate-rehearse convex Скилл convex-migrate-rehearse для Claude Code, который репетирует изменение схемы и откат данных на копии продакшна, проверяет на ошибки, а потом применяет проверенное изменение в боевой системе. CX Codex +1 43 800установок twilio-debugging-observability официальный Twilio Скилл twilio-debugging-observability разбирает, почему не доходят SMS и падают звонки, и помогает настроить мониторинг Twilio в продакшене. CX Codex GP ChatGPT +1 ★ 8 052звёзд репо migrate-dotnet10-to-dotnet11 dotnet Скилл migrate-dotnet10-to-dotnet11 переводит проекты и решения с .NET 10 на .NET 11. Он обновляет целевой фреймворк, пакеты и исправляет несовместимости C# 15 и EF Core 11. CX Codex +1 4 500установок migrate-dotnet9-to-dotnet10 dotnet Скилл migrate-dotnet9-to-dotnet10 ведёт проект с net9.0 на net10.0: правит TargetFramework, чинит ошибки сборки и разбирает ломающие изменения .NET 10, C# 14, ASP.NET Core 10 и EF Core 10. CX Codex +1 4 500установок migrate-validate ruvnet Скилл migrate-validate автоматически проверяет незавершённые миграции на ошибки: несуществующие внешние ключи, неполные откаты, нарушения соглашений об именовании. Ловит проблемы до того, как миграция попадёт в БД. CX Codex +1 729установок

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

Весь набор →
waba-embedded-signup Скилл waba-embedded-signup для Claude Code настраивает подключение WhatsApp Business Account через Sent. Помогает связать профили Meta и устранить сбои онбординга. CX Codex +1 2 900установок waba-template-author Скилл 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 Скилл sent-profile-provisioning для Claude Code управляет Sender Profiles в Sent через MCP-инструменты — создаёт, правит и удаляет профили, доводя тенанта до готовности к отправке. CX Codex +1 2 700установок sent-routing-strategist Скилл sent-routing-strategist для Claude Code объясняет выбор канала Sent и повторную маршрутизацию сообщений. Запускается при настройке channel и разборе статусов доставки. CX Codex +1 2 700установок sent-integration-starter Скилл sent-integration-starter для Claude Code помогает добавить Sent v3 в существующий проект. Он подключается при выборе SDK, настройке отправки сообщений или проверке вебхуков. CX Codex +1 2 700установок sent-webhook-engineer Скилл sent-webhook-engineer для сборки и отладки приёмников вебхуков Sent v3: проверка подписи, отсев повторов, дедупликация событий и разбор лога доставки. CX Codex +1 2 700установок sent-two-way-messaging Скилл sent-two-way-messaging проектирует входящие сценарии в Sent: обработку ключевых слов отписки, статус согласия контактов, автоответы в WhatsApp и историю переписки. Пригодится при настройке чат-ботов и службы поддержки. CX Codex +1 2 700установок

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

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