api

Builds Server Actions and API Routes in Next.js with Zod validation and standardized error handling.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/echarabati/adi-capital-admin --skill api-echarabati
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api
Source: https://github.com/echarabati/adi-capital-admin/tree/main/.agent/skills/domains/api
Command: npx skills add https://github.com/echarabati/adi-capital-admin --skill api-echarabati

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the development of secure and efficient APIs and Server Actions within a Next.js application, ensuring data integrity and consistent error handling.

Core Features & Use Cases

  • Server Actions: Implement mutations and data mutations directly from React UI components.
  • API Routes: Create RESTful endpoints for external services, webhooks, and mobile clients.
  • Input Validation: Enforce data integrity using Zod schemas at the application boundary.
  • Standardized Error Handling: Maintain consistent API responses with predefined error codes.
  • Use Case: Automatically validate and process user registration data submitted through a form, then create a new user record in the database using a Server Action.

Quick Start

Use the api skill to create a new user with the email '[email protected]' and name 'Test User'.

Frequently Asked Questions about api

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

FAQPage Schema
How do I validate input in Next.js Server Actions?

You validate input in Next.js Server Actions by enforcing data integrity at the application boundary using Zod schemas, ensuring secure mutations directly from React UI components. This framework provides standardized patterns for processing form submissions.

What's the best way to handle webhooks in Next.js API Routes?

Handling webhooks in Next.js API Routes is best accomplished using a standardized framework that provides consistent error handling patterns for external-facing endpoints. This approach ensures secure authentication and reliable processing of incoming webhook payloads.

Does this API framework support both REST endpoints and Server Actions?

Yes, this API framework supports both REST endpoints and Server Actions in Next.js applications. It covers patterns for GET, POST, PATCH, and DELETE requests for external services, alongside direct data mutations from React components.

How do I standardize error handling across Next.js API Routes?

You standardize error handling across Next.js API Routes by implementing consistent API responses with predefined error codes. This framework ensures both client-facing and external-facing endpoints maintain uniform error boundaries.

Can I use Zod for authentication and validation in Next.js API Routes?

Yes, you can use Zod for input validation in Next.js API Routes alongside secure authentication patterns. This combination enforces data integrity at the application boundary for both Server Actions and external RESTful endpoints.