integration-pattern-selection
Select integration pattern between services — sync (request-response, RPC) / async (queue, pub/sub, stream) / saga (orchestration vs choreography) / outbox / CDC / polling / webhook. Trade-offs explicit.
What this skill does
# Integration Pattern Selection
You pick the right integration pattern between services. Patterns trade consistency, coupling, latency, and complexity — no free lunch.
## Core rules
- **Sync by default for simple calls; async when decoupling matters**
- **Dual-write is a trap** — use outbox or CDC to avoid losing messages on crash
- **Saga over distributed transactions** — 2PC across services is rarely worth it
- **Idempotency is mandatory** for async + retry-capable flows
- **Retry budgets + DLQs** — retries without a ceiling cause cascading failure
- **No fabricated service relationships** — work from supplied facts
## Input handling
| Dimension | Required | Default |
|---|---|---|
| **Source + target services** | Yes | — |
| **What's being integrated** (data / event / command) | Yes | — |
| **Consistency need** | Yes | — |
| **Latency tolerance** | No | Asked |
| **Ownership boundaries** (same team / different team) | No | Asked |
| **Existing broker / API** | No | Asked |
## Phase 1 — Setup
```
**Source**: [service / system]
**Target(s)**: [services / systems]
**What**: [data sync / event notification / command / workflow]
**Consistency**: [strong / read-your-write / eventual / none]
**Latency**: [ms tolerance]
**Ownership**: [same team / cross-team / external partner]
**Volume**: [events/s or calls/s]
**Existing infra**: [broker / API gateway / none]
**Failure tolerance**: [can't lose / can retry / lossy ok]
```
Ask render mode per `diagram-rendering` mixin and output path (default: `/documentation/[case]/integration-pattern-selection/`).
## Phase 2 — Pattern catalog
### Synchronous request-response (HTTP / gRPC)
**When to use**: simple read / command with immediate response / low coordination / small number of dependencies
**When not**: target slow or unreliable, cross-team decoupling desired, long-running workflow
**Trade-offs**: simplicity + strong consistency vs tight coupling + cascade failure risk + latency addition
**Failure mode**: target down → caller down (unless circuit breaker + fallback)
**Idempotency**: required on retries for non-GET
### Asynchronous message queue (point-to-point)
**When to use**: work handoff / load leveling / decoupled processing / can tolerate latency
**When not**: need immediate response / ordering across many consumers required
**Trade-offs**: decoupling + load absorption vs eventual consistency + operational broker + harder debugging
**Failure mode**: consumer slow → queue grows; use backpressure + DLQ
**Idempotency**: mandatory
### Pub/Sub (fan-out)
**When to use**: event notification / multiple consumers / loose coupling
**When not**: strict exactly-once semantics / state-transfer where large payload
**Trade-offs**: broadcast + loose coupling vs downstream coupling to event shape + schema evolution discipline
**Failure mode**: slow consumer → lag; monitor consumer lag
**Idempotency**: mandatory
### Event streaming (log-based, e.g. Kafka)
**When to use**: replay / audit / multiple consumers / ordering per key / real-time analytics
**When not**: small scale (broker ops overkill) / simple work queue
**Trade-offs**: replay + ordering + scale vs ops burden + partition-key discipline
**Failure mode**: consumer crash → resume from offset; partition skew if key distribution uneven
**Idempotency**: mandatory
### Saga (orchestration)
**When to use**: distributed workflow with coordination + compensations / need central visibility / complex branching
**When not**: trivial 2-step workflow / teams reject central coordinator
**Trade-offs**: central visibility + easier monitoring vs orchestrator becomes coupling point / SPOF
**Failure mode**: orchestrator down → workflow stalled; compensations run on step failure
**Tools**: Camunda, Temporal, AWS Step Functions
### Saga (choreography)
**When to use**: simple workflow / each service reacts to events / team autonomy prioritized
**When not**: complex branching / need single source of workflow truth
**Trade-offs**: decentralized + team autonomy vs emergent complexity + hard to trace
**Failure mode**: skipped event → workflow diverges; needs strong observability
### Transactional outbox
**When to use**: you need to write DB + publish event atomically
**When not**: producer doesn't own a relational DB that can do the outbox table
**Trade-offs**: avoids dual-write problem + exactly-once producer-side vs extra moving part (relay) + DB bloat if not purged
**Failure mode**: relay down → events delayed; consumer deduplicates by event id
### Change Data Capture (CDC)
**When to use**: integrate with legacy systems owning the DB / stream DB changes as events / replicate to analytics store
**When not**: application events are semantically richer than DB changes / DB tightly coupled to internal model
**Trade-offs**: no app changes required + comprehensive vs leaks internal schema + downstream couples to table structure
**Failure mode**: schema change breaks downstream — governance + contract needed
**Tools**: Debezium, AWS DMS, Maxwell
### Polling
**When to use**: target can't push / partner lacks webhook / simple + low volume
**When not**: high-volume, real-time needed — wasteful + latent
**Trade-offs**: simple + works anywhere vs wasteful + latent + load on target
**Failure mode**: poll storm if many clients; add jitter + backoff
### Webhook callback
**When to use**: external event delivery / async notification to partner / async job completion
**When not**: caller can't host HTTP / strict ordering needed
**Trade-offs**: push to consumers + real-time vs delivery guarantees harder to enforce without retry + signature
**Hand-off**: `webhook-design` for full treatment
### RPC over queue (async RPC)
**When to use**: request-response semantics over async transport / rare but applicable for bursty loads
**When not**: simple low-latency RPC (use gRPC direct)
**Trade-offs**: decoupling + buffering vs adds correlation-id plumbing + latency
## Phase 3 — Decision factors
| Factor | What it captures |
|---|---|
| **Consistency need** | Strong / read-your-write / eventual |
| **Latency tolerance** | ms budget |
| **Coupling** | How tightly coupled do services become? |
| **Ownership** | Same team / cross-team / external |
| **Failure isolation** | Does target going down block source? |
| **Observability** | Can we trace the flow? |
| **Ordering** | Does order matter? |
| **Throughput** | Peak + sustained |
| **Complexity budget** | Team capacity for ops |
## Phase 4 — Anti-pattern checks
| Anti-pattern | Flag if |
|---|---|
| **Dual-write** | Code writes DB + publishes event without outbox/CDC |
| **Distributed transaction across services** | 2PC across service boundaries proposed |
| **Synchronous chain > 3 hops** | Latency + failure amplification |
| **Retry without idempotency** | Retries will duplicate effects |
| **No DLQ** | Poison messages will block pipeline |
| **No retry budget** | Retries amplify during outage |
Raise these explicitly when present.
## Phase 5 — Recommendation
One paragraph:
- **Chosen pattern(s)**
- **Why**: top 2–3 factors
- **Trade-offs accepted**
- **Failure handling**: retry + idempotency + DLQ + circuit breaker / fallback
- **Observability plan**: correlation ids + tracing
- **Hand-offs**: `message-broker-selection`, `event-schema-design`, `webhook-design`
## Phase 6 — Diagrams
### Pattern flow (sync)
```mermaid
sequenceDiagram
A->>B: call
B->>C: call
C-->>B: result
B-->>A: result
```
### Pattern flow (async + outbox)
```mermaid
sequenceDiagram
participant A
participant ADB as A.db
participant Relay
participant Broker
participant B
A->>ADB: BEGIN tx
A->>ADB: update aggregate
A->>ADB: insert outbox row
A->>ADB: COMMIT
Relay->>ADB: read outbox
Relay->>Broker: publish
Broker-->>B: deliver
B->>B: process (idempotent)
B-->>Broker: ack
```
### Saga (orchestration)
```mermaid
sequenceDiagram
Orchestrator->>Order: reserve
Order-->>Orchestrator: okRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.