What problem does it solve? Server-side code between the API contract and the datastore often grows without clear layering, consistent error handling, or safe background job patterns, leading to silent failures, duplicate side effects, and tangled dependencies. This Skill provides concrete patterns for structuring that middle layer so services fail loudly, retry safely, and stay testable. ## Core Features & Use Cases - Layering and boundaries: Applies ports-and-adapters architecture, the repository-vs-service split, and a composition root, including a six-step migration playbook for entangled legacy code and a checklist for adding new integrations cleanly. - Error taxonomy and resilience: Defines typed error hierarchies per language (TypeScript, Python, Go), retry with exponential backoff and jitter, circuit breakers, idempotency keys, and safe third-party email/webhook delivery. - Background jobs and queues: Covers queue backend selection (BullMQ, SQS, Postgres-based pg-boss/graphile-worker), per-queue worker concurrency sizing, dead-letter queues with replay paths, and queue observability. - Specialized pipelines: Includes NestJS project structure and bootstrap conventions, regex-first LLM pipelines with confidence scoring and cost-aware model routing, and scheduled collect/enrich/store scraping pipelines with prompt-injection defenses. - Use Case: When adding a new payment integration to a NestJS service, use this Skill to define a vendor-neutral port, write the adapter, wire it in the composition root, and enforce idempotency on the charge job. ## Quick Start Ask the assistant to design the service layer and error handling for a new backend feature, for example: structure a NestJS module with a retry-safe background job that charges a customer idempotently.