api-routes

Create Next.js API routes with Clerk authentication, Zod validation, and Prisma integration.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/code-craka/afilo-nextjs-shopify-app --skill api-routes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-routes
Source: https://github.com/code-craka/afilo-nextjs-shopify-app/tree/main/.claude/skills/api-routes
Command: npx skills add https://github.com/code-craka/afilo-nextjs-shopify-app --skill api-routes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill tackles the challenges of inconsistent API development, security vulnerabilities, and inefficient data handling in Next.js applications. It provides standardized patterns for building robust, secure, and scalable API endpoints.

Core Features & Use Cases

  • Standardized API Patterns: Offers guidelines for implementing authentication, input validation, consistent error handling, and rate limiting.
  • Database Integration: Provides best practices for integrating Prisma ORM within API routes for efficient data operations.
  • Security Best Practices: Ensures API endpoints are protected against common vulnerabilities through input sanitization and secrets management.
  • Use Case: A developer needs to create a new API endpoint for managing user subscriptions. This skill guides them through implementing proper authentication with Clerk, validating input data using Zod, handling potential errors gracefully, and integrating with the Prisma database.

Quick Start

Use the api-routes skill to create a new Next.js API route at /api/users/[id] that fetches a user's profile, ensuring it's protected by Clerk authentication and validates the user ID format.