/app-stack:transactional-emailfrom app-stack
Guides implementing durable transactional email delivery with outbox patterns, idempotent receipts, lease-based sending, and provider error classification. Useful for preventing duplicate or lost app emails.
Ships in app-stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Commit messages durably and name the narrow cases that can duplicate them. A plain "insert, then call the provider" can lose a message or send it twice, depending on where it crashes. This skill covers durable delivery, unsubscribe, environments and domains.
Apply these mechanics to any provider with an HTTP send API. They carry to Resend, SES and others; provider differences are stated with their read dates. The identity provider's own email, such as sign-in codes and invitations, is not covered here: it sends that itself.
Distinguish the event, its messages, their receipts and the sender. An event is what happened: an incident opened, an invoice paid. A message is one email about it to one recipient. A receipt is the durable row saying what became of that message. The sender turns pending receipts into provider calls, wherever it runs.
references/delivery.md § The outbox. The outbox row is unique per event and kind, so a trigger that fires twice still queues one.references/delivery.md § The receiptfor update skip locked, so two senders never claim one. A pass may repeat, overlap another, or be missed and caught up later. Send only well inside the lease, preventing a stalled sender from sending a receipt another has taken over. Mark a receipt only while the claim is still yours. → references/delivery.md § The claimsent, with the id;failed, in your own words, never retried, because sending it again can't help;pending, with backoff, and failed after a fixed number of tries;sending, and nobody knows whether it went. That case is item 5.Idempotency-Key header and keeps it for 24 hours: a retry with the same key and body returns the first answer without sending again (Resend's docs, read 2026-10-25).POST /email is a second email; GET /messages/outbound?metadata_<key>=<receipt id> answers whether it was accepted.sent with that id. Not found: send it. The search itself failing: wait.references/delivery.md § What remainsList-Unsubscribe: <https://…/unsubscribe/<token>> and List-Unsubscribe-Post: List-Unsubscribe=One-Click (RFC 8058). → references/delivery.md § Unsubscribe
POST whose body is List-Unsubscribe=One-Click, answers it directly (RFC 8058 forbids a redirect), and needs no cookie or sign-in, because the token is the authority. A GET to it goes to a page that checks the token, shows what will stop, and asks.[email protected], which accepts and never delivers; Resend: [email protected], which simulates a delivery) sends alerts, confirmations and tests alike there instead of to their recipient. Each receipt records that it was redirected, and the screen says so. The production build, and every production deploy of the sender, refuse a non-empty redirect. A convention alone lets a copied .env send every customer's email to one address. The general rule for development-only switches is environments.TrackOpens: false, TrackLinks: "None"). A later server setting cannot add them. Plain text unless the product needs more. The footer says, in words true for that recipient, why they get the message.p=none with no reporting. It lets anyone spoof the domain, so rank it as a risk and tighten it once mail flows.2026-10-22); the code reports that in plain words rather than failing silently.environments). The redirect is development-only (item 10).supabase-production § A second runtime), and is deployed separately, because a push redeploys only the app (release-gate). Overlapping senders are safe by item 3, which is what makes a cut-over from one runtime to another safe.references/delivery.md § TestsEach rule's origin, the case that taught it, is in receipts.md beside this file; read it when a rule's edge is unclear.
A real message reached a real inbox once, a retry did not send a second, and one-click unsubscribe worked from the message as received.
| File | Holds | Read when |
|---|---|---|
references/delivery.md | the outbox and receipt schema, the claim and its timings, the answer table, reconciliation, what remains, ordering between related messages, unsubscribe in detail, the tests | building or changing the sender; a duplicate or a missing email; choosing lease and timeout values |
Related skills:
environments (one value per environment, development-only switches, rotating a secret across every holder)supabase-production (a second runtime's database login)release-gate (deploying the runtimes a push does not)saas-authorization (what may be stored about people; reading names and addresses at send time).What SKILL.md sets; muted values are Claude Code's defaults
12 skills in this plugin
/app-lifecyclePlanning a SaaS stage, 'what's next', 'where are we', calling a stage done: the detailed path from an idea to production, each stage with its done-when./clerk-productionSetting up or changing Clerk sign-in, organizations, roles or billing on Next.js, or sign-in that does nothing or lands wrong: Clerk in production./embedded-agents'Add an agent', 'an AI assistant in the app', 'what may it do', 'agents that call agents', building, adding or wiring up an agent or agent chat in Next.js, 'Agent SDK', 'Managed Agents', 'hosted sandbox': design and build embedded Claude agents./environmentsAdding a variable or secret, 'set up production', a domain or a provider token, 'which database is this', a leaked key: dev and production for an AI-built app, backups, incidents./legal-pagesPrivacy policy, terms, a cookie banner, consent at sign-up, a public front door: legal pages drafted from what the code does, held to it by a test, with the owner's facts and sign-off./mcp-serverBefore adding a remote MCP server or tool to a web product, adding OAuth to it, listing it in a directory, or building, submitting or changing a ChatGPT plugin or Apps SDK app: ship it right the first time, tests included, and through OpenAI's directory review.2 plugins ship this exact skill · first indexed Nov 19, 2026
npx claudepluginhub phuryn/product-engineering --plugin app-stackOther plugins' skills for the same job