skills/ HoangNguyen0403/agent-skills-standard

system-design-integration-patterns

Choose distributed integration and evolution patterns by the constraint each removes: outbox, CQRS, event sourcing, saga orchestration or choreography, leader election, sidecar, anti-corruption layer, and strangler-fig migration. Use when services must stay consistent across a boundary.

0
Installs
—
Rating
—
Success rate
3
Files scanned
Scan passedfrontend
Source on GitHub

Security scan

Scan passed

No risky patterns were found in the scanned files.

3 files scannedscanner v1.2.0Oct 11, 2026

Content sha256 2f81b8f278fff995… — run codexguild_scan_skills after installing to verify your local copy.

Static analysis is a first line of defense, not a guarantee. Read the source

SKILL.md

exact scanned copy

Integration Patterns

Priority: P1 (HIGH)

Each pattern buys one guarantee and charges operational complexity. Adopt on evidence, not on architecture fashion.

Selection Table

Constraint observedPatternCost accepted
A write must update the database and publish an event atomicallyTransactional outboxA relay (poller or CDC) to run and monitor
Read shape and write shape have diverged and one model serves neitherCQRSTwo models, sync lag, doubled tests
The sequence of changes is itself the product (audit, replay, temporal queries)Event sourcingProjections, event versioning, no easy delete
A business transaction spans services and cannot hold a lockSaga with compensationsCompensating action per step; no isolation
Exactly one instance may run a job or own a resourceLeader election (lease-based)Fencing tokens; split-brain handling
Cross-cutting concerns repeated in every serviceSidecar or ambassadorAnother process per pod to operate
A legacy or third-party model would infect the domainAnti-corruption layerA translation layer to maintain
Each client surface needs a different aggregate shapeBackends-for-frontendsOne backend per surface, owned by that team
A monolith must be replaced without a rewrite freezeStrangler figDual routing and a live seam until the last slice moves

Consistency Across a Boundary

  • Never dual-write. Write to your own store, then publish from the outbox or CDC stream; anything else drifts silently.
  • Saga orchestration puts the sequence in one coordinator: use it beyond ~4 steps, or when compensations must be reasoned about together.
  • Saga choreography lets each service react to events: use it for short flows between 2-3 services that already publish.
  • Every saga step needs its compensation defined before implementation. A step with no compensation is a step that must move to the end or become idempotent-retryable.
  • Correlate everything: one id threads the whole flow through logs, events, and compensations.

Evolution

  • Strangler fig: route one slice at a time behind a facade, run old and new in parallel, retire the old path only after traffic and data are verified.
  • Branch by abstraction inside a service: introduce the seam, implement behind it, switch, delete the old side.
  • Schema and event changes follow expand-contract, as in system-design-data-architecture.

Anti-Patterns

  • No CQRS by default: separate models only after one model demonstrably fails both sides.
  • No event sourcing for ordinary CRUD: audit needs an audit log, not a rebuilt world.
  • No dual write: outbox or CDC, never a database write followed by a hopeful publish.
  • No choreography past 4 steps: nobody can answer "where is order 123" without a coordinator.
  • No two-phase commit on the hot path: the coordinator is a SPOF and the locks are the outage.
  • No distributed lock as a correctness mechanism: leases expire under GC pauses; use fencing tokens or single ownership.

References

Files

3
13.6 KB

Agent reviews

0

No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.

More from HoangNguyen0403/agent-skills-standard8

android-agp-upgrade

Upgrade an Android project to Android Gradle Plugin (AGP) 9. Use when migrating to AGP 9, updating Gradle build files, migrating to built-in Kotlin, or adopting the new AGP DSL.

Scan passed 0
android-architecture

Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their spec

Scan passed 0
android-background-work

Implement WorkManager and background processing correctly on Android. Use when creating Worker classes, scheduling tasks, choosing between WorkManager and Foreground Services, or setting up Hilt in workers; defer FCM and notification delivery to android-notifications.

Scan passed 0
android-compose

Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation.

Scan passed 0
android-compose-migration

Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.

Scan passed 0
android-concurrency

Write correct coroutine scopes, lifecycle collection, and dispatcher injection in Android production code. Use for suspend functions, coroutine scopes, and dispatcher mechanics; defer ViewModel StateFlow/LiveData architecture, Fragment lifecycle recipes, persistence/notifications, and unit-test reci

Scan passed 0
android-deployment

Configure release signing, R8 obfuscation, and App Bundle publishing for Android. Use when setting up signing configs, enabling minification, adding ProGuard keep rules, or preparing for Play Store submission.

Scan passed 0
android-design-system

Enforce Material Design 3 theming and design token usage in Jetpack Compose. Use when implementing M3 components, color schemes, typography, or design tokens.

Scan passed 0

Related frontend skillsscan passed