UNPKG

claude-code-templates

Version:

CLI tool to setup Claude Code configurations with framework-specific commands, automation hooks and MCP Servers for your projects

51 lines (37 loc) 1.25 kB
# 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.