This skill should be used when the user asks to "create an email", "build an email campaign", "design an email template", "generate an email for a segment", "preview an email", or "push an email to Engage". Generates enterprise-grade HTML email templates with live preview in Treasure Studio and natural language editing, then pushes the final version to Treasure Engage.
67
81%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
This skill produces channel-ready HTML email campaigns for defined audience segments. It generates strategy briefs, renders live previews in the Treasure Studio artifact panel, supports iterative natural language editing, and pushes finalized emails to Treasure Engage via a TD Workflow.
Use this skill when:
This skill requires:
tdx-studio) — for email preview via preview_documentengage_email_builder TD Workflow — for automated push to EngageIf Studio preview is unavailable, emails will be saved to disk only. If the Engage workflow is not deployed, the skill falls back to manual HTML export.
Always produce a strategy brief before writing any HTML. Analyze the audience segment, determine the right message and offer, then generate the email.
Example brief output:
Segment: Gold Tier — High Intent
Audience: 2,400 active members, 85% email open rate
Message: Urgency — "Your exclusive early access expires Friday"
Offer: No discount (high-intent segment). Use exclusivity + scarcity.
Imagery: Premium lifestyle, curated product selectionNot every segment should receive a discount. Match the offer strategy to the audience profile.
| Segment Profile | Offer Strategy |
|---|---|
| Low/medium-conversion, bronze/silver, inactive >30 days | Discount or incentive |
| Gold/platinum, high intent, active | Urgency, exclusivity, or social proof |
| New members, unknown intent | Welcome series, value education |
All HTML must render correctly across Outlook, Gmail, Apple Mail, and Yahoo Mail. This means:
<div> for structure<style> blocks (Gmail strips them)role="presentation" on all layout tablescellspacing="0" cellpadding="0" on all tablesSee references/email-design-patterns.md for complete HTML patterns.
Use Liquid syntax for all dynamic content. Merge tags render as literal text in preview and are replaced at send time by Treasure Engage.
Available merge tags:
{{profile.first_name}} — customer first name{{profile.loyalty_points}} — current points balance{{profile.tier_name}} — loyalty tier (Bronze, Silver, Gold, Platinum){{profile.points_to_next_tier}} — points needed for next tierNote: These merge tags assume a parent segment with the following output columns:
first_name (STRING)loyalty_points (INTEGER)tier_name (STRING)points_to_next_tier (INTEGER)Verify your parent segment includes these fields before using merge tags. To list available fields: tdx ps desc <ps_id> -o
The skill follows a four-phase loop: Generate → Preview → Edit → Ship.
When the user requests an email campaign, produce a strategy brief first:
references/email-design-patterns.md. Use BeeFree-compatible, responsive table-based layout with inline CSS./tmp/email_campaign_preview.html.Note: /tmp is a temporary location cleared on system restart. Use "push to Engage" or manually export to a permanent location (e.g., ~/email_exports/) before rebooting.
After generating the HTML, render it in the Treasure Studio artifact panel:
preview_document(path="/tmp/email_campaign_preview.html")Tell the user: "Here's the email preview. Describe any changes you'd like, or say push to Engage when you're ready."
When the user requests changes:
/tmp/email_campaign_preview.html./tmp/email_campaign_preview.html.preview_document.Keep a running list of merge tags used in the email (e.g., {{profile.first_name}}, {{profile.loyalty_points}}). Display these after each preview so the user knows what personalization is active.
When the user says "push to Engage", "ship it", "publish", or "send to Engage":
/tmp/email_campaign_preview.html.references/engage-integration.md for the exact command and parameters.Target gold-tier members close to platinum with urgency and exclusivity.
<h1>{{profile.first_name}}, you're almost there.</h1>
<p>You're just <strong>{{profile.points_to_next_tier}} points</strong> away
from unlocking <strong>Platinum</strong> tier.</p>When to use: Members within 20% of the next tier threshold who have been active in the last 30 days.
Re-engage inactive members with a compelling offer.
<h1>We miss you, {{profile.first_name}}.</h1>
<p>It's been a while — and we've been saving something special for your return.</p>When to use: Members with no purchase activity in 30+ days, bronze or silver tier.
Generate two distinct variants for testing copy or CTA effectiveness.
/tmp/email_campaign_variant_a.html and /tmp/email_campaign_variant_b.html.preview_document.When to use: The user explicitly requests A/B testing or you recommend it for campaigns targeting >5,000 recipients.
<style> blocks.preview_document.Symptoms:
Solutions:
<table> elements, not <div>.background → use background-color).mso- conditional comments for Outlook-specific fixes if needed.<style> blocks.Symptoms:
{{profile.first_name}} instead of their actual nameSolutions:
first_name, not firstName).{{profile.field_name}}.engage_email_builder workflow not foundSymptoms:
tdx wf workflows engage_email_builder returns no resultsSolutions:
~/email_exports/campaign_name_YYYY-MM-DD.html.Example:
# Fallback: manual export
cp /tmp/email_campaign_preview.html ~/email_exports/campaign_name_2025-01-15.htmlSymptoms:
Solutions:
?auto=format&fit=crop&w=1200&q=80 query parameters are present.Symptoms:
Solutions:
https://images.unsplash.com/photo-{photo_id}?auto=format&fit=crop&w=1200&q=80engage_email_builder TD Workflow used to push emails to Engage.79bb9b8
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.