agentleFS
Ampli-GroupAmpli-Group/agentic-mobile-blueprint/.agents/skills/supabase-email-templates/SKILL.md

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

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
  1. Distinctive:

    Create custom email templates (password reset, confirmation, etc.)

    line 7
  2. Distinctive:

    Test templates locally with Inbucket

    line 8
  3. Very specific:

    Use exact names: recovery, confirmation, invite, magic_link, email_change

    line 13
  4. Very specific:

    After supabase start, always restart auth: docker restart supabase_auth_<project>

    line 69
  5. Very specific:

    After renaming files: supabase stop && supabase start

    line 73
  6. Distinctive:

    Use inline CSS only

    line 77
  7. Very specific:

    Avoid rgba() in CSS values

    line 78
  8. Distinctive:

    Use hex colors only

    line 79
  9. Distinctive:

    Use inline CSS only, max 600px width, table layouts, test in Inbucket first

    line 95

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:54324

Template 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.