agentleFS
sivaprasadreddysivaprasadreddy/sivalabs-agent-skills/skills/external-integrations-and-messaging/SKILL.md

external-integrations-and-messaging

Skill198 starsChanged 4 days agoMITView on GitHub

Design resilient integrations with external services and asynchronous messaging, including timeouts, retries, idempotency, delivery guarantees, and failure recovery.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when calling third-party APIs, publishing or consuming messages, processing webhooks, scheduling background work, or coordinating …

    line 12
  2. Distinctive:

    Avoid retry storms; use concurrency limits, rate limits, and circuit-breaking where appropriate.

    line 18
  3. Distinctive:

    Treat message ordering, duplication, delay, and redelivery as normal conditions.

    line 21
  4. Distinctive:

    Keep external contracts behind adapters or clear integration boundaries.

    line 23
  5. Distinctive:

    Do not let a remote system's data model become the application's internal domain model by accident.

    line 24
  6. Distinctive:

    Ensure consumer effects are idempotent.

    line 39
  7. Distinctive:

    Consider transactional outbox/inbox patterns when database updates and message delivery must stay coordinated.

    line 42
  8. Distinctive:

    Avoid introducing a message broker or distributed workflow engine when a simpler in-process or scheduled solution is sufficient.

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

External Integrations and Messaging

Purpose

Make interactions across process and organizational boundaries explicit, resilient, secure, and observable.

When to use

Use when calling third-party APIs, publishing or consuming messages, processing webhooks, scheduling background work, or coordinating workflows across services.

Principles

  • Assume every remote dependency can be slow, unavailable, inconsistent, or return malformed data.
  • Set explicit connection, request, and overall operation timeouts.
  • Retry only transient failures and use bounded exponential backoff with jitter.
  • Avoid retry storms; use concurrency limits, rate limits, and circuit-breaking where appropriate.
  • Make side-effecting operations idempotent or protect them with deduplication.
  • Distinguish at-most-once, at-least-once, and effectively-once business behavior; do not promise exactly-once processing without precise guarantees.
  • Treat message ordering, duplication, delay, and redelivery as normal conditions.
  • Validate webhook authenticity, timestamp/replay protections, and payloads.
  • Keep external contracts behind adapters or clear integration boundaries.
  • Do not let a remote system's data model become the application's internal domain model by accident.

Synchronous integration workflow

  1. Identify the dependency, business purpose, data exchanged, and trust boundary.
  2. Define timeout budgets across the full request path.
  3. Classify failures: transient, permanent, business rejection, throttling, and unknown.
  4. Define retry eligibility, attempt limits, backoff, and cancellation.
  5. Define fallback or degraded behavior when the dependency is unavailable.
  6. Protect credentials and restrict outbound destinations.
  7. Record latency, failure rates, throttling, and correlation identifiers.

Asynchronous messaging workflow

  1. Define event meaning, producer, consumer, and ownership.
  2. Specify schema, versioning, key, ordering needs, and retention.
  3. Decide delivery semantics and duplicate-handling strategy.
  4. Ensure consumer effects are idempotent.
  5. Define acknowledgement, retry, dead-letter, and replay procedures.
  6. Handle poison messages and schema incompatibility.
  7. Consider transactional outbox/inbox patterns when database updates and message delivery must stay coordinated.
  8. Monitor queue depth, age, redelivery, and dead-letter volume.

Workflow consistency

For multi-step processes spanning systems, define:

  • State transitions and invariants.
  • Compensation behavior for completed steps when later steps fail.
  • Timeout and expiry behavior.
  • Human intervention and reconciliation paths.
  • Auditability and duplicate request handling.

Review checklist

  • Are timeouts explicit and compatible with upstream budgets?
  • Are retries bounded and safe?
  • Can duplicate messages or callbacks cause duplicate effects?
  • Are ordering and consistency assumptions explicit?
  • Is there a dead-letter/replay/reconciliation strategy?
  • Are secrets, payloads, and personal data handled safely?
  • Can operators see and diagnose failures?

Avoid introducing a message broker or distributed workflow engine when a simpler in-process or scheduled solution is sufficient.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.