next-safe-action

9 mods across 1 repository, 0 stars between them.

next-safe-action/skills

Skill Claude CodeCodex

Use when working with bind arguments, metadata schemas, framework errors (redirect/notFound/forbidden/unauthorized), type inference utilities (InferSafeActionFnInput/Result), or server-level action callbacks.

0 1mo ago A 45 tokens

next-safe-action/skills

Skill Claude CodeCodex

Use when adding authentication or authorization to safe actions with Better Auth -- covers betterAuth() middleware setup, typed session context (BetterAuthContext), custom authorize callbacks (AuthorizeFn), unauthorized() handling, nextCookies() configuration, and Next.js authInterrupts setup.

0 1mo ago A 57 tokens

safe-action-client

03

next-safe-action/skills

Skill Claude CodeCodex

Use when creating or configuring a next-safe-action client, defining actions with input/output validation, handling server errors, or setting up createSafeActionClient with Standard Schema (Zod, Yup, Valibot).

0 1mo ago A 46 tokens

safe-action-forms

04

next-safe-action/skills

Skill Claude CodeCodex

Use when integrating next-safe-action with forms -- react-hook-form adapter (useHookFormAction, useHookFormOptimisticAction, mapToHookFormErrors), native HTML forms, bind arguments, or file uploads.

0 1mo ago A 47 tokens

safe-action-hooks

05

next-safe-action/skills

Skill Claude CodeCodex

Use when executing next-safe-action actions from React client components -- useAction, useOptimisticAction, handling status/callbacks (onSuccess/onError/onSettled), execute vs executeAsync, or optimistic UI updates.

0 1mo ago A 47 tokens

next-safe-action/skills

Skill Claude CodeCodex

Use when implementing middleware for next-safe-action -- authentication, authorization, logging, rate limiting, error interception, context extension, or creating standalone reusable middleware with createMiddleware() or createValidatedMiddleware(). Covers both use() (pre-validation) and useValidated()…

0 1mo ago A 61 tokens

next-safe-action/skills

Skill Claude CodeCodex

Use when integrating next-safe-action with TanStack Query (React Query) -- mutationOptions(), useMutation, ActionMutationError error handling, type guards, optimistic updates via query cache, query invalidation after mutations.

0 1mo ago A 48 tokens

safe-action-testing

08

next-safe-action/skills

Skill Claude CodeCodex

Use when writing tests for next-safe-action actions or hooks -- Vitest patterns for testing server actions directly, middleware behavior, hooks with React Testing Library, validation errors, and server errors.

0 1mo ago A 40 tokens

next-safe-action/skills

Skill Claude CodeCodex

Use when working with validation errors -- returnValidationErrors, formatted vs flattened shapes, custom validation error shapes, throwValidationErrors, or displaying field-level and form-level errors.

0 1mo ago A 38 tokens