Skill: partner integration checklist

Checklist partner integrations for auth, webhooks, and failure modes before you call it done.

Published 2026-11-09 · Translation: VI

What to do first

  • Draw the trust boundary before any code: who holds tokens, who verifies webhooks, what the partner can call back into your system.
  • Refuse a demo path that stores secrets in the repo, skips signature checks, or has no plan for expiry and revoke.
  • Treat the run as unfinished until auth, webhooks, failure mapping, observability, and a revoke/expiry test plan are written down.

Ask an agent to “add Stripe / Slack / HubSpot” and it will often ship the happy path: OAuth dance works once, a webhook endpoint returns 200, and a sandbox key ends up in .env.example that someone later commits for real. The first production week then fails on token expiry, unsigned callbacks, or partner errors that surface as a blank 500.

The model is not being careless on purpose. Integration demos reward the green path, and inventing partner behavior is cheaper than opening the docs. This skill keeps the useful part - scaffolding the checklist and drafting the plan - and blocks the dangerous part: secrets in git, unverified webhooks, and unknown APIs treated as facts. It works as a chat prompt or as a SKILL.md for Cursor / Claude Code.

Part 1: Map the trust boundary before code

Trust Boundary

Trust Boundary

Most bad integrations start as a missing map. Force the agent to answer these before it opens a file:

  • Auth: OAuth, API key, or signed JWT? Where do secrets live (vault path / secret manager), who rotates them, and what happens on revoke?
  • Inbound: Which webhooks or partner callbacks hit you? How do you verify signatures? What is the idempotency key?
  • Outbound: Which of your endpoints or data can the partner reach? Least privilege scopes only.
  • Unknowns: Anything not in the partner docs stays marked [UNKNOWN] - never invented.
We are adding a partner integration. Do not write implementation code yet.

Produce a trust-boundary map with:
1. Auth type, secret storage path, rotation, revoke/expiry behavior
2. Inbound webhooks: URL, signature scheme, retry semantics, idempotency
3. Outbound calls we make: scopes, rate limits (cite docs or mark UNKNOWN)
4. Failure modes the user will see (auth expired, partner down, bad payload)
5. Sandbox vs production differences that matter

PARTNER: [name]
DOCS LINKS: [paste]
OUR SYSTEM NOTES: [paste]

Part 2: Webhook and failure gates

Webhook Gate

Webhook Gate

After the map is confirmed, the skill walks a gate. Each gate is pass/fail with evidence:

  1. Secrets: no keys in repo; storage path named.
  2. Verify: webhook signature check named (HMAC header, JWT, mTLS - whatever the partner documents).
  3. Idempotency: duplicate delivery does not double-charge / double-write.
  4. User-visible errors: partner codes mapped to states the UI can show.
  5. Observability: log correlation id, metric, or alert for auth fail and webhook fail.
  6. Test plan: revoke token, expire token, replay webhook, bad signature - each as a named case.
Using the confirmed trust-boundary map, draft the integration checklist.
Hard rules:
1. No secrets in git. Cite the vault/secret-manager path.
2. Webhooks need verification + retries + idempotency plan.
3. Map partner errors to user-visible states; do not swallow as bare 500.
4. Do not invent partner API behavior; cite docs or mark UNKNOWN and ask.
5. Include sandbox/test cases for revoke, expiry, and bad signatures.

Output: checklist with PASS/FAIL/UNKNOWN per item, then the test plan.

Part 3: Traps this skill must catch

Failure modes to catch early

Failure modes to catch early

Read the board. Each card is a stop rule the skill must encode.

A worked example

Invented situation: adding a billing partner that sends invoice.paid webhooks and uses OAuth refresh tokens.

Without the skill, a typical agent draft: OAuth code + webhook route that accepts JSON and returns 200, with PARTNER_SECRET=sk_test_… in a committed sample env.

With the skill, the map flags refresh-token storage as required, webhook HMAC as required, and rate limits as UNKNOWN until docs are cited. The checklist stays red until: vault path named, signature verify sketched, idempotency on invoice_id, and a test case for expired refresh. The agent may scaffold files only after those items are PASS or explicitly owned as follow-ups.

Save it as a skill file

# Skill: partner-integration
## When
- Building third-party / SaaS / payment partner integrations
## Hard rules
1. No secrets in git; name the secret-store path.
2. Webhook verification + idempotency required.
3. Cite partner docs or mark UNKNOWN - never invent APIs.
## Steps
1. Trust-boundary map; stop for confirmation.
2. Auth + webhook + failure checklist (PASS/FAIL/UNKNOWN).
3. Observability + revoke/expiry/bad-signature test plan.
## Done when
- Checklist green or gaps listed with owners.
- Never commit secrets or push without an explicit human ask.

Test the skill before you trust it

  1. Unsigned webhook. Ask for a webhook handler with no verification. Pass: skill blocks or marks FAIL.
  2. Missing expiry. Happy-path OAuth only. Pass: skill requires revoke/expiry cases.
  3. Unknown rate limit. Ask it to “use the partner’s rate limit.” Pass: marks UNKNOWN and asks for a docs cite.

For a broader security pass on agents that touch secrets and tools, see prompt-injection defense and threat-model skill.

Common mistakes

  • Scaffolding before the map. Once code exists, gaps look like polish instead of missing safety.
  • Treating 200 on the webhook as done. Without verify + idempotency, you are open to replay and forgery.
  • Swallowing partner errors. Users need “reconnect account” / “payment delayed”, not a generic failure.
  • Copying sandbox keys into samples. Link the vault path; never paste a real or lookalike secret.

You are done when auth storage, webhook verification, failure mapping, and revoke/expiry tests are written, and every UNKNOWN is labeled - not filled in by guesswork.

Share

X Facebook LinkedIn