정보
이 스킬은 SendGrid나 Mailgun과 같은 제공업체의 이메일 템플릿을 Mailtrap 호환 Handlebars 구문으로 변환합니다. 단일 파일, 대량 디렉터리 또는 인라인 HTML을 처리하며, 패턴 매칭과 LLM 지능을 모두 활용하여 예외 사례를 해결합니다. Mailtrap으로 템플릿을 마이그레이션할 때 구문 변환을 자동화하려면 이 스킬을 사용하세요.
빠른 설치
Claude Code
추천npx skills add mailtrap/mailtrap-skills -a claude-code/plugin add https://github.com/mailtrap/mailtrap-skillsgit clone https://github.com/mailtrap/mailtrap-skills.git ~/.claude/skills/converting-email-templatesClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Converting email templates
Purpose
Automatically convert email templates from other email service providers into Mailtrap-compatible Handlebars syntax. Handles both deterministic pattern conversions (via a Python script) and complex edge cases (via LLM intelligence).
Related skills: using-email-templates (Handlebars syntax, API template send), sending-emails (stream bases and auth), authorizing-api-requests (tokens, env vars, account_id resolution — needed when creating templates or sending via the Templates API after conversion).
Input
- Source provider (required):
sendgrid,mailgun,mandrill-handlebars,mandrill-mergetags,postmark,brevo, orses - Input: a single template file path, a directory of
.htmltemplate files, or raw HTML pasted inline - Output directory (optional): defaults to a
/converted/subdirectory next to the input
If the user does not specify the source provider, ask before proceeding. If the user provides template HTML inline (pasted in chat), save it to a temporary .html file first.
Workflow
Step 1: Detect mode
Fast mode (default): For providers with deterministic conversion patterns. The Python script handles these reliably.
Deep mode: Triggered when:
- Provider is
brevoAND the template contains nested loops, multiple filters, or complex conditional nesting - The script flags patterns that could benefit from LLM judgment
- The user explicitly requests deep mode
- Inline HTML is provided (run LLM conversion directly)
Step 2: Run the converter script
Execute the Python converter script:
python3 {skill_dir}/scripts/converter.py \
--provider {provider} \
--input {input_path} \
--output {output_dir}
Where {skill_dir} is the directory containing this SKILL.md file.
Read the output:
- Exit code 0: clean conversion, no flags. Proceed to Step 4.
- Exit code 1: conversion completed with flags. Proceed to Step 3.
- Exit code 2: error. Report to user and stop.
Read the .report.txt file(s) generated alongside each converted template. For bulk conversions, also read _summary.txt.
Note: When flags are present, the script automatically:
- Prepends a
<!-- WARNING: ... -->comment at the top of the converted file - Wraps unsupported syntax in
<!-- FLAGGED [RULE]: message -->HTML comments so the file can be pasted into the Mailtrap editor without triggering parser errors
Step 3: Handle flags (Deep mode)
For each flag in the report:
- Read the flagged line in the original template.
- Consult
references/conversion-rules.mdfor the specific rule and recommended action. - Categorize the flag:
- App-layer change required (e.g.,
formatDate, comparison helpers): Cannot be resolved in the template. Report to the user with a clear explanation of what they need to change in their application code. Suggest the replacement variable name. - Template-level fix possible (e.g., Brevo nested loops, Mandrill
mc:editregions): Apply the conversion using LLM judgment. Show the user the before/after and ask for confirmation before writing. - Ambiguous (e.g., Postmark closing tag mismatch): Show the user both the original context and the converted output. Ask them to verify.
- App-layer change required (e.g.,
Present flags grouped by category:
## Conversion Complete
### Auto-converted: [count] changes
[Brief summary or collapsed details]
### Needs your application code: [count] flags
[For each: what to change, why, suggested variable name]
### Needs verification: [count] flags
[For each: show before/after, ask for confirmation]
Step 4: Present results
Single file:
Converted: {filename}
Changes: [count] | Flags: [count]
Output: {output_path}
[Show the conversion report summary]
[If flags exist, show the categorized flag breakdown from Step 3]
Bulk conversion:
Converted: [count] files
Total changes: [count] | Total flags: [count]
Clean: [count] files | Needs review: [count] files
Output: {output_dir}
[Show the summary report]
[List files needing review with their specific flags]
Step 5: API field mapping reminder
After template conversion, always remind the user about the API-side changes they need to make. Reference the quick mapping table:
| Provider | Old template field | Old variables field | Mailtrap field | Mailtrap variables |
|---|---|---|---|---|
| SendGrid | template_id | personalizations[].dynamic_template_data | template_uuid | template_variables |
| Mailgun | template | t:variables | template_uuid | template_variables |
| Mandrill | template_name | global_merge_vars + merge_vars | template_uuid | template_variables |
| Postmark | TemplateId/TemplateAlias | TemplateModel | template_uuid | template_variables |
| Brevo | templateId | params | template_uuid | template_variables |
| Amazon SES | TemplateName/TemplateArn | TemplateData | template_uuid | template_variables |
Only show the row for the provider that was just converted.
Inline conversion (no file)
If the user pastes template HTML directly in chat instead of providing a file path:
- Identify the source provider (ask if not stated).
- Apply the conversion rules from
references/conversion-rules.mddirectly using LLM intelligence. - Comment out unsupported syntax in the converted output by wrapping it in
<!-- FLAGGED [RULE]: message -->HTML comments (same format as the script). This prevents editor errors when the user pastes the output into Mailtrap. - If there are flags, prepend a
<!-- WARNING: ... -->comment at the top of the converted output noting how many flagged patterns need resolution. - Present the converted Handlebars output with a list of changes made.
- Flag any patterns that need app-layer changes.
- Offer to save the result to a file.
This mode always uses Deep mode (LLM) since there is no file to pass to the script.
Rules
- Never silently skip a flagged pattern. Every flag must be reported to the user.
- Never modify the original file. Converted output always goes to the output directory.
- Preserve HTML structure. Only modify template syntax (variables, conditionals, loops, helpers). Do not touch HTML tags, attributes, CSS, or non-template content.
- When in doubt, flag. If a pattern is ambiguous, flag it for manual review rather than making an incorrect conversion.
- Report counts. Always show the number of changes and flags so the user knows the scope.
- One provider at a time. If a directory contains templates from multiple providers, ask the user to separate them or specify the provider for the batch.
GitHub 저장소
자주 묻는 질문
converting-email-templates Skill이란 무엇인가요?
converting-email-templates은(는) mailtrap이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 converting-email-templates 관련 작업을 수행할 수 있게 합니다.
converting-email-templates은(는) 어떻게 설치하나요?
이 페이지의 설치 명령을 사용하세요. converting-email-templates을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.
converting-email-templates은(는) 어떤 카테고리에 속하나요?
converting-email-templates은(는) 메타 카테고리에 속합니다.
converting-email-templates은(는) 무료로 사용할 수 있나요?
네. converting-email-templates은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.
연관 스킬
이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.
이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.
이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.
SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.
