designing-email-templates
Что он делает
Этот скилл позволяет агенту создавать шаблоны писем в библиотеке процессов PostHog. Он нужен маркетологам и продуктовым командам, которые хотят делать хорошо оформленные письма с персональными данными каждого получателя.
Когда использовать
- ✓Когда вам нужен новый шаблон письма для кампании или процесса.
- ✓Когда вы хотите отредактировать или исправить существующий шаблон письма в PostHog.
- ✓Когда вы хотите, чтобы в письме появлялись персональные данные, например имя.
Ссылка на скилл
https://github.com/PostHog/posthog/blob/master/products/workflows/skills/designing-email-templates/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Создай шаблон приветственного письма для новых пользователей, с моим логотипом вверху и их именем в приветствии.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент описывает дизайн шаблона в структурированном формате, который PostHog превращает в редактируемое письмо. Для персональных данных он использует плейсхолдеры Liquid и делится ссылкой, по которой вы откроете шаблон в PostHog.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
Designing email templates
Use this skill when creating or editing email templates for PostHog workflows — broadcast campaigns and function_email workflow actions send the rendered template.
How authoring works
You author the design JSON (content.email.design) and save it with workflows-create-email-template. The server renders the sent email from your design with the same renderer PostHog's visual editor uses, so the template opens as editable blocks for humans and sends exactly what the design describes. Schema, the native blocks and spacing rules every email follows, and a working example in references/unlayer-design-json.md.
When talking to the user, call it the template's design — the design document format is an internal implementation detail. Always share the template's _posthogUrl edit link in your reply after creating or updating, so the user can open it in PostHog directly.
Read references/design-guidelines.md before composing — it covers committing to a design direction, typography, color, and the patterns that make an email look designed rather than generated. For one fragment the block editor can't express, use an html-type content block inside the design.
Personalization with Liquid
Email content uses Liquid templating. Liquid tags pass through the renderer as plain text, so use them anywhere — block text, subject, links:
Hi {{ person.properties.first_name | default: 'there' }},
Marketing emails must include an unsubscribe link — render it with the built-in variables:
<a href="{{ unsubscribe_url }}">Unsubscribe</a>
({{ unsubscribe_url_one_click }} is also available for one-click list-unsubscribe flows.)
A template written for Customer.io can keep its {% unsubscribe_url %} tag, which renders the same link as {{ unsubscribe_url }}.
Output is HTML-escaped by default, so a value renders as text even when it contains markup:
- Don't add
| escape. It escapes a second time, and&reaches the inbox as&amp;. - For HTML your own backend builds, such as a summary list, add
| raw:{{ variables.summary_html | raw }}. Never userawon text a person typed. - Format money with
currency:{{ variables.amount | currency: "USD" }}renders$1,234.50. A value that isn't a number renders unchanged.
Click tracking and opt-out
Every link is automatically rewritten through a click-tracking redirect. This breaks mobile universal links / app deeplinks, which only resolve when the href stays on their own domain. To keep a link untracked, mark its anchor (use an html block) with clicktracking="off" or data-ph-no-track:
<a href="https://app.example.com/deeplink" data-ph-no-track>Open in app</a>
The marker must be on the <a> tag itself, not a child element. Opted-out links get no click metrics.
Images
Call media-images-list with purpose="email" first — reuse an existing image (a logo, a header banner) instead of uploading a duplicate.
To add a new image, upload it with the presigned flow rather than embedding bytes in the design:
media-image-upload-startwith the file's name andpurpose="email"— returnsid,upload_url, andform_fields.- From a shell, POST the local file to
upload_url:curl -X POST <upload_url> -F key=value... -F file=@/path/to/image.png(theform_fieldsfrom the response,filelast). Never base64-encode image bytes into a tool call — a flipped token corrupts the image. media-image-upload-completewith theid— returns the permanenturl.
Put that url in the image block's values.src.url (see references/unlayer-design-json.md). The block also takes values.src.width/height; the media tools don't return dimensions, so if you have shell access to the local file, measure it yourself rather than guessing.
Images must be under 4MB and decode as PNG, JPEG, GIF, WebP, AVIF or BMP.
Creating a template
Call workflows-create-email-template with:
{
"name": "Welcome email",
"description": "Sent to new signups on day 0",
"type": "email",
"content": {
"templating": "liquid",
"email": {
"subject": "Welcome to {{ person.properties.company | default: 'our product' }}",
"design": {
"counters": { "u_row": 1 },
"schemaVersion": 16,
"body": { "rows": ["…"], "values": { "preheaderText": "Three short
Частые вопросы
Могу ли я редактировать шаблон после того, как агент его создал?
Да. Шаблон открывается в PostHog как редактируемые блоки, их можно менять прямо там.
Что такое теги Liquid?
Это плейсхолдеры, например имя, которые при отправке заполняются данными каждого получателя.
Агент сам выбирает стиль дизайна?
Да. Его инструкции требуют выбрать четкое направление дизайна перед тем, как писать макет, чтобы письмо выглядело продуманно.
Подробности
Оригинальное описание автора
Author, save, and edit email templates in the PostHog workflows library — compose email design JSON with Liquid personalization and create and round-trip-edit templates over MCP. Use when asked to design, build, update, or fix an email template for workflows, broadcasts, or campaigns.
repo: PostHog/posthog
Популярность
- Звёзды на GitHub
- 41k
- Место в рейтинге
- #6981
- Лицензия
- —
- Обновлён
- 02.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
depot-ci
41kПомогает агенту настроить и запускать workflow в Depot CI, альтернативе GitHub Actions, включая перенос существующих workflow и чтение логов запусков.
depot-container-builds
41kПомогает агенту собирать Docker-образы на удалённых сборщиках Depot, включая мультиплатформенные образы, отправку в реестры и исправление ошибок сборки.
depot-github-runners
41kПомогает агенту переносить задачи GitHub Actions на раннеры Depot: выбирать размер и метки раннера и устранять проблемы настройки.
editing-agents-md
41kПомогает агенту решить, нужно ли правило в файле AGENTS.md или CLAUDE.md, и записать его так, чтобы оно работало, не раздувая файл.
Похожие скиллы
product-lens
280kПомогает агенту проверить идею продукта до разработки: анализирует соответствие рынку и опыт пользователей, чтобы решить, стоит ли продолжать.
investor-outreach
280kПомогает агенту писать письма инвесторам: персональные сообщения с запросом инвестиций или новостями.
release-announcement
103kПомогает агенту писать анонсы запусков с упором на пользу для пользователей и то, как пользоваться новым.