designing-email-templates
Skill này làm gì
Skill này cho phép agent thiết kế mẫu email trong thư viện workflow của PostHog. Skill dành cho người làm marketing và đội sản phẩm muốn các email được làm tốt, hiển thị thông tin cá nhân của từng người đọc.
Khi nào nên dùng
- ✓Khi bạn muốn một mẫu email mới cho một chiến dịch hoặc workflow.
- ✓Khi bạn muốn chỉnh sửa hoặc sửa một mẫu email hiện có trong PostHog.
- ✓Khi bạn muốn thông tin cá nhân, chẳng hạn tên, xuất hiện trong email.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/workflows/skills/designing-email-templates/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy thiết kế một mẫu email chào mừng cho người dùng mới, với logo của tôi ở đầu và tên của họ trong lời chào.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent viết thiết kế của mẫu theo định dạng có cấu trúc để PostHog chuyển thành một email có thể chỉnh sửa. Nó dùng placeholder Liquid cho thông tin cá nhân và chia sẻ một liên kết để bạn mở mẫu trong PostHog.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Tôi có thể chỉnh sửa mẫu sau khi agent tạo không?
Có. Mẫu mở ra dưới dạng các khối có thể chỉnh sửa trong PostHog, nên người dùng có thể thay đổi ở đó.
Thẻ Liquid là gì?
Chúng là placeholder, như tên, được điền bằng thông tin của từng người đọc khi email được gửi.
Agent có chọn phong cách thiết kế không?
Có. Hướng dẫn của nó yêu cầu chọn một hướng thiết kế rõ ràng trước khi viết bố cục, để email trông có chủ đích.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6981
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
depot-ci
41kGiúp agent của bạn thiết lập và chạy quy trình Depot CI, một lựa chọn thay thế GitHub Actions, gồm chuyển các quy trình hiện có và đọc nhật ký chạy.
depot-container-builds
41kGiúp agent của bạn build image Docker trên các builder từ xa của Depot, gồm image đa nền tảng, đẩy lên registry và sửa lỗi build.
depot-github-runners
41kGiúp agent của bạn chuyển các job GitHub Actions sang runner do Depot quản lý, chọn kích thước và nhãn runner, và xử lý lỗi thiết lập runner.
editing-agents-md
41kGiúp agent của bạn quyết định một quy tắc nên nằm trong file AGENTS.md hay CLAUDE.md, và viết sao cho quy tắc được tuân thủ mà file không bị phình to.
Skill tương tự
product-lens
280kGiúp agent của bạn kiểm chứng ý tưởng sản phẩm trước khi xây dựng. Phân tích mức độ phù hợp với thị trường và trải nghiệm người dùng để quyết định có nên tiếp tục.
investor-outreach
280kGiúp agent viết email gửi nhà đầu tư. Tạo tin nhắn cá nhân hóa để đề nghị đầu tư hoặc gửi cập nhật.
release-announcement
103kGiúp agent viết thông báo ra mắt. Tập trung vào tác động đối với người dùng và cách dùng các tính năng mới.