react-email · oakoss — скилл для Claude Code: письма на React
Скилл react-email для Claude Code собирает адаптивные HTML-письма из React-компонентов и выводит их в HTML или обычный текст. Создаёт транзакционные письма и маркетинговые шаблоны.
MIT 122 установок ★ 29 обновлён 2026-08-17
npx skills add oakoss/agent-skills --skill react-email -a claude-codeЧто делает react-email
Скилл подсказывает, как собрать письмо из компонентов React Email: задать структуру, разместить текст и кнопки, добавить изображения и превью для списка входящих. Для сетки письма используются Section, Row и Column, а не CSS Grid или Flexbox: они создают табличную разметку для почтовых клиентов.
Стили можно задавать через встроенные CSS-объекты или обёртку Tailwind, которая встраивает классы при рендере. Функция render() асинхронная: её результат нужно дождаться. Для локального просмотра есть команда email dev с автоматической перезагрузкой.
При установке в Claude Code команда добавляет скилл в ~/.claude/skills/react-email/SKILL.md. Если задаёте шрифт, поместите Font внутрь Head; иначе он не загрузится.
Какие задачи решает
- собрать адаптивное HTML-письмо из React-компонентов
- добавить текст превью для списка входящих
- сверстать табличную сетку письма для почтовых клиентов
- отрендерить письмо в HTML или обычный текст
Примеры запросов агенту
- Создай письмо для сброса пароля на React Email с кнопкой и текстом превью.
- Проверь разметку письма: замени CSS Grid на компоненты для табличной сетки.
- Отрендери этот компонент письма в HTML и обычный текст.
Как установить react-email
1Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill react-email -a claude-code2Вручную: положить файлы
~/.claude/skills/react-email/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/react-email/
1Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill react-email -a codex2Вручную: положить файлы
.agents/skills/react-email/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill react-email -a cursor2Вручную: положить файлы
.cursor/skills/react-email/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install oakoss/agent-skills skills/react-email2Вручную: положить файлы
.github/skills/react-email/SKILL.md1Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill react-email -a gemini-cli2Командой платформы
gemini skills install https://github.com/oakoss/agent-skills --path skills/react-emailВручную: положить файлы
.devin/skills/react-email/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add oakoss/agent-skills --skill react-email -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о react-email
Как установить react-email в Claude Code?
Выполните npx skills add oakoss/agent-skills --skill react-email -a claude-code. Файл скилла появится в ~/.claude/skills/react-email/SKILL.md.
Что делает react-email?
Помогает создавать письма из React-компонентов и рендерить их в HTML или обычный текст. В скилле разобраны структура, стили, макет и превью письма.
Как задать стили письму и не потерять их при рендере?
Используйте встроенные CSS-стили или обёртку Tailwind. Не задавайте className и style одновременно на одном элементе.
Исходный текст
SKILL.md · MIT
---
name: react-email
description: >
Build responsive HTML emails with React Email components. Covers email structure (Html, Head, Body, Container),
content components (Text, Heading, Button, Link, Img), layout (Section, Row, Column), styling with inline CSS
and Tailwind, custom fonts, preview text, and rendering to HTML.
Use when creating transactional emails, marketing templates, or email design systems.
Use for email rendering, preview, Tailwind email styling, and provider integration with Resend, Nodemailer, or SendGrid.
license: MIT
metadata:
author: oakoss
version: '1.1'
source: https://react.email/docs
user-invocable: false
---
# React Email
## Overview
React Email is a library for building responsive HTML emails using React components. It provides a set of unstyled, accessible components that render to email-client-compatible HTML. Supports inline styles, Tailwind CSS via a wrapper component, custom web fonts, and rendering to both HTML and plain text.
**When to use:** Transactional emails (welcome, password reset, receipts), marketing templates, email design systems, any project that renders emails server-side.
**When NOT to use:** Static HTML email templates with no dynamic content, projects that already use a dedicated email builder (MJML, Maizzle), or when you only need plain-text emails.
## Quick Reference
| Pattern | API | Key Points |
| ------------------ | ---------------------------------------- | ----------------------------------------------------------- |
| Document structure | `Html`, `Head`, `Body` | `Html` wraps everything, `Head` loads fonts/meta |
| Content container | `Container` | Centers content, sets `max-width` |
| Layout grid | `Section`, `Row`, `Column` | Table-based layout for email clients |
| Text content | `Text`, `Heading` | `Heading` accepts `as` prop for h1-h6 |
| Links | `Link` | Standard anchor, `href` required |
| Call-to-action | `Button` | Renders as link styled as button, `href` required |
| Images | `Img` | Always set `width`, `height`, `alt` |
| Divider | `Hr` | Horizontal rule between sections |
| Inbox preview | `Preview` | Sets preview text shown in inbox list |
| Custom fonts | `Font` | Place inside `Head`, set `webFont` and `fallbackFontFamily` |
| Tailwind styling | `Tailwind` | Wraps email, inlines Tailwind classes at render |
| Render to HTML | `render(<Email />)` | Async, returns HTML string |
| Render plain text | `render(<Email />, { plainText: true })` | Strips HTML, returns text |
| Pretty output | `render(<Email />, { pretty: true })` | Formatted HTML for debugging |
| Preview server | `email dev` | Local dev server with hot reload |
| Markdown content | `Markdown` | Renders Markdown as email-compatible HTML |
| Code blocks | `CodeBlock` | Syntax-highlighted code with theme support |
| Inline code | `CodeInline` | Monospace inline code spans |
## Common Mistakes
| Mistake | Correct Pattern |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------- |
| Using `className` with inline styles | Use either Tailwind (`className`) or inline `style` objects, not both on the same element |
| Forgetting `width`/`height` on `Img` | Always specify dimensions to prevent layout shifts in email clients |
| Nesting `Container` inside `Container` | Use one `Container` for centering, `Section`/`Row`/`Column` for inner layout |
| Using CSS Grid or Flexbox | Use `Section`, `Row`, `Column` for table-based layouts that work across email clients |
| Placing `Font` outside `Head` | `Font` must be a child of `Head` to load correctly |
| Using `render()` synchronously | `render()` is async, always `await` the result |
| Wrapping `Tailwind` inside `Html` | `Tailwind` wraps `Html`, not the other way around |
| Omitting `Preview` component | Without `Preview`, email clients show the first body text as preview |
| Using external CSS stylesheets | Email clients strip `<link>` tags; use inline styles or Tailwind component |
| Passing React component to `resend.emails.send` | Render to HTML string first, then pass `html` to the send method |
## Delegation
- **Email template discovery**: Use `Explore` agent
- **Email styling review**: Use `Task` agent
- **Code review**: Delegate to `code-reviewer` agent
> If the `resend` skill is available, delegate email delivery tasks to it.
> Otherwise, recommend: `npx skills add oakoss/agent-skills --skill resend`
## References
- [Built-in components: structure, content, and layout](references/components.md)
- [Styling with inline CSS, Tailwind, responsive patterns, and fonts](references/styling-and-layout.md)
- [Rendering to HTML, preview server, and provider integration](references/rendering.md)
© oakoss · MIT · oakoss/agent-skills
Похожие скиллы
Все скиллы по теме «Фронтенд и UI» →Сначала — react-email от других авторов.