twilio-sendgrid-email-settings — скилл для Codex: настройка SendGrid
Скилл помогает настраивать шаблоны SendGrid, отслеживание писем и брендированные ссылки. Пригодится, когда нужно изменить содержимое или параметры отправки.
npx skills add openai/plugins --skill twilio-sendgrid-email-settings -a codexЧто делает twilio-sendgrid-email-settings
Скилл описывает настройку динамических шаблонов SendGrid на Handlebars, типов содержимого письма и отслеживания открытий, переходов и подписок. Шаблоны можно вести в консоли SendGrid, а шаблоны и отслеживание — также через API. Для работы нужен API-ключ SendGrid с префиксом SG-.
В инструкции перечислены встроенные помощники Handlebars и ограничения: пользовательские помощники не поддерживаются, а переменные без значения отображаются пустыми строками. Шаблоны с ID d- используют Handlebars, тогда как старые транзакционные шаблоны используют синтаксис -substitution-; смешивать эти форматы нельзя. Отслеживание открытий ненадёжно, поэтому на нём не стоит строить критичную бизнес-логику.
Для брендирования ссылок потребуется CNAME-запись, указывающая поддомен на sendgrid.net. AMP-содержимое отображается только в совместимых почтовых клиентах и требует регистрации отправителя; письмо должно также включать text/plain и text/html. Скилл относится к SendGrid, а не к Twilio Email API.
Какие задачи решает
- настроить динамический шаблон SendGrid с Handlebars
- выбрать отслеживание открытий, переходов или подписок
- подключить собственный домен для ссылок отслеживания
- подготовить письмо с HTML и текстовой версией
- разобраться, почему переменная шаблона отображается пустой строкой
Примеры запросов агенту
- Настрой динамический шаблон SendGrid с условием для подписчиков со статусом
active. - Объясни, как включить отслеживание переходов и какие у него есть ограничения.
- Подскажи, как настроить брендированные ссылки через CNAME для моего поддомена.
Как установить twilio-sendgrid-email-settings
1Через Skills CLI (Vercel)
npx skills add openai/plugins --skill twilio-sendgrid-email-settings -a codex2Вручную: положить файлы
.agents/skills/twilio-sendgrid-email-settings/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add openai/plugins --skill twilio-sendgrid-email-settings -a claude-code2Вручную: положить файлы
~/.claude/skills/twilio-sendgrid-email-settings/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/twilio-sendgrid-email-settings/
Вручную: положить файлы
.cursor/skills/twilio-sendgrid-email-settings/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install openai/plugins twilio-sendgrid-email-settings2Вручную: положить файлы
.github/skills/twilio-sendgrid-email-settings/SKILL.mdКомандой платформы
gemini skills install https://github.com/openai/plugins --path plugins/twilio-developer-kit/skills/twilio-sendgrid-email-settingsВручную: положить файлы
.devin/skills/twilio-sendgrid-email-settings/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Скиллы Codex: как установить, где лежат и как вызвать
Вопросы о twilio-sendgrid-email-settings
Как установить twilio-sendgrid-email-settings в Codex?
Выполни npx skills add openai/plugins --skill twilio-sendgrid-email-settings -a codex. Файл скилла находится по пути .agents/skills/twilio-sendgrid-email-settings/SKILL.md.
Что делает twilio-sendgrid-email-settings?
Помогает настраивать шаблоны писем SendGrid, параметры отслеживания и брендирование ссылок. Также описывает форматы содержимого и ограничения Handlebars.
Что нужно для брендирования ссылок SendGrid?
Нужна CNAME-запись, которая направляет поддомен на sendgrid.net. Настройка выполняется в разделе Link Branding в консоли SendGrid.
Исходный текст
SKILL.md · MIT
---
name: twilio-sendgrid-email-settings
description: >
Configure SendGrid dynamic templates (Handlebars), tracking settings
(opens, clicks, subscriptions), link branding for custom tracking
domains, and content types (HTML, plain text, AMP). Use when customizing
SendGrid email content, tracking behavior, or branded links. Requires a
SendGrid API key (SG.-prefix) — not applicable to the Twilio Email API
(comms.twilio.com).
---
## Overview
SendGrid email settings control how your messages are constructed, personalized, and tracked. Most configuration happens in the SendGrid Console, but templates and tracking can also be managed via API.
---
## Dynamic Templates
Templates use Handlebars syntax and are managed in Console > Email API > Dynamic Templates. Template IDs start with `d-`.
**Supported Handlebars helpers:**
| Helper | Use | Example |
|--------|-----|---------|
| `if` / `unless` | Conditional | `{{#if premium}}Welcome back!{{/if}}` |
| `each` | Iteration | `{{#each items}}{{this.name}}{{/each}}` |
| `equals` / `notEquals` | Comparison | `{{#equals status "active"}}...{{/equals}}` |
| `and` / `or` | Boolean logic | `{{#and premium verified}}...{{/and}}` |
| `greaterThan` / `lessThan` | Numeric | `{{#greaterThan count 5}}...{{/greaterThan}}` |
| `length` | Array/string | `{{length items}}` |
| `formatDate` | Date format | `{{formatDate date "MM/DD/YYYY"}}` |
| `insert` | Module insert | `{{insert "module_name"}}` |
**NOT supported:** Custom helpers, inline partials, `lookup`, `log`, `with`, `blockHelperMissing`. SendGrid implements a subset of Handlebars.js.
### Template Versions
- **Dynamic templates** (IDs starting with `d-`): Support Handlebars
- **Legacy transactional templates**: Use `-substitution-` syntax — not interchangeable with Handlebars
---
## Tracking Settings
| Setting | What it does | Caveat |
|---------|-------------|--------|
| **Open tracking** | Inserts a tracking pixel | Unreliable: Apple Mail Privacy Protection inflates opens; image-blocking clients produce false negatives |
| **Click tracking** | Rewrites URLs through SendGrid's redirect | Can trigger spam filters on some domains |
| **Subscription tracking** | Adds unsubscribe footer | Required for CAN-SPAM compliance |
| **Google Analytics** | Adds UTM parameters | Only for marketing campaigns |
Configure per-message or account-wide in Console > Settings > Tracking.
---
## Link Branding (Custom Tracking Domains)
By default, click-tracked links route through `url####.ct.sendgrid.net`. Link Branding lets you use your own domain (e.g., `links.yourdomain.com`) instead, which improves deliverability and builds trust.
**Setup:** Console > Settings > Sender Authentication > Link Branding
Requires a CNAME DNS record pointing your subdomain to `sendgrid.net`. Validate via API: `GET /v3/whitelabel/links/{id}/validate`
---
## Content Type Priority
When sending multiple content types, email clients display in this priority:
1. `text/x-amp-html` (AMP — only in supporting clients, requires sender registration)
2. `text/html` (standard — most clients)
3. `text/plain` (fallback)
Always include at least `text/plain` and `text/html`.
---
## CANNOT
- **Cannot use custom Handlebars helpers** — Only the built-in set listed above.
- **Cannot guarantee open tracking accuracy** — Pixel-based tracking is fundamentally unreliable. Do not use for business-critical logic.
- **Personalizations `subject` is a plain string override** — It bypasses the template subject. To use dynamic subjects, set Handlebars variables (e.g., `{{{subject}}}`) in the Dynamic Template's subject field and pass values via `dynamic_template_data`.
- **Undefined template variables are silent** — Missing keys in `dynamic_template_data` render as empty strings with no error.
---
## Next Steps
- **Send email:** `twilio-sendgrid-email-send`
- **Delivery tracking:** `twilio-sendgrid-webhooks`
- **Manage bounces/unsubscribes:** `twilio-sendgrid-suppressions`
© Twilio · MIT · openai/plugins