new-api-route

Scaffold authenticated Next.js API routes with requireAuth, validation, and rate limiting.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ebenfc/bird-photo-gallery --skill new-api-route-ebenfc
Or copy as Structured Prompt for Agentâ–¼
Please help me install this Agent Skill.
Skill: new-api-route
Source: https://github.com/ebenfc/bird-photo-gallery/tree/main/.claude/skills/new-api-route
Command: npx skills add https://github.com/ebenfc/bird-photo-gallery --skill new-api-route-ebenfc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation of new API endpoints by providing a standardized, secure, and convention-compliant template, ensuring consistency and reducing boilerplate code.

Core Features & Use Cases

  • Boilerplate Generation: Automatically creates the file structure and essential code for a new API route.
  • Authentication Integration: Includes built-in authentication checks using requireAuth() for secure endpoints.
  • Convention Enforcement: Ensures adherence to project-specific patterns for database access, validation, and rate limiting.
  • Use Case: When developing a new feature that requires a backend API endpoint to manage user-specific data, use this Skill to quickly scaffold the route, ensuring it's properly authenticated and follows best practices.

Quick Start

Use the new-api-route skill to create an authenticated GET endpoint at the path '/users/profile'.

Frequently Asked Questions about new-api-route

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

FAQPage Schema
How do I scaffold an authenticated API route in Next.js?â–¼

To scaffold an authenticated Next.js API route, use this skill to generate boilerplate code with built-in requireAuth() checks, ensuring secure data handling and reducing manual setup for new backend endpoints.

What conventions are enforced when creating new backend API endpoints?â–¼

Creating new backend API endpoints enforces conventions for authentication, data isolation via userId, input validation, rate limiting, and cache invalidation to ensure secure and consistent data handling.

Does this scaffolding tool work with existing Next.js backend patterns?â–¼

Yes, this scaffolding tool works with existing Next.js backend patterns by applying standardized templates for database access and secure data handling directly within your application's established conventions.

How do I add rate limiting and cache invalidation to a Next.js API route?â–¼

Add rate limiting and cache invalidation to a Next.js API route by generating the endpoint with this scaffolding tool, which automatically includes these project-specific security and performance patterns.

What's the best way to isolate user data in new Next.js backend endpoints?â–¼

The best way to isolate user data in new Next.js backend endpoints is to scaffold the route with built-in authentication and userId data isolation patterns, ensuring secure management of user-specific data.