Source profileQuality 93/100

treasure-data/td-skills/email-campaign-skills/email-campaign/SKILL.md

email-campaign

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.

Source repository stars
21
Declared platforms
0
Static risk flags
0
Last source update
2026-08-24
Source checked
2026-08-25

Decision brief

What it does: where it fits

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…

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

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/treasure-data/td-skills --skill "email-campaign-skills/email-campaign"
Safe inspection promptEditorial

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

What the source asks the agent to do

  1. 01

    Workflow

    The skill follows a four-phase loop: Generate → Preview → Edit → Ship.

    Segment analysis — identify the audience by loyalty tier, conversion likelihood, and behavioral traits.Strategy brief — output a concise brief with: segment name, audience profile, next best channel, message copy, next best offer, and recommended imagery direction.HTML email — generate a complete, standalone HTML email following the design patterns in references/email-design-patterns.md. Use BeeFree-compatible, responsive table-based layout with inline CSS.
  2. 02

    Phase 1: Generate

    When the user requests an email campaign, produce a strategy brief first:

    Segment analysis — identify the audience by loyalty tier, conversion likelihood, and behavioral traits.Strategy brief — output a concise brief with: segment name, audience profile, next best channel, message copy, next best offer, and recommended imagery direction.HTML email — generate a complete, standalone HTML email following the design patterns in references/email-design-patterns.md. Use BeeFree-compatible, responsive table-based layout with inline CSS.
  3. 03

    Phase 2: Preview

    After generating the HTML, render it in the Treasure Studio artifact panel:

    After generating the HTML, render it in the Treasure Studio artifact panel:Tell the user: "Here's the email preview. Describe any changes you'd like, or say push to Engage when you're ready."
  4. 04

    Phase 3: Edit (iterative)

    When the user requests changes:

    Read the current HTML from /tmp/emailcampaignpreview.html.Apply the requested modifications (copy changes, color updates, image swaps, layout adjustments, CTA rewording, etc.).Write the updated HTML back to /tmp/emailcampaignpreview.html.
  5. 05

    Phase 4: Ship to Engage

    When the user says "push to Engage", "ship it", "publish", or "send to Engage":

    Read the final HTML from /tmp/emailcampaignpreview.html.Run the Engage email builder workflow. Refer to references/engage-integration.md for the exact command and parameters.Report the result and direct the user to check Engage Studio → Email Templates to see the new template.

Permission review

Static risk signals and limitations

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

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars21SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
treasure-data/td-skills
Skill path
email-campaign-skills/email-campaign/SKILL.md
Commit
ff381378c99b4baa952610f6ccd5e31c41041e4d
License
Not declared
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Email Campaign Builder

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.

When to Use This Skill

Use this skill when:

  • 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
  • The user says "push to Engage", "ship it", or "send to Engage" to publish a finalized email
  • The user needs A/B testing variants for an email campaign

Prerequisites

This skill requires:

  • Treasure Studio MCP server (tdx-studio) — for email preview via preview_document
  • tdx CLI — for workflow execution and Engage integration
  • (Optional) engage_email_builder TD Workflow — for automated push to Engage

If 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.

Core Principles

1. Strategy Before Design

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

2. Offer Logic Is Segment-Driven

Not every segment should receive a discount. Match the offer strategy to the audience profile.

Segment ProfileOffer Strategy
Low/medium-conversion, bronze/silver, inactive >30 daysDiscount or incentive
Gold/platinum, high intent, activeUrgency, exclusivity, or social proof
New members, unknown intentWelcome series, value education

3. Email Client Compatibility First

All HTML must render correctly across Outlook, Gmail, Apple Mail, and Yahoo Mail. This means:

  • Table-based layout only — no <div> for structure
  • All CSS inline — no <style> blocks (Gmail strips them)
  • role="presentation" on all layout tables
  • Max width 600px for the content area
  • cellspacing="0" cellpadding="0" on all tables

See references/email-design-patterns.md for complete HTML patterns.

4. Personalization via Merge Tags

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 tier

Note: 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

Workflow

The skill follows a four-phase loop: Generate → Preview → Edit → Ship.

Phase 1: Generate

When the user requests an email campaign, produce a strategy brief first:

  1. Segment analysis — identify the audience by loyalty tier, conversion likelihood, and behavioral traits.
  2. Strategy brief — output a concise brief with: segment name, audience profile, next best channel, message copy, next best offer, and recommended imagery direction.
  3. HTML email — generate a complete, standalone HTML email following the design patterns in references/email-design-patterns.md. Use BeeFree-compatible, responsive table-based layout with inline CSS.
  4. Save to disk — write the HTML to /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.

Phase 2: Preview

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."

Phase 3: Edit (iterative)

When the user requests changes:

  1. Read the current HTML from /tmp/email_campaign_preview.html.
  2. Apply the requested modifications (copy changes, color updates, image swaps, layout adjustments, CTA rewording, etc.).
  3. Write the updated HTML back to /tmp/email_campaign_preview.html.
  4. Re-render the preview with preview_document.
  5. Repeat until the user approves.

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.

Phase 4: Ship to Engage

When the user says "push to Engage", "ship it", "publish", or "send to Engage":

  1. Read the final HTML from /tmp/email_campaign_preview.html.
  2. Run the Engage email builder workflow. Refer to references/engage-integration.md for the exact command and parameters.
  3. Report the result and direct the user to check Engage Studio → Email Templates to see the new template.

Common Patterns

Pattern 1: Tier Advancement Campaign

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.

Pattern 2: Win-Back Campaign

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.

Pattern 3: A/B Testing Variants

Generate two distinct variants for testing copy or CTA effectiveness.

  1. Generate Variant A and Variant B with distinct copy or CTA changes.
  2. Save each to separate files: /tmp/email_campaign_variant_a.html and /tmp/email_campaign_variant_b.html.
  3. Preview each in sequence using preview_document.
  4. When shipping, push each variant as a separate template:
    • First push: template named "Campaign Name — Variant A"
    • Second push: template named "Campaign Name — Variant B"
  5. Then configure the A/B test in Engage Studio UI.

When to use: The user explicitly requests A/B testing or you recommend it for campaigns targeting >5,000 recipients.

Best Practices

  1. Strategy first — Always generate a strategy brief before writing HTML. Never skip audience analysis.
  2. No discounts for high-intent segments — Use urgency, exclusivity, or social proof for gold/platinum or active users.
  3. Standalone HTML only — No external stylesheets, no JavaScript, no <style> blocks.
  4. HTTPS imagery only — Use Unsplash or Pexels. Never use AI-generated images.
  5. Accessible by default — Include descriptive ALT text on all images.
  6. Footer in every email — Always include unsubscribe link and preference center link.
  7. Professional tone — No emojis or conversational phrasing in the email content.
  8. Track merge tags — Display the list of active merge tags after each preview cycle.
  9. Test across clients — Design for Outlook, Gmail, Apple Mail, and Yahoo Mail compatibility.
  10. Save before preview — Always write HTML to disk before calling preview_document.

Email Size Limits

  • Subject line: Keep under 50 characters for mobile display
  • Preheader text: 40–90 characters (appears after subject in inbox)
  • Total HTML size: Under 100KB for best deliverability
  • Image file size: Under 1MB per image

Common Issues and Solutions

Issue: Email renders incorrectly in Outlook

Symptoms:

  • Layout breaks, columns misaligned, or background colors missing in Outlook

Solutions:

  1. Ensure all layout uses <table> elements, not <div>.
  2. Avoid CSS shorthand (background → use background-color).
  3. Add mso- conditional comments for Outlook-specific fixes if needed.
  4. Keep all CSS inline — Outlook strips <style> blocks.

Issue: Merge tags appear as literal text in sent emails

Symptoms:

  • Recipients see {{profile.first_name}} instead of their actual name

Solutions:

  1. Verify the Engage template is configured for Liquid rendering.
  2. Confirm field names match the CDP parent segment output schema (e.g., first_name, not firstName).
  3. Check that the merge tag syntax uses double curly braces: {{profile.field_name}}.

Issue: engage_email_builder workflow not found

Symptoms:

  • tdx wf workflows engage_email_builder returns no results

Solutions:

  1. The workflow hasn't been deployed to this account yet.
  2. Offer to export the HTML file so the user can paste it into Engage Studio manually.
  3. Save the final HTML to ~/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

Issue: Images not loading in preview

Symptoms:

  • Broken image icons in the Treasure Studio preview panel

Solutions:

  1. Verify image URLs use HTTPS (not HTTP).
  2. Confirm the Unsplash/Pexels photo ID is valid.
  3. Check the ?auto=format&fit=crop&w=1200&q=80 query parameters are present.

Issue: Image URLs broken or outdated

Symptoms:

  • Images that previously worked now return 404 errors
  • Unsplash/Pexels removed the original photo

Solutions:

  1. Search for a replacement image on Unsplash or Pexels with a similar subject.
  2. Use the standard photo ID format: https://images.unsplash.com/photo-{photo_id}?auto=format&fit=crop&w=1200&q=80
  3. Verify the new image loads in a browser before updating the email.
  4. For production campaigns, consider uploading images to your own CDN or asset storage for permanence.

Related Skills

  • tdx-skills:segment — Create and manage the CDP audience segments that feed into email campaigns.
  • tdx-skills:parent-segment — Define master customer tables with the attributes and behaviors used for merge tags.
  • tdx-skills:parent-segment-analysis — Query parent segment data to understand audience profiles before generating campaigns.
  • tdx-skills:connector-config — Configure Engage activations for segment-triggered email sends.
  • workflow-skills:workflow — Manage the engage_email_builder TD Workflow used to push emails to Engage.

Resources

Frequently asked questions

What to verify before installation and use

What does the email-campaign source document cover?

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…

How do I install email-campaign?

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

Compare before choosing

Computed 939

novoads/agent-skills

generate-youtube-thumbnail

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.

Computed 92433

bytedance/agentkit-samples

byted-airesearch-survey

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.

Computed 91733

rampstackco/claude-skills

qa-testing

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

Computed 915

bestdeejay-design/agent-skills

frontend-perfection

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