Agent Skillsauthgear/authgear-server › update-email-templates

update-email-templates

GitHub

指导如何更新Authgear邮件模板,包括编辑源文件、生成MJML和HTML、处理多语言翻译及提交规范。

.claude/skills/update-email-templates/SKILL.md authgear/authgear-server

Trigger Scenarios

修改邮件文案或结构 更新邮件主题行 同步邮件模板与翻译文件

Install

npx skills add authgear/authgear-server --skill update-email-templates -g -y
More Options

Non-standard path

npx skills add https://github.com/authgear/authgear-server/tree/main/.claude/skills/update-email-templates -g -y

Use without installing

npx skills use authgear/authgear-server@update-email-templates

指定 Agent (Claude Code)

npx skills add authgear/authgear-server --skill update-email-templates -a claude-code -g -y

安装 repo 全部 skill

npx skills add authgear/authgear-server --all -g -y

预览 repo 内 skill

npx skills add authgear/authgear-server --list

SKILL.md

Frontmatter
{
    "name": "update-email-templates",
    "description": "Update Authgear email templates using the correct source files, translation files, and commit order. Use when editing email wording, email structure, or subject lines."
}

Update Email Templates

Follow this workflow whenever updating email templates.

Scope Rules

  1. Only edit source template files:
    • resources/authgear/templates/en/messages/*.txt.gotemplate
    • resources/authgear/templates/en/messages/*.mjml.gotemplate
  2. Do not edit generated template files directly:
    • resources/authgear/templates/en/messages/*.txt
    • resources/authgear/templates/en/messages/*.mjml
  3. In *.txt.gotemplate and *.mjml.gotemplate, use translations from:
    • resources/authgear/templates/en/messages/translation.json
  4. Always edit English templates only at source stage.
    • Do not manually update non-en locales in source-edit commits.
  5. Email subject translations are defined in:
    • resources/authgear/templates/en/translation.json

Workflow

  1. Edit source templates first:
    • resources/authgear/templates/en/messages/*.txt.gotemplate
    • resources/authgear/templates/en/messages/*.mjml.gotemplate
    • resources/authgear/templates/en/messages/translation.json (body/content translations)
    • resources/authgear/templates/en/translation.json (subject translations)
  2. Generate .mjml from .mjml.gotemplate:
    • go run ./scripts/generatemjml/main.go -i resources/authgear/templates
  3. Commit source edits and generated .mjml in one commit.
  4. Before regenerating non-English translations, delete the changed keys from all non-en locale files so the generator knows to recreate them:
    • For en/messages/translation.json changes, delete the top-level key (e.g. UsageAlert, not UsageAlert.Alert.Title) from all non-en messages/translation.json files:
      • make templates-translation-json-del-key KEY=<TopLevelKey>
    • For en/translation.json subject changes, delete the changed key from all non-en translation.json files:
      • make translation-json-del-key KEY=<key>
    • Run once per changed top-level key.
  5. In a separate commit, generate non-English translations:
    • make -C scripts/python generate-translations
    • Requires being logged in to Claude: claude login
    • If not logged in, stop and ask the user to run claude login first.
  6. Finally, generate HTML emails:
    • make html-email

Commit Boundaries (Required)

  • Commit 1:
    • Source edits (*.gotemplate, en/messages/translation.json, optional en/translation.json)
    • Generated .mjml
  • Commit 2:
    • Generated non-English translations (make -C scripts/python generate-translations)
  • Commit 3:
    • Generated email HTML artifacts (make html-email)

Do not combine generated artifacts (.html, .txt, non-en translations) in the same commit as source *.gotemplate edits.

Version History

  • 2dd6d88 Current 2026-07-24 16:30

Same Skill Collection

.claude/skills/add-go-test/SKILL.md
.claude/skills/add-portal-admin-api-mutation/SKILL.md
.claude/skills/add-portal-admin-api-query/SKILL.md
.claude/skills/add-portal-screen/SKILL.md
.claude/skills/api-design/SKILL.md
.claude/skills/bootstrap-local-dev/SKILL.md
.claude/skills/dep-audit/SKILL.md
.claude/skills/generate-schemas-and-gentype/SKILL.md
.claude/skills/new-siteadmin-api/SKILL.md
.claude/skills/review-pr/SKILL.md
.claude/skills/update-deps/SKILL.md
.claude/skills/update-feature-config/SKILL.md
.claude/skills/update-important-modules/SKILL.md
.claude/skills/update-portal-ui/SKILL.md
.claude/skills/update-vettedpositions/SKILL.md
.claude/skills/write-e2e-test/SKILL.md
.claude/skills/write-implementation-plan/SKILL.md
.claude/skills/update-go-version/SKILL.md
.claude/skills/portal-admin-api-graphql/SKILL.md

Metadata

Files
0
Version
e619570
Hash
050d93d3
Indexed
2026-07-24 16:30

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-17 04:29
浙ICP备14020137号-1 $mapa de visitantes$