nextjs-server-action-validation

Community

Validate Next.js Server Actions before they touch data

Authorjacob-balslev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents untrusted user input from reaching Next.js Server Actions and databases by enforcing authentication, schema validation, and tenant/org authorization in a safe order.

Core Features & Use Cases

  • Enforces validation order: authenticate first, then validate with Zod, then apply org-scoping checks before any database access.
  • Uses safe parsing and controlled error surfaces: returns structured errors via safeParse to avoid leaking stack traces or query details.
  • Supports secure multi-tenant writes: requires database calls to go through an org-scoped query helper (e.g., orgQuery) after input is validated.

Quick Start

Use the nextjs-server-action-validation skill when implementing a Next.js Server Action endpoint that receives user-submitted form data, and structure it to run getServerSession authentication and Schema.safeParse validation before any database call.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: nextjs-server-action-validation
Download link: https://github.com/jacob-balslev/skill-graph/archive/main.zip#nextjs-server-action-validation

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.