shadow-integrate
Skill1 starsChanged yesterdayMITView on GitHub
External & Third-Party Integration Engineering. Use when integrating payment gateways (SNAP BI, Midtrans, Xendit, Stripe), HMAC webhooks with replay protection, SMTP/WhatsApp gateways, retries/circuit breakers, or Transactional Outbox.
In this repository51 other files it gives its agents.
- antislop-codeSkill
- antislop-copywritingSkill
- antislop-humanSkill
- antislop-layoutmobileSkill
- antislopSkill
- antislop-uiSkill
- context7Skill
- handoffSkill
- shadow-accessibilitySkill
- shadow-apiSkill
- shadow-architectSkill
- shadow-authSkill
- shadow-bootstrapSkill
- shadow-browserSkill
- shadow-cacheSkill
- shadow-compatSkill
- shadow-concurrencySkill
- shadow-dataSkill
- shadow-dbSkill
- shadow-debugSkill
- shadow-designSkill
- shadow-discoverySkill
- shadow-docSkill
- shadow-domainSkill
- shadow-eaSkill
- shadow-evalSkill
- shadow-finopsSkill
- shadow-gitSkill
- shadow-grcSkill
- shadow-handoverSkill
- shadow-maintainSkill
- shadow-mobileSkill
- shadow-modernizeSkill
- shadow-monarchSkill
- shadow-observeSkill
- shadow-opsSkill
- shadow-perfSkill
- shadow-planSkill
- shadow-pmoSkill
- shadow-presalesSkill
- shadow-privacySkill
- shadow-qualitySkill
- shadow-realtimeSkill
- shadow-refactorSkill
- shadow-releaseSkill
- shadow-resilienceSkill
- shadow-searchSkill
- shadow-secSkill
- shadow-supplychainSkill
- shadow-testSkill
- shadow-uatSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill whenever integrating external services: payment gateways (Midtrans, Xendit, Stripe, SNAP BI), messaging/SMTP (WhatsApp, …
- Distinctive: line 14
Every outbound HTTP call to an external provider MUST enforce:
- Very specific: line 16
Never make an outbound fetch / axios / httpx / http.Client call with an infinite default timeout.
- Distinctive: line 29
When receiving webhooks from external providers (Payment status, GitHub/GitLab, WhatsApp, courier tracking):
- Distinctive: line 43
When a database transaction must trigger an email, webhook, or message queue event:
- Distinctive: line 44
Do NOT send the email/HTTP call inside the DB transaction.
- Very specific: line 45
Instead, insert an outbox_events record inside the same DB transaction, and hand off durable locking, retry budgets, DLQ, and …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.
Files
Shadow Integrate (/shadow-integrate) — Resilient Third-Party APIs, Webhooks & Outbox
Use this skill whenever integrating external services: payment gateways (Midtrans, Xendit, Stripe, SNAP BI), messaging/SMTP (WhatsApp, Email, FCM), government/enterprise APIs (SatuSehat, BSrE, Dukcapil, ERP), or incoming/outgoing webhooks.
1. Outbound Third-Party API Calls (Never Trust External Networks)
Every outbound HTTP call to an external provider MUST enforce:
- Explicit Connection & Read Timeouts:
- Never make an outbound
fetch/axios/httpx/http.Clientcall with an infinite default timeout. Set explicit timeouts (e.g.,connectTimeout: 3000ms,responseTimeout: 8000ms).
- Never make an outbound
- Bounded Retry with Exponential Backoff + Full Jitter:
- Retry ONLY transient failures (
408,429 Too Many RequestsrespectingRetry-After,502,503,504, network timeout). - Never retry
400,401,403,404, or422validation errors. - Attach an
Idempotency-Keywhen retrying mutatingPOSTrequests so a network timeout after server execution never double-charges a user.
- Retry ONLY transient failures (
- Anti-Corruption Adapter Layer:
- Wrap every third-party SDK/API behind a clean internal interface (
PaymentProvider,NotificationGateway) and validate raw external JSON responses at the boundary before mapping into internal domain types. - Redact API keys,
Authorizationheaders, and PII from all request/response integration logs.
- Wrap every third-party SDK/API behind a clean internal interface (
2. Inbound Webhook Security & Idempotency Protocol
When receiving webhooks from external providers (Payment status, GitHub/GitLab, WhatsApp, courier tracking):
- Verify Cryptographic Signature (
HMAC-SHA256/ Asymmetric Signature) on Raw Body:- Compare signatures using constant-time comparison (
crypto.timingSafeEqual/hmac.compare_digest).
- Compare signatures using constant-time comparison (
- Replay Attack Protection:
- Reject webhook payloads whose timestamp header is older than
5 minutes.
- Reject webhook payloads whose timestamp header is older than
- Deduplicate by Provider
event_id(webhook_eventsLedger):- Providers deliver webhooks at-least-once. Insert
provider_event_idwith aUNIQUEconstraint before processing; if already processed, return200 OKimmediately without re-running side effects.
- Providers deliver webhooks at-least-once. Insert
- Fast
200 OK+ Async Queue Processing:- Persist the verified webhook payload and enqueue background processing so the webhook endpoint responds within
< 500ms.
- Persist the verified webhook payload and enqueue background processing so the webhook endpoint responds within
3. Transactional Outbox Pattern (For Reliable Side Effects)
When a database transaction must trigger an email, webhook, or message queue event:
- Do NOT send the email/HTTP call inside the DB transaction.
- Instead, insert an
outbox_eventsrecord inside the same DB transaction, and hand off durable locking, retry budgets, DLQ, and crash-before-ack idempotency semantics to/shadow-concurrency.
- Reconciliation & Partial Failure Safety:
- Pair asynchronous payment/ERP webhooks with scheduled reconciliation jobs (querying provider status APIs for unresolved
PENDINGtransactions beyond SLA) so dropped webhooks or partial outages never leave ledger mismatches.
- Pair asynchronous payment/ERP webhooks with scheduled reconciliation jobs (querying provider status APIs for unresolved
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
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.

