webhooks
Skill0 starsChanged 5 months agoMITView on GitHub
Use when setting up Lettr webhooks — registering an endpoint via the SDK/API and writing the handler that receives delivery/open/click/bounce events in the user's app. Covers auth (none/basic/oauth2), fast-ack + async processing, and idempotency.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- zedarvates/frugal-skillstheir own version, first seen Nov 8, 2026
- Leostruka/devin-bundletheir own version, first seen Nov 1, 2026
- oidsdev/honeypottheir own version, first seen Oct 15, 2026
- editframe/skillstheir own version, first seen Oct 13, 2026
- G1Joshi/Agent-Skillstheir own version, first seen Oct 13, 2026
- ayrshare/ayrshare-social-media-api-claude-plugintheir own version, first seen Oct 13, 2026
Used with
Projects with it also use data-pipelines, incident-response and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
YepAPISkilldata-pipelines
ETL patterns, cron scheduling, queue-based processing, and batch jobs with Inngest/BullMQ.
Also in 3 projects that use this
AnthropicSkillincident-response
Run an incident response workflow — triage, communicate, and write postmortem. Trigger with "we have an incident", "production is down", an alert that needs severity assessment, a status update mid-incident, or when writing a blameless postmortem after resolution.
Also in 3 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- nirholas/XActions★ 648same name
- kid-sid/claude-spellbook★ 190same name
- joelhooks/joelclaw★ 65same name
- nahid-sparktales/agent-dispatcher★ 59same name
- suhailkakar/the-skills★ 26same name
- ayrshare/ayrshare-social-media-api-claude-plugin★ 19same name
- editframe/skills★ 19same name
- G1Joshi/Agent-Skills★ 15same name
- khadinakbarlabs/shopify-app-builder★ 2same name
- zedarvates/frugal-skills★ 1same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Create with name, url (HTTPS), auth_type, and events_mode:
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lettr webhooks
Two halves: register a webhook endpoint with Lettr, and handle the events it posts to the user's app. The first is a few SDK calls; the second is where correctness actually lives.
1. Load the references
- SDK calls (register/list/update/delete): detect the stack via
../_shared/detect-stack.md, then read../_generated/sdk/<lang>/webhooks.md. - Wire contract:
../_generated/api/index.md, Webhooks section — noteauth_typeandevents_modeare required on create. - Payload format, event types, retries: the live docs at
https://docs.lettr.com/learn/webhooks(event-types, handling, retries).
⚠️ Payload shape — don't infer it from the registration names. Events arrive as a JSON array, each item wrapped by category:
for (const event of req.body) { // array, not a single object
const category = Object.keys(event.msys)[0]; // message_event | unsubscribe_event | relay_event | …
const data = event.msys[category];
if (data.type === 'delivery') { … } // SHORT name, not the namespaced one you registered with
}The type field carries the short name (delivery, bounce, open), never the <category>.<event> form used at registration. Fields sit directly on data (rcpt_to, transmission_id, bounce_class), not under a .data key.
2. Register the endpoint
Create with name, url (HTTPS), auth_type, and events_mode:
events_mode = all→ every event, noeventsarray.events_mode = selected→ an expliciteventsarray (e.g.message.delivery,message.bounce,engagement.click). Subscribe only to what the handler uses.
3. Authentication — get this right
Lettr authenticates to the user's endpoint. There is no HMAC signature scheme — don't write signature-verification code. The mechanism is set at registration via auth_type:
auth_type | What Lettr sends | Handler must |
none | nothing | reject by other means (secret URL path, IP allowlist) — weakest |
basic | Authorization: Basic … | compare username/password to stored secrets, else 401 |
oauth2 | Authorization: Bearer … | validate the token against the OAuth server, else 401 |
Credentials are configured in the dashboard and never returned by the API (the API only exposes auth_type + has_auth_credentials). Store the expected secrets in env/secret manager, never hardcoded.
4. Write the handler correctly
- Verify auth first, before doing any work (see table above).
- Ack fast, process async. Return
2xximmediately, then process events in the background (queue/setImmediate/job). Slow handlers cause timeouts → retries → duplicate processing. - Be idempotent. Lettr retries on non-2xx, so the same event can arrive more than once. Dedupe on the event id and make processing safe to repeat.
- HTTPS only. Plaintext leaks credentials and payloads.
5. Verify it works
Trigger a real event (send a test email via the sending skill, or use the dashboard's webhook test if available) and confirm the handler receives it and returns 2xx. Check the webhook's last_status/last_failure_at (GET /webhooks/{id}) — a failing webhook shows up there.
What this skill does not do
- It doesn't diagnose why an email bounced — that's
diagnose(this skill just makes sure the events arrive). - It doesn't configure webhook credentials — those are set in the dashboard.
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.

