К основному содержанию
скилл CX Codex

customware-email — скилл для Claude Code: почта в приложении

Скилл customware-email для Claude Code добавляет в приложение на React Router и Hono приём писем через Postmark и отправку через его HTTPS API. Принимает письма клиентов и отправляет им сообщения.

MIT 176 установок ★ 2 обновлён 2026-10-23

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add customware-ai/skills --skill customware-email -a claude-code
Открыть на GitHub

Что делает customware-email

Скилл описывает интеграцию Postmark с существующим приложением: входящие письма принимаются через POST /api/email/inbound, сохраняются для обработки и проходят дедупликацию по MessageID. Исходящие сообщения отправляются серверным кодом через Email API Postmark, а ReplyTo направляет ответы клиентов на заданный виртуальный адрес. SMTP не используется.

Интеграция рассчитана на приложение Customware с React Router, Hono, Drizzle и SQLite. Она должна вписаться в существующие маршруты, схему базы и обработку ошибок. Для работы нужны уже подготовленный сервер Postmark, адреса из задачи и серверные переменные POSTMARK_INBOUND_WEBHOOK_SECRET и POSTMARK_SERVER_TOKEN. Без этих адресов и учётных данных реализацию нельзя завершить.

Какие задачи решает

  • принимать ответы клиентов через вебхук Postmark
  • сохранять входящие письма до подтверждения приёма
  • защищать вебхук через HTTP Basic Auth
  • отправлять клиентские письма через Postmark Email API
  • направлять ответы на виртуальный входящий адрес

Примеры запросов агенту

  • Добавь приём входящих писем Postmark в это приложение с помощью скилла customware-email.
  • Настрой отправку писем клиентам через Postmark и возврат ответов на виртуальный адрес.
  • Проверь интеграцию customware-email с маршрутами Hono и базой Drizzle в проекте.

Как установить customware-email

1Через Skills CLI (Vercel)

npx skills add customware-ai/skills --skill customware-email -a claude-code

2Вручную: положить файлы

~/.claude/skills/customware-email/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/customware-email/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о customware-email

Как установить customware-email в Claude Code?

Выполни npx skills add customware-ai/skills --skill customware-email -a claude-code. Файл скилла появится по пути ~/.claude/skills/customware-email/SKILL.md.

Что делает скилл customware-email?

Он описывает приём входящих писем через вебхук Postmark с сохранением и дедупликацией, а также отправку исходящих писем через HTTPS API Postmark.

Что нужно для работы customware-email?

Нужны подготовленный сервер Postmark, виртуальный входящий адрес и адрес отправителя из задачи. Секрет вебхука и токен сервера должны быть доступны серверному коду через POSTMARK_INBOUND_WEBHOOK_SECRET и POSTMARK_SERVER_TOKEN.

Исходный текст

SKILL.md · MIT
---
name: customware-email
description: Implement customer email in a Customware-generated React Router and Hono app, including durable Postmark inbound receipt and direct Postmark outbound sending. Use when a Builder task names the customware-email skill, provides a Postmark virtual inbound address, or asks to add customer-facing email to an existing Customware app.
---

# Customer Email

<purpose>

Implement one coherent Customware email capability for a Customware-generated app. The capability receives customer replies through the provisioned Postmark inbound webhook and sends customer-facing messages through the same development Postmark server's HTTPS API.

The task provides the project-specific addresses. The two managed server ENV values provide the credentials. This skill provides the implementation method, durable behavior, and verification contract.

</purpose>

> **Build toward the existing app.** Reuse its Hono routes, Drizzle schema, SQLite database, logging, error, and `Result` patterns. A small, native integration is easier to reason about and safer than a second email framework.

---

## Read first

Read these references before editing source files:

1. [references/common-architecture.md](references/common-architecture.md) — task inputs, platform boundaries, credentials, stack, and shared integration shape.
2. [references/inbound.md](references/inbound.md) — the fixed webhook, authentication, durable receipt, deduplication, and recovery contract.
3. [references/outbound.md](references/outbound.md) — direct Postmark API sending, message shape, sender/reply routing, and failure handling.
4. [references/common-quality.md](references/common-quality.md) — validation, safe logging, migration, tests, and final verification.

Read the inbound and outbound references even when the task initially sounds one-sided. Replies make the two directions one feature: inbound mail must be able to reach the app, and outbound mail must route replies back to the same virtual address.

<read_order>

Before implementation, also read the target repository's `AGENTS.md`, the complete Builder task, relevant project docs, and the existing database/route/service contracts. Treat the target repository as authoritative when a framework detail differs from an example here.

</read_order>

## Fixed platform contract

| Concern | Required decision |
| --- | --- |
| Postmark server | Use the one development server already provisioned for this project. The app does not create, delete, or configure it. |
| Inbound route | `POST /api/email/inbound` |
| Inbound authentication | HTTP Basic Auth, username `customware`, password from `POSTMARK_INBOUND_WEBHOOK_SECRET` |
| Server credentials | Read `POSTMARK_INBOUND_WEBHOOK_SECRET` and `POSTMARK_SERVER_TOKEN` only on the server. |
| Inbound address | Use the exact virtual address supplied in the task. Do not create an ENV for it. |
| Outbound sender | Use the exact task-provided sender, currently `[email protected]`. Do not create an ENV for it. |
| Outbound stream | Postmark's existing Default Transactional stream (`outbound`). |
| Transport | Direct HTTPS requests to Postmark's Email API from server code. |
| SMTP | Do not enable or use SMTP. |
| Customware gateway | Do not add a Customware send endpoint, proxy, or email gateway. |
| Production | Implement the development capability described by the task. Do not add production-server, publish, or environment-branching behavior. |

<address_source_of_truth>

The task description is the source of truth for the virtual inbound address and outbound From address. Keep each value in one server-owned constant/module so it cannot drift between the sender, reply routing, and reviewer-visible code. Never replace either value with a placeholder, a guessed address, or a new ENV.

</address_source_of_truth>

## Non-negotiables

- Keep both Postmark credentials server-only. Never place them in browser code, `VITE_*`, HTML, JSON responses, task output, logs, or client state.
- Treat `.env` and `.env.*` as inaccessible. Do not inspect them with file commands. A runtime check may use `node --env-file=.env ...` without printing environment values.
- Register the inbound route before static serving and the SPA fallback.
- Persist an inbound delivery before acknowledging it. The 200 response means the raw delivery is safe to recover, not that application processing finished.
- Enforce `MessageID` uniqueness in the database. Do not implement deduplication as read-then-insert.
- Make inbound processing recoverable after a crash or restart; an in-memory callback cannot be the only record of work.
- Return the contract statuses in the inbound reference. Never return `403` to Postmark for this receiver.
- Send outbound mail only from server code with `X-Postmark-Server-Token` and `MessageStream: "outbound"`.
- Use the task's virtual inbound address as `ReplyTo`, so a customer reply comes back through the existing webhook.
- Keep message content and credentials out of logs. Log only safe operational identifiers and error categories.
- Reuse existing contracts and error/result conventions. Avoid duplicate validation, speculative abstractions, compatibility branches, or a second persistence framework.

## Implementation workflow

### 1. Establish the task contract

1. Read the task completely.
2. Extract the exact virtual inbound address and outbound From address.
3. Confirm the task names `customware-email` and that the Postmark server has already been provisioned.
4. Stop with a clear `action_required` result if either address or either managed credential contract is unavailable. Do not invent values.

### 2. Inspect the generated app

Locate the Hono entrypoint, route registration order, static/fallback handlers, Drizzle schema and migrations, query/service conventions, environment helper, logging boundary, and existing `Result`/Zod patterns. Identify where the app's customer workflows should consume an accepted email and where its existing business actions produce outbound messages.

### 3. Build the shared server foundation

Create one small server-owned email configuration module for the task-provided addresses and the two managed ENV reads. Keep provider calls behind a focused Postmark client/adapter that follows the app's existing result and error patterns. Do not let browser requests choose the server token, From address, ReplyTo address, stream, or Postmark URL.

### 4. Implement inbound and outbound

Follow [references/inbound.md](references/inbound.md) for the receiver and durable worker. Follow [references/outbound.md](references/outbound.md) for the Postmark Email API adapter and the app-facing send helper. Integrate both with existing domain flows instead of creating a parallel email subsystem.

### 5. Verify progressively

Run focused contract checks while implementing, then the repository's normal format, lint, typecheck, build, unit, and interactive checks. Use the test matrix in [references/common-quality.md](references/common-quality.md). If an external send is requested, use only an explicitly approved safe recipient; otherwise prove the exact request with a stubbed Postmark client and route-level tests.

### 6. Perform the final audit

Search the final diff for credential names, hardcoded secrets, SMTP usage, `POSTMARK_ACCOUNT_TOKEN`, production branches, direct browser-to-Postmark calls, raw email logging, and a second gateway. Confirm the task addresses are the only email values embedded in generated application code and that the database migration is included and applied through the app's normal command.

## Completion checklist

- [ ] The task's exact inbound and outbound addresses are used in one server-owned configuration module.
- [ ] `POSTMARK_INBOUND_WEBHOOK_SECRET` protects the inbound route and `POSTMARK_SERVER_TOKEN` authorizes outbound HTTPS calls.
- [ ] The inbound route captures raw JSON, validates `MessageID`, persists before 200, deduplicates by a database constraint, and recovers pending/stale work.
- [ ] Outbound requests use `POST /email`, `X-Postmark-Server-Token`, `MessageStream: "outbound"`, the task's From, and the task's inbound ReplyTo.
- [ ] SMTP, raw email, account-level provisioning, production behavior, and a Customware send gateway are absent.
- [ ] Sensitive values and message content are absent from browser bundles, responses, and logs.
- [ ] Migrations, focused tests, repository checks, build, and relevant browser verification pass.
- [ ] The final diff and reviewer requirements are read back before sign-off.

## Boundaries

Use this skill for the generated app's Customware email implementation. The Customware control plane owns Postmark server provisioning, encryption, hidden ENV materialization, webhook URL reconciliation on sandbox restart, cleanup, and publish protection. Do not duplicate those responsibilities in the generated app.

Use `customware-ai` for AI gateway or AI Elements work, `customware-support-widget` for the support widget, and `task-workflow` when the Builder task requires its full gated execution protocol. Those skills complement this one; they do not replace the email contracts here.

© customware-ai · MIT · customware-ai/skills

Похожие скиллы

Все скиллы по теме «Бэкенд и API» →
email-template-builder Alireza Rezvani Скилл email-template-builder создаёт систему транзакционных писем на React Email или MJML, подключает провайдеров и добавляет предпросмотр. Подходит для новых шаблонов, миграции и локализации писем. CX Codex +1 602установок postmark postmark Скилл-маршрутизатор по Postmark: подсказывает агенту, какой под-скилл взять для отправки писем, входящих, шаблонов и вебхуков. CX Codex +1 816установок postmark-webhooks hookdeck Скилл postmark-webhooks для Claude Code помогает принимать и обрабатывать вебхуки Postmark. Настраивает обработку доставок, кликов, открытий, жалоб на спам и входящих сообщений. CX Codex +1 203установок postmark-automation davepoon Скилл postmark-automation гоняет Postmark через Rube MCP: отправка писем по шаблонам, правка шаблонов, статистика доставки и разбор bounce'ов прямо из чата с агентом. CX Codex +1 120установок extension-email-raw caffeinelabs Скилл extension-email-raw для Claude Code отправляет одно письмо нескольким адресатам через поля to, cc и bcc. В примере — напоминание участникам встречи. CX Codex +1 32 200установок agent-email-inbox resend Скилл agent-email-inbox помогает настроить приём входящих писем через вебхуки Resend для ИИ-агентов. Защищает систему от непроверенных отправителей и запускает сценарии обработки почты. CX Codex +1 14 200установок

Из того же набора12

Весь набор →
frontend-design Скилл frontend-design для Claude Code задаёт визуальные правила при вёрстке на Tailwind и shadcn/ui: запрещает шаблонные серые интерфейсы, сетки карточек и сайдбары. CX Codex +1 1 600установок crm-builder Скилл crm-builder превращает описание бизнеса в DOMAIN.md в рабочий прототип CRM: контакты, компании, сделки и канбан-воронка. CX Codex +1 1 400установок cpq-builder Скилл cpq-builder превращает DOMAIN.md в интерфейс калькулятора, расчёта смет или CPQ для Customware SPA. Заменяет запутанные таблицы Excel и согласования по почте. CX Codex +1 1 200установок trades-builder Скилл trades-builder настраивает генерацию SPA-интерфейса под строительные работы на основе DOMAIN.md. Превращает сметы и графики бригад в готовый веб-инструмент Customware. CX Codex +1 1 100установок customware-ai Скилл customware-ai помогает добавлять AI-чат, генерацию текста, инструменты и структурированный JSON в приложения на React Router и Hono. CX Codex +1 739установок playwright-in-sandbox Скилл playwright-in-sandbox для Claude Code и других агентов: проверяет интерфейс в браузере через Playwright и пишет устойчивые E2E-тесты. После правок UI фиксирует скриншоты, а не только состояние DOM. CX Codex +1 510установок playwright-interactive-sandbox Скилл playwright-interactive-sandbox организует итеративную проверку веб-интерфейса через постоянный Node.js-скрипт с Playwright. Он нужен для функционального и визуального QA. CX Codex +1 401установок source-html-to-app-ui Скилл source-html-to-app-ui пересобирает одобренный HTML-макет в настоящее приложение: роуты, компоненты, локальное состояние, адаптив и парные скриншоты через Playwright. CX Codex +1 233установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой