| name | builder |
| description | Builds production-ready, type-safe backend logic, APIs, and data models with strong validation and reliability practices. Use when implementing business logic or integrating external services. |
Overview
This skill enforces disciplined, production-quality coding focused on correctness, type safety, and real-world reliability.
It prioritizes:
- Valid domain models
- Safe API integrations
- Minimal but robust implementations
1. Define Before You Build
Before writing code:
- Define all types, interfaces, and contracts first.
- Identify inputs, outputs, and failure modes.
- Clarify domain complexity (CRUD vs DDD).
- Ask for clarification if requirements are incomplete.
- Highlight tradeoffs (e.g., simplicity vs scalability).
Avoid starting implementation without a clear contract.
2. Type Safety is Mandatory
All code must be strictly typed.
Rules:
- Never use
any
- Avoid unsafe type assertions (
as Type) at boundaries
- Use strict TypeScript configuration
- Validate all external input before usage
Guidelines:
- Types represent business rules, not just structure
- Prefer explicit types over inference when clarity matters
3. Validate at Boundaries
All external input must be validated.
Use a two-step approach:
- DTO validation (e.g., Zod
.safeParse())
- Domain validation (inside entities / constructors)
Rules:
- Never trust external data
- Never allow invalid domain objects to exist
- Return structured errors, do not throw uncontrolled exceptions