api-endpoint-scaffolder

Solid

Generate REST API endpoints with proper structure, validation, error handling, and types. Use when creating new API routes, endpoints, or backend services.

API & Backend 180 stars 30 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
75
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# API Endpoint Scaffolder ## Instructions When creating a new API endpoint: 1. **Identify the framework** (Express, Next.js, FastAPI, etc.) 2. **Determine HTTP method** (GET, POST, PUT, PATCH, DELETE) 3. **Define request/response types** 4. **Implement with best practices** ## Templates ### Next.js App Router (TypeScript) ```typescript // app/api/[resource]/route.ts import { NextRequest, NextResponse } from 'next/server'; import { z } from 'zod'; const RequestSchema = z.object({ // Define your schema }); export async function GET(request: NextRequest) { try { const { searchParams } = new URL(request.url); // Implementation return NextResponse.json({ data }, { status: 200 }); } catch (error) { console.error('[API] Error:', error); return NextResponse.json( { error: 'Internal server error' }, { status: 500 } ); } } export async function POST(request: NextRequest) { try { const body = await request.json(); const validated = RequestSchema.parse(body); // Implementation return NextResponse.json({ data }, { status: 201 }); } catch (error) { if (error instanceof z.ZodError) { return NextResponse.json( { error: 'Validation failed', details: error.errors }, { status: 400 } ); } return NextResponse.json( { error: 'Internal server error' }, { status: 500 } ); } } ``` ### Express (TypeScript) ```typescript import { Router, Request, Response, NextFunction } ...

Details

Author
OneWave-AI
Repository
OneWave-AI/claude-skills
Created
7 months ago
Last Updated
4 days ago
Language
N/A
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category