Best for
- The user asks to "create an email", "build an email campaign", or "design an email template"
- The user wants to "generate an email for a segment" based on audience data
- The user requests a "preview" of an email in Treasure Studio
treasure-data/td-skills/email-campaign-skills/email-campaign/SKILL.md
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.
Decision brief
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 W…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/treasure-data/td-skills --skill "email-campaign-skills/email-campaign"Inspect the Agent Skill "email-campaign" from https://github.com/treasure-data/td-skills/blob/ff381378c99b4baa952610f6ccd5e31c41041e4d/email-campaign-skills/email-campaign/SKILL.md at commit ff381378c99b4baa952610f6ccd5e31c41041e4d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
The skill follows a four-phase loop: Generate → Preview → Edit → Ship.
When the user requests an email campaign, produce a strategy brief first:
After generating the HTML, render it in the Treasure Studio artifact panel:
When the user requests changes:
When the user says "push to Engage", "ship it", "publish", or "send to Engage":
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 93/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 21 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
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 selection
Not 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.html
Symptoms:
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.Frequently asked questions
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 W…
The source record exposes this install command: npx skills add https://github.com/treasure-data/td-skills --skill "email-campaign-skills/email-campaign". Inspect the command and pinned source before running it.
Alternatives
novoads/agent-skills
Generate high-CTR YouTube thumbnails using Nano Banana Pro via the Novoads API. Handles reference image upload, character likeness alignment, proven CTR-tested prompt formulas, and bounded batch generation. Use when the user asks to create a YouTube thumbnail, video thumbnail, A/B test thumbnail variations, or refers to thumbnail design with their face, brand assets, or product photos.
bytedance/agentkit-samples
Launch and continue the Volcengine AI Research survey workflow for concept testing, audience design, questionnaire drafting, interview guide generation, execution confirmation, progress checks, and result queries. Use this skill when the user wants to create, revise, confirm, execute, or follow up on a real AI research survey task in ABCompass instead of doing generic brainstorming, copywriting, translation, summarization, or broad market discussion.
rampstackco/claude-skills
Run QA testing on a page, feature, or full site at one of three depth tiers (smoke, standard, full). Use this skill whenever the user asks to QA a page or site, run a smoke test after a deploy, verify a page before launch, or run a regression sweep. Triggers on QA, QA sweep, smoke test, regression test, post-deploy check, pre-launch check, verify the deploy, test this page, does the page render, broken link, 404, image not loading. Also triggers proactively after a deploy or a new page launch wh
bestdeejay-design/agent-skills
Audit and polish frontend (static HTML/CSS/JS or built SPA) to measurable perfection: real-Chrome Lighthouse >=13 runs (mobile+desktop, no Playwright internals), SEO meta layer, WCAG contrast by computed luminance, heading order, a11y checks (axe-core subset: img-alt/button-name/link-name/label/aria-valid/landmark-unique), back-to-top navigation check, design tokens (zero raw hex outside tokens), adaptive checks, and OG-image generation with a crop-safe layout. Front-End Checklist-inspired check