Skip to content
Development
Skill

/integration-architecture

This skill should be used when the user asks about "messaging patterns", "command vs event", "push vs pull", "message reliability", "at-least-once delivery", "idempotency", "transactional outbox", "saga pattern", "fire and forget", "retry strategy", "event-driven architecture",

From plugin
tdder
1414 skills7 agents2 commands1 hook
Install
$ npx -y skills add t1/tdder --skill integration-architecture --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/integration-architecture

Context preview

The summary Claude sees to decide when to auto-load this skill.

This skill should be used when the user asks about "messaging patterns", "command vs event", "push vs pull", "message reliability", "at-least-once delivery", "idempotency", "transactional outbox", "saga pattern", "fire and forget", "retry strategy", "event-driven architecture",

SKILL.md

integration-architecture.SKILL.md
name: integration-architecture
description: >
  This skill should be used when the user asks about "messaging patterns", "command vs event",
  "push vs pull", "message reliability", "at-least-once delivery", "idempotency",
  "transactional outbox", "saga pattern", "fire and forget", "retry strategy",
  "event-driven architecture", "message broker integration", "publish-subscribe",
  "request-reply", "backpressure", or when deciding how components communicate across
  process or network boundaries.
version: 0.1.0

Integration Architecture

How components communicate across boundaries: message style, data flow direction, and failure handling.

This skill complements [Unfolding Architecture](../unfolding-architecture/SKILL.md), which covers the decision of *whether* to use messaging at all (Communication dimension, Levels 0→1→2). Once you've decided to communicate across boundaries, this skill guides *how*.

Tradeoff: Command vs. Event Messages

Commands couple sender to receiver: the sender knows who to call and what to ask for. Events invert the dependency: receivers must know the sender's domain to interpret what happened. In more complex messaging patters, when several, interdependent messages are sent, the dependency is even stricter: the sender of commands must know about the state of the receiver; with events it's the other way around. Neither is strictly better.

**Prefer Commands when:**

  • There is exactly one receiver
  • Sender needs confirmation the action was performed
  • Traceability and explicit flow matter
  • The operation is imperative ("do this")

**Prefer Events when:**

  • Multiple independent consumers react to the same thing
  • Adding consumers should not require changing the sender
  • Sender should not know about side effects
  • The message describes something that happened ("this occurred")

**Key insight:** Events don't remove coupling, they move it. The receiver now needs to understand the sender's context to react. This is worthwhile when senders change less often than the set of receivers.

**When introducing cross-boundary communication**, use `AskUserQuestion` with a code-based recommendation:

  • **Question:** "Should this be a command or an event?"
  • **Options:** Put the recommended option first with "(Recommended)". Use the option `description`

to explain *why* based on the code — e.g., "The method name `orderCompleted` and the lack of a return value suggest a notification, not a directive" or "There is exactly one receiver (`PaymentService`) that needs to confirm the action."

  • "Let's discuss" — elaborate on the trade-offs before deciding
  • If the code signals are ambiguous, don't recommend — present all options neutrally.

Request-Reply

A hybrid pattern: the sender sends a command and waits for a response, but communication is asynchronous (via a broker with a reply queue, not a direct method call). Useful when you need the decoupling benefits of messaging but the sender still requires a result.

**Prefer Request-Reply when:**

  • The sender needs a result but should not be coupled to the receiver's deployment
  • Temporal decoupling is needed (the reply may arrive later)
  • Load leveling or routing through a broker is required

**Prefer direct commands when:**

  • Latency matters and a synchronous call is acceptable
  • The reply queue infrastructure would add complexity without clear benefit

Tradeoff: Push vs. Pull

Who initiates data flow.

**Prefer Pull when:**

  • Consumer only needs data on-demand
  • Consumer controls timing and rate
  • Request/response is sufficient
  • Simpler infrastructure (HTTP, DB queries)

**Prefer Push when:**

  • Consumers need data as soon as it's available
  • Polling would create unnecessary load
  • Multiple consumers need the same data
  • Producer knows best when data is ready

**Key insight:** Push shifts backpressure responsibility to the consumer. Pull is simpler but can miss real-time needs or waste resources on empty polls.

Backpressure

When a producer pushes faster than a consumer can process, work piles up. Backpressure is how the consumer signals the producer to slow down (or how the system absorbs the mismatch).

Common strategies:

  • **Bounded queues**: reject or block when full — producer discovers the limit
  • **Rate limiting**: consumer controls ingestion rate explicitly
  • **Credit-based flow**: consumer grants the producer permission to send N messages per timeframe
  • **Competing consumers**: scale out consumers to match producer throughput

Choose a strategy before going to production with push-based messaging. Unbounded queues are not a strategy — they defer the problem until memory runs out.

Dimension: Reliability

How communication handles failures. This dimension progresses under pressure, following the unfolding principle: start at Level 0, unfold only when concrete problems force the change.

| Level | Style | Description | |-------|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 0 | Fire and forget | Send and assume success. No retries. Simple, appropriate when loss is acceptable or communication is in-process. | | 1 | Retry + idempotency | Retry on failure; receivers are idempotent so duplicates are harmless. At-least-once delivery. Techniques: deduplication (message IDs), upserts, deterministic operations. | | 2 | Transactional guarantees | Strongest guarantees, highest complexity. See techniques below. |

**When choosing a reliability level**, use `AskUserQuestion` with

Read more
Ships withtdder

A plugin for pi, Claude Code, and OpenCode that guides AI agents through disciplined Test-Driven Development and Clean Code practices. Note that currently this is WORK IN PROGRESS! I'm not even trying to keep it stable or tested.

Get the whole plugin

Other skills on tdder.

app
Skill

app

This skill should be used when the user asks to "calculate code mass", "measure code complexity with APP", "compare implementations using APP", "apply Absolute…

@t1@t1View Skill
clean-code
Skill

clean-code

This skill should be used when the user asks to "refactor code", "review code quality", "apply clean code principles", "check for code smells", "improve code…

@t1@t1View Skill
grill-po
Skill

grill-po

Requirements grilling session with a Product Owner (or anyone in that role). Challenges plans against the existing domain model, sharpens terminology, and…

@t1@t1View Skill
java
Skill

java

Always load this skill when writing, modifying, creating, or moving Java or Kotlin source code, or when project setup has already chosen Java/Kotlin as the…

@t1@t1View Skill
maven
Skill

maven

Always load this skill when a pom.xml file exists in the project, when creating or editing a pom.xml, or when setting up Maven project structure in a new…

@t1@t1View Skill