joabgonzalez/ai-agents-skills/backend-dev
Claude Code and agent skill by joabgonzalez/ai-agents-skills
- community
Checking that the SKILL.md file is still in the repository.
Backend development workflow with API design and data modeling. Trigger: When building, refactoring, or scaling backend apps.
Install
npx vskill@latest install joabgonzalez/ai-agents-skills/backend-devSKILL.md
The same SKILL.md was published earlier as joabgonzalez/ai-agents-skills/backend-dev.
Backend Development
Universal backend workflow guiding API design, data modeling, error handling, and deployment. Technology-agnostic, orchestrates technical skills (nodejs, express, nest) without duplicating patterns.
When to Use
- Designing, building, or refactoring APIs
- Modeling data and business logic
- Preparing for deployment or CI/CD
- Reviewing code quality
Don't use for:
- Technology-specific code (use nodejs, express, nest skills)
- Frontend development (use frontend-dev skill)
Critical Patterns
✅ REQUIRED: API Design with Versioning
Define clear, versioned contracts to prevent breaking changes.
Decision Tree:
Implementation: Delegate to framework skills (express, nest, hono)
✅ REQUIRED: Data Modeling with Validation
Validate at boundaries and separate domain logic from persistence.
Decision Tree:
Implementation: Delegate to form-validation for validation patterns
✅ REQUIRED: Centralized Error Handling
Consistent error responses and logging across all endpoints.
Decision Tree:
Implementation: Delegate to framework skills (express, nest)
Error Categories:
- Validation errors (400): Input doesn't match schema
- Authentication errors (401): Missing or invalid credentials
- Authorization errors (403): Valid credentials, insufficient permissions
- Not found errors (404): Resource doesn't exist
- Conflict errors (409): State conflict (e.g., duplicate email)
- Server errors (500): Unhandled exceptions
✅ REQUIRED: Environment-Based Configuration
Never hardcode config values. Use environment variables.
Decision Tree:
Implementation: Delegate to nodejs for process.env patterns
✅ REQUIRED: API Contract Design
When designing API contracts:
- Identify resources: What entities exist? (users, products, orders)
- Define operations: CRUD (POST create, GET read, PATCH update, DELETE delete)
- Model relationships: users.orders (1:N), orders.products (N:M)
- Version from start: Start with /api/v1 (easier to add v2 later)
Red Flags:
- Non-RESTful URLs: /api/getUserById?id=123 (use GET /api/v1/users/123)
- Verbs in URLs: /api/deleteUser (use DELETE /api/v1/users/:id)
- No versioning: /api/users (add /v1 from start)
✅ REQUIRED: Data Persistence Strategy
Decision Tree:
Implementation: Delegate to nodejs for database patterns
✅ REQUIRED: Performance Optimization
When to optimize:
- Measure FIRST (APM tools, profiling, load testing)
- Identify bottlenecks (slow queries, N+1 problems, large payloads)
- Apply targeted fixes (NOT premature optimization)
Common Optimizations:
- Database queries: Add indexes, use EXPLAIN ANALYZE, fix N+1 queries
- Caching: Redis for frequently accessed data (user sessions, product catalog)
- Pagination: Limit list endpoints to 50-100 items per page
- Compression: gzip middleware for response bodies
- Rate limiting: Prevent abuse, protect from DDoS
Red Flags (Premature Optimization):
- Caching everything "just in case"
- Denormalizing database before profiling queries
- Optimizing endpoints with <100 requests/day
Decision Tree
Example
Building a POST /api/v1/orders endpoint end-to-end: validation → service → repository → response.
Patterns applied: /api/v1 versioning, zod boundary validation, service owns business rules, repository abstracts DB, centralized error format.
Edge Cases
- Data migration failures: Always implement rollback strategy. Use transactions for multi-step migrations. Test migrations on staging data first.
- API versioning and backward compatibility: Maintain old versions until all clients migrate. Document deprecation timeline (e.g., "v1 deprecated 2026-06-01, removed 2026-09-01").
- Security edge cases: Validate all inputs to prevent injection attacks. Implement rate limiting per endpoint. Use parameterized queries for SQL. Sanitize user input before logging.
- Race conditions: Use database transactions for operations that must be atomic. Implement optimistic locking for concurrent updates. Consider distributed locks for multi-instance deployments.
- Large response payloads: Implement pagination for list endpoints. Use streaming for large files. Consider compression (gzip) for response bodies.
Checklist
- [ ] API endpoints versioned (/api/v1, /api/v2)
- [ ] Input validation at all boundaries (zod, yup, joi)
- [ ] Centralized error handling middleware
- [ ] Environment variables for all configuration
- [ ] Database migrations tested with rollback
- [ ] Authentication and authorization on protected routes
- [ ] Rate limiting implemented on public endpoints
- [ ] Logging with context (request ID, user ID, timestamp)
- [ ] API documentation up-to-date (OpenAPI, Swagger)
- [ ] Unit tests for business logic (>=80% coverage)
- [ ] Integration tests for critical flows
- [ ] CI/CD pipeline configured (build, test, deploy)
- [ ] Health check endpoint (/health, /ping)
- [ ] Monitoring and alerting configured (errors, performance)
Workflow
E2E Development Workflow:
- brainstorming → Evaluate alternatives, high-level planning
- writing-plans → Break into executable tasks (2-5 min, file paths)
- backend-dev (this skill) → Apply Backend Developer thinking and architecture
- plan-execution → Execute in batches of 3 with checkpoints
- verification-protocol → Verify each task (IDENTIFY → RUN → READ → VERIFY → CLAIM)
- code-review → Two-stage review (spec compliance → code quality)
Resources
- code-conventions - Code organization and naming
- architecture-patterns - Design patterns (Repository, Service Layer, Clean Architecture)
- result-pattern - Typed error handling in services and controllers
- circuit-breaker-pattern - Fault tolerance for external API and DB calls
- state-machines-pattern - Explicit state modeling for workflows (orders, approvals)
- nodejs - Node.js runtime patterns
- typescript - Type-safe backend development
- form-validation - Input validation with zod/yup
- express - Express.js framework patterns
- nest - NestJS framework patterns
- hono - Hono framework patterns
- https://restfulapi.net/ - REST API design best practices
- https://swagger.io/docs/ - OpenAPI/Swagger documentation
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/backend-dev/SKILL.md
Popularity
- Repository stars
- 9
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/joabgonzalez/ai-agents-skills/backend-dev)