supabase-email-templates
Skill4 starsChanged 6 months agoMITView on GitHub
Customize Supabase Auth email templates for local development and production. Use exact names: recovery, confirmation, invite, magic_link, email_change 1. Create template at supabase/templates/emails/recovery.html: 2. Configure in supabase/config.toml (path relative to project root): 3. Restart auth container: Test with Inbucket at http://localhost:54324: Available: {{ .ConfirmationURL }}, {{ .Email }}, {{ .SiteURL }}, {{ .Token }} Default template still showing? - After supabase start, always restart auth: docker restart supabase_auth_<project> - Send new test email (old emails cached) Template not found (404)?…
- Reads credentials
- Sends data out
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apple-appstore-setupSkill
- eas-mobile-deploymentSkill
- edge-functionsSkill
- frontend-developmentSkill
- google-play-setupSkill
- langfuse-tracingSkill
- mobile-developmentSkill
- posthog-analyticsSkill
- push-notificationsSkill
- revenuecatSkill
- sentry-integrationSkill
- social-auth-setupSkill
- stripe-paymentsSkill
- template-releaseSkill
- template-upgradeSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Create custom email templates (password reset, confirmation, etc.)
- Distinctive: line 8
Test templates locally with Inbucket
- Very specific: line 13
Use exact names: recovery, confirmation, invite, magic_link, email_change
- Very specific: line 69
After supabase start, always restart auth: docker restart supabase_auth_<project>
- Very specific: line 73
After renaming files: supabase stop && supabase start
- Distinctive: line 77
Use inline CSS only
- Very specific: line 78
Avoid rgba() in CSS values
- Distinctive: line 79
Use hex colors only
- Distinctive: line 95
Use inline CSS only, max 600px width, table layouts, test in Inbucket first
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Supabase Email Templates
Customize Supabase Auth email templates for local development and production.
When to use
- Create custom email templates (password reset, confirmation, etc.)
- Test templates locally with Inbucket
- Deploy templates to production
Template Types
Use exact names: recovery, confirmation, invite, magic_link, email_change
Setup
1. Create template at supabase/templates/emails/recovery.html:
<body style="margin: 0; padding: 0;">
<table style="max-width: 600px; margin: 0 auto;">
<tr><td style="padding: 40px; text-align: center;">
<h1>Your App</h1>
<a href="{{ .ConfirmationURL }}"
style="display: inline-block; padding: 12px 32px;
background: #2563eb; color: #fff; border-radius: 6px;">
Reset Password
</a>
</td></tr>
</table>
</body>2. Configure in supabase/config.toml (path relative to project root):
[auth.email.template.recovery]
subject = "Reset your password"
content_path = "./supabase/templates/emails/recovery.html"3. Restart auth container:
docker restart supabase_auth_<project-name>Local Testing
Test with Inbucket at http://localhost:54324:
# Send test email
curl -X POST 'http://localhost:54321/auth/v1/recover' \
-H "apikey: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0" \
-H "Content-Type: application/json" \
-d '{"email": "test@example.com"}'
# View at http://localhost:54324Template Variables
Available: {{ .ConfirmationURL }}, {{ .Email }}, {{ .SiteURL }}, {{ .Token }}
Troubleshooting
Default template still showing?
- After
supabase start, always restart auth:docker restart supabase_auth_<project> - Send new test email (old emails cached)
Template not found (404)?
- After renaming files:
supabase stop && supabase start - Then restart auth container
Template parse errors?
- Use inline CSS only
- Avoid
rgba()in CSS values - Use hex colors only
Production Deployment
Templates deploy via GitHub Actions using deploy-templates.js:
- name: Deploy Email Templates
run: node ./supabase/templates/deploy-templates.js
env:
SUPABASE_PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_ID }}
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}Best Practices
Use inline CSS only, max 600px width, table layouts, test in Inbucket first
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.

