← ClaudeAtlas

integrate-internal-serviceslisted

Use when one backend service calls or consumes from another inside the same platform — synchronous RPC (a uniform request/response envelope + server-side message handlers), SNS→SQS event fan-out (one topic → many subscriber queues), async-consumer robustness (ack vs DLQ + lifecycle hooks), cross-service reads (batch + cache, no network N+1), identity/context propagation across hops, and the worker/consumer service shape (no HTTP, graceful drain). NestJS/TS reference, framework-flexible. Complements write-service-code §6 (single producer→consumer events) and §9 (client-proxy lifecycle).
kennguyen887/agent-foundation · ★ 1 · API & Backend · score 77
Install: claude install-skill kennguyen887/agent-foundation
# Integrate internal services How services in the SAME platform talk to each other — sync RPC, async fan-out, robust consumers, cross-service reads, context propagation, and the worker shape. Examples NestJS/TS, neutral `listing`/`order`/`payment` domain; `<Svc>` is a placeholder. principle → **▸ Example** → **▸ Other stacks**. The *client* side of a call (proxy lifecycle/retries/base `send()`) and the single producer→consumer event live in `write-service-code` §6/§9 — this skill is the rest of the mesh. For third-party/vendor systems and inbound webhooks, see `integrate-external-services`. ## When to use You're exposing an operation for another service to call, fanning one event out to many subscribers, hardening a queue consumer, resolving data that lives in another service, or building a pure worker. ## 1. Synchronous RPC — server side + a uniform envelope - **Expose operations via a message-pattern handler** (the reply side); the *client* side (proxy lifecycle, retries, base `send()`) is `write-service-code` §9. Keep the handler thin — delegate to a command/query bus. - **Wrap every request and reply in a stable envelope, never bare payloads.** Request carries `{ id (correlation), service (caller), pattern, input }`; reply carries `{ success, data, message, statusCode }`. One shared **interceptor** builds the success reply + logs `id`/`pattern`; one shared **exception filter** maps a thrown error to a failed envelope — so every caller gets the same shape an