api-endpoint

Generate secure Next.js API endpoints with Firebase auth and validation.

Updated Dec 15, 2025
One-click install
npx skills add https://github.com/jhlee0409/sidedish --skill api-endpoint-jhlee0409
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-endpoint
Source: https://github.com/jhlee0409/sidedish/tree/main/.claude/skills/api-endpoint
Command: npx skills add https://github.com/jhlee0409/sidedish --skill api-endpoint-jhlee0409

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Next.js App Router 기반 RESTful 엔드포인트를 쉽게 만들고 보안 파이프라인을 적용합니다.

Core Features & Use Cases

  • Protected endpoints: 인증 확인 및 권한 부여 패턴
  • Validation: security-utils를 활용한 입력 검증
  • Cursor-based pagination & consistent responses: 일관된 응답 형식

Quick Start

템플릿을 따라 새로운 보호된 POST 엔드포인트를 생성합니다.

Frequently Asked Questions about api-endpoint

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

FAQPage Schema
How do I create secure REST API endpoints in Next.js with authentication?

Secure REST API endpoints in Next.js use Firebase authentication checks via verifyAuth before processing requests. This Skill generates GET, POST, PATCH, and DELETE routes with built-in auth validation, returning appropriate HTTP status codes and Korean error messages to enforce access control.

How do I add input validation to Next.js API routes?

Input validation in Next.js API routes uses security utilities to sanitize and verify incoming data before processing. This Skill integrates validation logic into endpoint templates, catching malformed requests early and returning descriptive errors.

Can I implement pagination and rate limiting in Next.js API endpoints?

Pagination and rate limiting in Next.js API endpoints are implemented through cursor-based pagination logic and rate-limiter configs applied at route level. This Skill scaffolds both patterns into endpoint templates with consistent response formats.

How do I handle file uploads securely in Next.js API routes?

File uploads in Next.js API routes require validation against CONTENT_LIMITS and authentication checks before storage. This Skill provides endpoint templates that enforce file-size restrictions and auth verification within the upload flow.

What's the best way to structure protected API routes in Next.js App Router?

Protected API routes in Next.js App Router follow a consistent template pattern: auth verification, input validation, business logic, and standardized response formatting. This Skill generates pre-configured route handlers for src/app/api that enforce this pipeline automatically.

Does this approach work with Firebase authentication?

Yes. This Skill is built specifically for Firebase-backed Next.js endpoints, using Firebase auth verification as the foundation for all protected routes and integrating Firebase credentials into the request pipeline.