api-endpoint
From davila7
Generate a complete API endpoint for $ARGUMENTS following project conventions.
Install
/api-endpointFacts
- Repository
- davila7/claude-code-templates
- Status
- Actively maintained
- Last commit
Source preview
The instructions Claude Code reads when this command runs.
# API Endpoint Generator
Generate a complete API endpoint for $ARGUMENTS following project conventions.
## Task
Create a new API endpoint with all necessary components:
1. **Analyze project architecture**: Examine existing API structure, patterns, and conventions
2. **Identify framework**: Determine if using Express, Fastify, NestJS, Next.js API routes, or other framework
3. **Check authentication**: Review existing auth patterns and middleware usage
4. **Examine data layer**: Identify database/ORM patterns (Prisma, TypeORM, Mongoose, etc.)
5. **Create endpoint structure**: Generate route, controller, validation, and service layers
6. **Implement business logic**: Add core functionality with proper error handling
7. **Add validation**: Include input validation using project's validation library
8. **Create tests**: Write unit and integration tests following project patterns
9. **Update documentation**: Add endpoint documentation (OpenAPI/Swagger if used)
## Implementation Requirements
- Follow project's TypeScript conventions and interfaces
- Use existing middleware patterns for auth, validation, logging
- Include proper HTTP status codes and error responses
- Add comprehensive input validation and sanitization
- Implement proper logging and monitoring
- Consider rate limiting and security headers
- Follow project's database transaction patterns
## Framework-Specific PatView full source on GitHub →Other slash commands
feature-development
★ 229,918Workflow command scaffold for feature-development in everything-claude-code.
affaan-mupdated 15d agoMITdatabase-migration
★ 229,918Workflow command scaffold for database-migration in everything-claude-code.
affaan-mupdated 15d agoMITadd-language-rules
★ 229,918Workflow command scaffold for add-language-rules in everything-claude-code.
affaan-mupdated 15d agoMITcommit-push-pr
★ 137,934Commit, push, and open a PR
anthropicsupdated 14d agodedupe
★ 137,934Find duplicate GitHub issues
anthropicsupdated 14d agotriage-issue
★ 137,934Triage GitHub issues by analyzing and applying labels
anthropicsupdated 14d ago