Tooluck logoTooluck
SKILL.md

verify-email-snapshots

Agent skill fromAaronontheweb/dotnet-skills

Snapshot test email templates using Verify to catch regressions. Validates rendered HTML output matches approved baseline. Works with MJML templates and any email renderer.

How to install verify-email-snapshots

install verify-email-snapshots
# install the dotnet-skills pack with the skills CLI
npx skills add Aaronontheweb/dotnet-skills

# or add only this skill to Claude Code: copy the folder

skills/verify-email-snapshots/

# into

~/.claude/skills/verify-email-snapshots/ (all projects)

.claude/skills/verify-email-snapshots/ (one project)

skills/verify-email-snapshots/SKILL.md

MITFull file
1# Snapshot Testing Email Templates with Verify
2
3## When to Use This Skill
4
5Use this skill when:
6- Testing email template rendering for regressions
7- Validating MJML templates compile to expected HTML
8- Reviewing email changes in code review (diffs are visual)
9- Ensuring variable substitution works correctly
10
11**Related skills:**
12- `aspnetcore/mjml-email-templates` - MJML template authoring
13- `aspire/mailpit-integration` - Test email delivery locally
14- `testing/snapshot-testing` - General Verify patterns
15
16---
17
18## Why Snapshot Test Emails?
19
20Email templates are:
211. **Visual** - Small changes can break rendering across clients
222. **Hard to unit test** - Output is complex HTML, not simple values
233. **Prone to regression** - Template changes can have unintended effects
24
25Snapshot testing captures the rendered HTML and fails when it changes unexpectedly.
26
27---
28
29## Installation
30
31```bash
32dotnet add package Verify.Xunit # or Verify.NUnit, Verify.MSTest
33```
34
35---
36
37## Basic Email Snapshot Test
38
39```csharp
40[Fact]
41public async Task UserSignupInvitation_RendersCorrectly()
42{
43 // Arrange
44 var renderer = _services.GetRequiredService<IMjmlTemplateRenderer>();
45
46 var variables = new Dictionary<string, string>
47 {
48 { "PreviewText", "You've been invited to join Acme Corp" },
49 { "OrganizationName", "Acme Corporation" },
50 { "InviteeName", "John Doe" },
51 { "InviterName", "Jane Admin" },
52 { "InvitationLink", "https://example.com/invite/abc123" },
53…

Excerpt shown under the repository's MIT license.

More skills in dotnet-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates