Skip to main content
skill CX Codex

customware-email — Claude Code skill for app email

customware-email adds Postmark inbound email handling and outbound sending to a React Router and Hono app. Use it to connect customer email flows in an existing Customware project.

MIT 176 installs ★ 2 updated 2026-10-23

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add customware-ai/skills --skill customware-email -a claude-code
Open on GitHub

What customware-email does

The skill guides an integration with an existing app: receive inbound messages at POST /api/email/inbound, store deliveries before acknowledging them, and deduplicate using MessageID. Server code sends outbound mail through Postmark’s Email API over HTTPS. Replies go to the task-provided virtual inbound address through ReplyTo; SMTP is not part of the setup.

It targets Customware-generated apps using React Router, Hono, Drizzle, and SQLite, and calls for reusing the project’s routes, database patterns, and error handling. The Postmark server must already be provisioned. The task also needs to provide the addresses, while server-side credentials come from POSTMARK_INBOUND_WEBHOOK_SECRET and POSTMARK_SERVER_TOKEN. Without the addresses and credentials, implementation cannot proceed.

What it helps with

  • receive customer replies through a Postmark webhook
  • persist inbound deliveries before acknowledging them
  • protect the inbound route with HTTP Basic Auth
  • send customer emails through the Postmark Email API
  • route replies back to the virtual inbound address

Example prompts for the agent

  • Add Postmark inbound email handling to this app with the customware-email skill.
  • Set up customer email sending through Postmark and route replies to the virtual address.
  • Check how customware-email should fit this project’s Hono routes and Drizzle database.

How to install customware-email

1Skills CLI (Vercel)

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

2Manually: put the files in place

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

Copy the whole skill folder; for one project use .claude/skills/customware-email/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about customware-email

How do I install customware-email in Claude Code?

Run npx skills add customware-ai/skills --skill customware-email -a claude-code. The skill file is placed at ~/.claude/skills/customware-email/SKILL.md.

What does customware-email do?

It guides durable receipt and deduplication of inbound Postmark messages, plus server-side outbound email through Postmark’s HTTPS API.

What does customware-email need to work?

The Postmark server must be provisioned, and the task must supply the inbound and sender addresses. Server code reads POSTMARK_INBOUND_WEBHOOK_SECRET and POSTMARK_SERVER_TOKEN for credentials.

Source text

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

Similar skills

All skills for Backend and APIs →

From the same set12

The whole set →
frontend-design frontend-design is a Claude Code skill that sets visual guidelines for Tailwind and shadcn/ui layouts, banning generic purple SaaS cards, cramped tables, and unneeded sidebars. CX Codex +1 1,600installs crm-builder The crm-builder skill turns a business description in DOMAIN.md into a working CRM prototype: contacts, companies, deals and a kanban pipeline. CX Codex +1 1,400installs cpq-builder cpq-builder turns DOMAIN.md specs into working Configure-Price-Quote prototypes for the Customware SPA, replacing fragile spreadsheets and email quote threads. CX Codex +1 1,200installs trades-builder trades-builder turns a DOMAIN.md spec into a field operations tool for Customware SPA. Generates scope-based estimates, crew schedules, and progress tracking tables. CX Codex +1 1,100installs customware-ai The customware-ai skill guides AI chat, text generation, tools, model selection, and typed JSON in Customware-generated React Router and Hono apps. CX Codex +1 739installs playwright-in-sandbox playwright-in-sandbox — a skill that verifies UI changes in a sandbox browser and writes durable Playwright E2E coverage. Useful when you want screenshot proof, not just DOM state. CX Codex +1 510installs playwright-interactive-sandbox The playwright-interactive-sandbox skill runs iterative web UI checks through a persistent Node.js Playwright workflow. Use it for functional checks, visual QA, and screenshot evidence. CX Codex +1 401installs source-html-to-app-ui source-html-to-app-ui turns an approved HTML mockup into a working app UI: real routes, components, local state, responsive behaviour, and paired Playwright evidence for source and target. CX Codex +1 233installs

Project sponsors

Companies that keep this analytics open