From skillz
Use when building or refactoring backend API endpoints. Applies a clean layering — thin route handler, service layer for business logic, repository for data access — with input validation, consistent error handling, and dependency injection, so endpoints stay testable, secure, and easy to extend.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skillz:api-service-patternThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Keep backend code clean and testable by separating concerns. Endpoints rot when route handlers hold business logic and raw SQL. This skill applies a thin-handler / service / repository layering with validation and consistent errors, the structure that keeps APIs maintainable and safe.
Keep backend code clean and testable by separating concerns. Endpoints rot when route handlers hold business logic and raw SQL. This skill applies a thin-handler / service / repository layering with validation and consistent errors, the structure that keeps APIs maintainable and safe.
Use when adding a new endpoint, refactoring a fat route handler, building a backend service, or standardizing how an API handles validation and errors.
Good: POST /orders handler validates the body, calls order_service.create(...), which applies rules and calls order_repo.insert(...); a domain OutOfStockError maps to HTTP 409; unit tests cover the service with a fake repo.
Bad: A route handler that validates nothing, builds an INSERT via f-string from the request body, runs it inline, and returns the raw DB exception to the client.
Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub tanveerriaz/skillz --plugin skillz