API Endpoint Generator

Command

by davila7 · Added 5mo ago

Claude

Install

npx claude-code-templates@latest --command=cli-tool/templates/javascript-typescript/.claude/commands --yes

Add to Claude

claude mcp add api-endpoint-generator

About

API Endpoint Generator

Generate a complete API endpoint for $ARGUMENTS following project conventions.

Task

I'll analyze the project structure and create a new API endpoint with:

  1. Route definition
  2. Controller/handler function
  3. Input validation
  4. Service layer logic (if applicable)
  5. Data access layer (if applicable)
  6. Unit tests
  7. Documentation

Process

I'll follow these steps:

  1. Examine the project structure to understand the architecture pattern
  2. Identify existing patterns for routes, controllers, and validation
  3. Create all necessary files following project conventions
  4. Implement the endpoint with proper error handling
  5. Add appropriate tests
  6. Document the new endpoint

Best Practices

I'll ensure the implementation includes:

  • Strong typing with TypeScript
  • Comprehensive error handling
  • Input validation
  • Security considerations (authentication/authorization)
  • Proper logging
  • Performance considerations
  • Test coverage

Adaptability

I'll adapt to various API architectures:

  • Express/Koa/Fastify REST APIs
  • GraphQL resolvers
  • Next.js/Nuxt.js API routes
  • Serverless functions
  • tRPC endpoints
  • NestJS controllers

I'll examine your project first to determine which pattern to follow.

Tags

CodeAnalysisaitmplclaude-code-templates

From Our Store

View all →
Claude Code

Claude Code Power User Kit

$39+

Advanced Claude Code skills and configurations

OpenClaw

OpenClaw Business Starter Kit

$59+

Set Up Your AI Assistant in 60 Minutes