add-email-template
Skill1 starsChanged 5 months agoMITView on GitHub
Generate a new transactional email (React Email component) and wire its send call into the right trigger point. Use when the user asks for a new transactional/notification email (e.g. "add an email when an invoice is overdue", "send a password-changed notification").
1 other project uses a version of this.
Adopted by
Most recently taken up by
- fpindej/netrocktheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- fpindej/netrock★ 234same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-crud-featureSkill
- add-dashboard-pageSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Add a send<Name>Email({...}) function to src/lib/email.ts: guard on resend being configured (same
- Very specific: line 28
Never send email directly with the Resend SDK from a route/action — always go through a named function in lib/email.ts.
- Very specific: line 29
Keep templates self-contained (no shared layout component yet) — if asked to add a third+ template that shares structure, propose …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
add-email-template
Creates a React Email template and registers a typed sender function, then asks for (or infers) where it should be triggered. Read AGENTS.md for project-wide conventions.
Reference files (read these before generating anything)
src/emails/welcome-email.tsx— canonical template structure (Html/Head/Preview/Body/Container/Heading/Textfrom@react-email/components, inline styles, typed props interface, default export).src/emails/subscription-confirmation-email.tsx— second example, shows multiple props.src/lib/email.ts— the single place that owns the Resend client and exposes onesend<X>Email()function per template. Every template must have a corresponding function here, not be sent ad hoc from call sites.src/lib/auth.ts(databaseHooks.user.create.after) — example of a trigger point callingsendWelcomeEmail(...)after a DB write.src/app/api/stripe/webhook/route.ts(notifyOrganizationOwner) — example of a trigger point inside a webhook handler.
Steps
- Name the template in PascalCase ending in
Email(e.g.InvoiceOverdueEmail) and the file in kebab-case (e.g.invoice-overdue-email.tsx) undersrc/emails/. - Build the component following the exact structure of
welcome-email.tsx: typed props interface,Html/Head/Preview/Body/Containerwrapper, plain inlinestyleobjects (no Tailwind — React Email clients don't reliably support it), default export. - Add a
send<Name>Email({...})function tosrc/lib/email.ts: guard onresendbeing configured (sameif (!resend) { console.warn(...); return; }pattern as the existing functions), callresend.emails.send({ from: FROM_ADDRESS, to, subject, react: <Component {...props} /> }). - Determine the trigger point. Ask the user if it's ambiguous; otherwise infer from context (e.g. "after a user is created" →
lib/auth.tshook; "after a Stripe event" → the relevantcaseinapi/stripe/webhook/route.ts; "after a CRUD action" → the relevant server action in that resource'sactions.ts). Insert theawait send<Name>Email(...)call at that exact point, after the triggering DB write succeeds. - State explicitly in your final summary: which file holds the template, which function sends it, and which file/line now triggers it — so the user can verify the wiring at a glance.
Conventions to enforce
- Never send email directly with the Resend SDK from a route/action — always go through a named function in
lib/email.ts. - Keep templates self-contained (no shared layout component yet) — if asked to add a third+ template that shares structure, propose extracting a shared
EmailLayoutrather than copy-pasting, but only after confirming with the user. - Subject lines are set where the email is sent (in
lib/email.ts), not inside the component.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

