Email Sequence Generator
Generates a 5-email marketing sequence with subject lines, preview text, body copy, and CTAs — grounded in actual product features from the codebase.
SKILL.md
---
description: Generate an email marketing sequence grounded in actual product features
allowed-tools: Read, Glob, Grep
---
# Email Sequence Generator
Read the product's codebase to understand its features, then generate a complete email sequence for a specific campaign type.
The campaign type: $ARGUMENTS (e.g., "onboarding", "re-engagement", "feature launch", "trial expiring", "upgrade", "welcome")
## Steps
1. **Understand the product deeply**:
- Read `README.md` for the product overview and value proposition.
- Read `package.json` or equivalent for product name and description.
- Glob for `**/docs/**`, `**/guides/**`, `**/help/**` to find user-facing documentation.
- Grep for feature names, capability descriptions, and benefit statements.
2. **Catalog product features for email content**:
- Glob for route handlers, pages, or commands to list user-facing capabilities.
- Grep for `feature`, `flag`, `enable`, `premium`, `pro` to identify tiered features.
- Grep for integration names to highlight ecosystem value.
- Read onboarding-related code (setup wizards, welcome flows, getting-started guides) if they exist.
3. **Determine the campaign strategy** based on $ARGUMENTS:
- **Onboarding**: Guide new users to their "aha moment" through a sequence of increasingly valuable actions.
- **Re-engagement**: Remind inactive users of value they are missing, highlight new features since they left.
- **Feature launch**: Build anticipation, reveal the feature, show use cases, gather feedback.
- **Trial expiring**: Demonstrate value received, show what they will lose, offer incentive.
- **Upgrade**: Highlight premium features, show ROI, remove friction.
- **Welcome**: Thank them, set expectations, deliver first value quickly.
4. **Generate the 5-email sequence**:
For each email, provide:
**Email [N]: [Purpose]**
- **Send timing**: When to send relative to trigger (e.g., "Day 0", "Day 3", "+2 days after Email 2 if unopened")
- **Subject line**: Primary subject line (under 50 chars) + 2 alternatives for A/B testing
- **Preview text**: The snippet shown in inbox (under 90 chars)
- **Body copy**: Full email body in markdown, including:
- Opening hook (personal, relevant to where they are in the journey)
- Value section (one specific feature or benefit, with concrete detail from the codebase)
- Social proof placeholder: [Insert testimonial or metric here]
- Single clear CTA with button text
- **CTA destination**: Suggest where the CTA should link based on product routes/pages found in code
- **Segment note**: Any conditions for sending (e.g., "only if user has not completed setup")
5. **Generate sequence metadata**:
- Campaign name suggestion
- Goal metric for each email (open rate, click rate, conversion)
- Exit conditions (when to remove someone from the sequence)
- Recommended A/B tests to run
6. **Provide implementation notes**:
- Merge tags to use (`\${first_name}`, `\${product_name}`, `\${days_since_signup}`)
- Suggest behavioral triggers from the code (e.g., "user.created event", "subscription.trial_ending webhook")
- Recommend email platform settings (send time optimization, reply-to address)
## Rules
- Every feature mentioned in an email must exist in the codebase.
- Subject lines must be under 50 characters — no exceptions.
- Each email should have exactly one CTA. Do not dilute with multiple asks.
- The sequence should tell a coherent story — each email builds on the previous one.
- Use a conversational, human tone. These are not press releases.
- Include plain-text versions alongside the formatted copy.
- Mark all placeholder content clearly with [brackets].How It Works
Email marketing is one of the highest-ROI channels, but writing a good sequence requires deep product knowledge. Most email sequences are generic because the marketer writing them does not know every feature and capability the product offers.
This skill solves that by reading the actual codebase to catalog features, then weaving specific product capabilities into each email. Instead of a vague "check out our powerful features," the emails reference real functionality: "You can connect your Slack workspace in Settings > Integrations to get real-time alerts" — because the skill found the Slack integration in the code.
The behavioral trigger suggestions are particularly valuable. By reading the codebase for event tracking patterns, webhook handlers, and user lifecycle code, the skill can recommend exactly which application events should trigger each email. This bridges the gap between the marketing team's email platform and the engineering team's event system.