What problem does it solve? Building server actions in Next.js without a structured pattern leads to inconsistent authentication checks, missing input validation, and scattered error handling across your codebase. This Skill provides a standardized pattern for creating type-safe, tenant-scoped server actions using next-safe-action in the DropFlow project. ## Core Features & Use Cases - Middleware Chains: Compose reusable clients like authAction and adminAction that inject authenticated context (userId, tenantId, tenantPrisma) into every action. - Schema-Validated Actions: Define actions with Zod schemas from @dropflow/types so inputs are parsed and validated before execution. - Optimistic Updates: Use useOptimisticAction on the client to update UI state immediately while the server mutation runs. - Use Case: When adding a new createOrder action in actions/orders/create-order.ts, follow this pattern to get authentication, tenant isolation, validation, and cache revalidation with minimal boilerplate. ## Quick Start Ask the AI to create a new authenticated server action for a specific domain following the next-safe-action pattern in this project.