templates
Programmatically manage Resend email templates, covering the lifecycle from creation to publishing.
Install
mkdir -p .claude/skills/templates-stier-ai && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17801" && unzip -o skill.zip -d .claude/skills/templates-stier-ai && rm skill.zipInstalls to .claude/skills/templates-stier-ai
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when creating, updating, publishing, deleting, or listing Resend email templates via the API, or when defining template variables, understanding draft vs published state, or managing template lifecycle programmatically.Key capabilities
- →Creates new email templates on Resend
- →Retrieves existing email templates by ID
- →Lists all available email templates
- →Updates existing email templates
- →Deletes email templates
- →Publishes draft email templates
How it works
The skill interacts with the Resend API to manage the lifecycle of email templates, allowing creation, updating, publishing, and deletion.
Inputs & outputs
When to use templates
- →Creating a new email template
- →Updating existing template HTML
- →Publishing a draft template
- →Listing all available templates
About this skill
Resend Templates
Overview
Templates are reusable email structures stored on Resend. Define HTML and variables once; reference the template ID or alias when sending.
Use templates when: the same structure is reused across many sends, non-engineers need to edit copy without touching code, or you want version history.
Use inline html when: the structure changes per send, you need more than 50 dynamic variables, or you want tighter rendering control.
Template Lifecycle
Create (draft) → Publish → Send
↑ edit |
└─────────────────────┘
Editing a published template creates a new draft — the published version keeps sending until you publish again.
| State | Can send? |
|---|---|
| Draft | No |
| Published | Yes |
SDK Methods (Node.js)
| Operation | Method |
|---|---|
| Create | resend.templates.create(params) |
| Get | resend.templates.get(id) |
| List | resend.templates.list(params) |
| Update | resend.templates.update(id, params) |
| Delete | resend.templates.remove(id) ← not .delete() |
| Publish | resend.templates.publish(id) |
| Duplicate | resend.templates.duplicate(id) |
Chainable Create → Publish
The SDK supports chaining .publish() after .create() or .duplicate():
const { data, error } = await resend.templates.create({
name: 'Welcome',
html: '<p>Hi {{{NAME}}}</p>',
}).publish();
// Template is created AND published in one call
Aliases
An alias is a stable, human-readable slug you set at create time. Pass it in the id field anywhere you'd use the auto-generated template ID.
// Set alias at create time
await resend.templates.create({
name: 'Order Confirmation', // display-only
alias: 'order-confirmation', // referenceable slug
html: '<p>Hi {{{CUSTOMER_NAME}}}</p>',
});
// Reference by alias — no need to store the generated tmpl_ ID
template: { id: 'order-confirmation', variables: { CUSTOMER_NAME: 'Alice' } }
Variable Syntax
Use triple mustache in HTML and subject: {{{VARIABLE_NAME}}}
<!-- ✅ Correct -->
<p>Hi {{{CUSTOMER_NAME}}}, your order #{{{ORDER_ID}}} has shipped!</p>
<!-- ❌ Wrong — double braces don't render in Resend -->
<p>Hi {{CUSTOMER_NAME}}</p>
Plain substitution only — no {{#each}}, {{#if}}, or other Handlebars control flow. Pre-render dynamic lists server-side into a single HTML variable.
Variable key casing is arbitrary (ORDER_ID, orderId, order_id all work) but must be consistent: whatever casing you use in the template definition must match exactly in the send call.
Sending with a Template
const { data, error } = await resend.emails.send(
{
from: 'Acme <[email protected]>',
to: ['[email protected]'],
template: {
id: 'order-confirmation', // alias or auto-generated ID
variables: { CUSTOMER_NAME: 'Alice', ORDER_ID: '12345' },
},
},
{ idempotencyKey: `order-confirm/${orderId}` }
);
Cannot combine template with html, text, or react — mutually exclusive. subject and from from the template can be overridden per-send.
For variable constraints, reserved names, full CRUD examples, pagination, and version history, see reference.md.
When not to use it
- →When the email structure changes per send
- →When more than 50 dynamic variables are needed
- →When tighter rendering control is required
Limitations
- →Cannot combine `template` with `html`, `text`, or `react` when sending
- →Uses plain substitution for variables; no control flow
- →Variable key casing must be consistent between definition and send call
How it compares
This skill provides programmatic control over Resend email templates, including draft/published states and variable management, unlike manual template creation.
Compared to similar skills
templates side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| templates (this skill) | 0 | 4mo | No flags | Intermediate |
| emailable-automation | 0 | 2mo | No flags | Intermediate |
| mcp-builder | 136 | 3mo | Review | Advanced |
| telegram-bot-builder | 106 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
emailable-automation
onfire7777
Automate Emailable tasks via Rube MCP (Composio). Always search tools first for current schemas.
mcp-builder
anthropics
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
telegram-bot-builder
davila7
Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.
telegram-mini-app
davila7
Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.
stripe-integration
wshobson
Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.
n8n-expression-syntax
czlonkowski
Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.