nextjs-build-website-contact-form

Build a Next.js contact form with zod validation and Resend email delivery.

2|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/sdcorejs/sdcorejs-agent --skill nextjs-build-website-contact-form
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-build-website-contact-form
Source: https://github.com/sdcorejs/sdcorejs-agent/tree/main/plugin/skills/nextjs-build-website-contact-form
Command: npx skills add https://github.com/sdcorejs/sdcorejs-agent --skill nextjs-build-website-contact-form

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a working contact form workflow that actually delivers emails instead of using fake client-side submit stubs.

Core Features & Use Cases

  • Zod-validated payload (client + server): Shared schema enforces field correctness and consistent error codes with bilingual messages.
  • Real POST email delivery via Next.js API route: Sends to configured destination using Resend (or compatible SendGrid flow) with Reply-To set to the user email.
  • Abuse-resistant UX and security: IP rate limiting plus honeypot field prevents spam floods and silently blocks bot submissions.
  • Accessible bilingual UI: Inline success/error states with aria-invalid and aria-describedby for screen readers.
  • Use case: Build the “Contact” section for a Next.js site, ensuring submissions reach your inbox and that retries get rate-limited correctly.

Quick Start

Add this skill to your Next.js build and run it during your 07-write-code contact-form step so the API route, React component, schema, i18n keys, and email delivery are generated together.

Frequently Asked Questions about nextjs-build-website-contact-form

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a Next.js contact form that actually sends emails?

Building a Next.js contact form that sends emails requires a POST `/api/contact` route using the Node runtime and Resend integration, paired with shared zod schemas for client and server validation to ensure real delivery.

How do I add rate limiting and spam protection to a Next.js contact form?

To add rate limiting and spam protection to a Next.js contact form, implement IP-based rate limiting on the API route to prevent submission floods and include a hidden honeypot field to silently block bot submissions.

Can I use zod for bilingual form validation in Next.js?

Yes, you can use zod for bilingual form validation in Next.js by defining a shared schema that enforces field correctness and maps to bilingual i18n error messages, ensuring consistent validation and accessible error states on both client and server.

What is the best way to handle contact form accessibility and errors in a bilingual Next.js site?

The best way to handle contact form accessibility in a bilingual Next.js site is to use inline success and error states with `aria-invalid` and `aria-describedby` attributes, mapping zod validation errors to bilingual i18n keys for screen reader support.

Does Resend work with Next.js API routes for transactional email delivery?

Yes, Resend works with Next.js API routes by sending payloads from a POST `/api/contact` route using the Node runtime, setting the Reply-To header to the user email to ensure direct replies reach your configured destination inbox.

Why does my Next.js contact form submit stub not deliver emails end-to-end?

Your Next.js contact form submit stub does not deliver emails because it lacks a server-side API route with real email integration; replacing fake client-side stubs with a Resend-backed POST route ensures actual end-to-end delivery.