Type safe and validated Server Actions in your Next.js (App Router) project.
next-safe-action is a Next.js App Router project whose skills help an AI agent build type-safe, validated Server Actions, covering client and action definition with Standard Schema validators such as Zod, Yup and Valibot. Its skills also address forms (react-hook-form adapters, native HTML forms, and file uploads), React hooks with optimistic updates, middleware for authentication, authorization and rate limiting, Better Auth integration, validation error handling, and Vitest-based testing. The collection stands out for its end-to-end coverage, from schema validation through to testing action behavior.
Skills
9 skills · 1 stars
Safe Action Advanced Use when working with bind arguments, metadata schemas, framework errors (redirect/notFound/forbi…
Safe Action Better Auth Use when adding authentication or authorization to safe actions with Better Auth -- covers better…
Safe Action Client Use when creating or configuring a next-safe-action client, defining actions with input/output va…
Safe Action Forms Use when integrating next-safe-action with forms -- react-hook-form adapter (useHookFormAction, u…
Safe Action Hooks Use when executing next-safe-action actions from React client components or building optimistic U…
Safe Action Middleware Use when implementing middleware for next-safe-action -- authentication, authorization, logging,…
Safe Action Tanstack Query Use when integrating next-safe-action with TanStack Query (React Query) -- mutationOptions(), use…
Safe Action Testing Use when writing tests for next-safe-action actions or hooks -- Vitest patterns for testing serve…
Safe Action Validation Errors Use when working with validation errors -- returnValidationErrors, formatted vs flattened shapes,…