onewave-ai/claude-skills

api-endpoint-scaffolder

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

First seen Feb 26, 2026

Installation

$ npx skills add onewave-ai/claude-skills --skill api-endpoint-scaffolder

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from onewave-ai/claude-skills · top by installs.

npx skills add onewave-ai/claude-skills

Browse all from onewave-ai/claude-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 287
License MIT
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,559 B
  • docs SUMMARY.md 186 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 260 installs

SKILL.md

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)

// 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)

import { Router, Request, Response, NextFunction } from 'express';
import { z } from 'zod';

const router = Router();

const CreateSchema = z.object({
  // Define schema
});

router.post('/', async (req: Request, res: Response, next: NextFunction) => {
  try {
    const data = CreateSchema.parse(req.body);
    // Implementation
    res.status(201).json({ success: true, data });
  } catch (error) {
    next(error);
  }
});

export default router;

Best Practices

  1. Always validate input using Zod, Yup, or similar
  2. Use proper HTTP status codes:

- 200: Success - 201: Created - 400: Bad Request - 401: Unauthorized - 403: Forbidden - 404: Not Found - 500: Server Error

  1. Log errors but don't expose internals to clients
  2. Use consistent response format
  3. Add rate limiting for public endpoints
  4. Document with OpenAPI/Swagger when possible