vybekiit 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/bin.js +1697 -562
  2. package/dist/global-skills/add-ai/SKILL.md +1 -1
  3. package/dist/global-skills/add-analytics/SKILL.md +1 -1
  4. package/dist/global-skills/add-blog/SKILL.md +1 -1
  5. package/dist/global-skills/add-crud/SKILL.md +1 -1
  6. package/dist/global-skills/add-files/SKILL.md +1 -1
  7. package/dist/global-skills/add-images/SKILL.md +1 -1
  8. package/dist/global-skills/add-language/SKILL.md +1 -1
  9. package/dist/global-skills/add-notifications/SKILL.md +1 -1
  10. package/dist/global-skills/add-realtime/SKILL.md +1 -1
  11. package/dist/global-skills/add-route/SKILL.md +1 -1
  12. package/dist/global-skills/add-search/SKILL.md +1 -1
  13. package/dist/global-skills/add-signin/SKILL.md +1 -1
  14. package/dist/global-skills/add-teams/SKILL.md +1 -1
  15. package/dist/global-skills/add-upload/SKILL.md +1 -1
  16. package/dist/global-skills/aws-serverless/SKILL.md +44 -44
  17. package/dist/global-skills/aws-serverless/assets/powertools-handler.py +1 -2
  18. package/dist/global-skills/aws-serverless/references/api-gateway.md +470 -50
  19. package/dist/global-skills/aws-serverless/references/architecture.md +186 -47
  20. package/dist/global-skills/aws-serverless/references/concurrency.md +158 -44
  21. package/dist/global-skills/aws-serverless/references/deployment.md +1 -1
  22. package/dist/global-skills/aws-serverless/references/event-sources.md +391 -72
  23. package/dist/global-skills/aws-serverless/references/lambda.md +428 -69
  24. package/dist/global-skills/aws-serverless/references/orchestration.md +384 -65
  25. package/dist/global-skills/aws-serverless/references/production.md +415 -78
  26. package/dist/global-skills/aws-serverless/references/troubleshooting.md +626 -79
  27. package/dist/global-skills/back-up-my-code/SKILL.md +1 -1
  28. package/dist/global-skills/buy-domain/SKILL.md +1 -1
  29. package/dist/global-skills/check-safety/SKILL.md +1 -1
  30. package/dist/global-skills/configure-capabilities/SKILL.md +1 -1
  31. package/dist/global-skills/connect-account/SKILL.md +1 -1
  32. package/dist/global-skills/connect-account-backend/SKILL.md +1 -1
  33. package/dist/global-skills/design-my-data/SKILL.md +1 -1
  34. package/dist/global-skills/doctor/SKILL.md +1 -1
  35. package/dist/global-skills/feedback/SKILL.md +63 -0
  36. package/dist/global-skills/go-live/SKILL.md +1 -1
  37. package/dist/global-skills/harden/SKILL.md +1 -1
  38. package/dist/global-skills/instrument-feature-flags/references/usage.md +0 -35
  39. package/dist/global-skills/instrument-product-analytics/SKILL.md +1 -1
  40. package/dist/global-skills/instrument-product-analytics/references/android.md +0 -36
  41. package/dist/global-skills/instrument-product-analytics/references/configuration.md +0 -1
  42. package/dist/global-skills/instrument-product-analytics/references/flutter.md +0 -37
  43. package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +2 -3
  44. package/dist/global-skills/instrument-product-analytics/references/usage.md +0 -35
  45. package/dist/global-skills/manifest.json +2 -1
  46. package/dist/global-skills/neon/SKILL.md +20 -27
  47. package/dist/global-skills/neon-ai-gateway/SKILL.md +2 -68
  48. package/dist/global-skills/neon-functions/SKILL.md +7 -7
  49. package/dist/global-skills/neon-object-storage/SKILL.md +2 -2
  50. package/dist/global-skills/neon-postgres/SKILL.md +5 -5
  51. package/dist/global-skills/neon-postgres-branches/SKILL.md +1 -1
  52. package/dist/global-skills/onboarding/SKILL.md +1 -1
  53. package/dist/global-skills/plan-my-idea/SKILL.md +1 -1
  54. package/dist/global-skills/publish-app/SKILL.md +1 -1
  55. package/dist/global-skills/publish-extension/SKILL.md +1 -1
  56. package/dist/global-skills/reset-password/SKILL.md +1 -1
  57. package/dist/global-skills/save-data/SKILL.md +1 -1
  58. package/dist/global-skills/setup-email/SKILL.md +1 -1
  59. package/dist/global-skills/setup-payments/SKILL.md +1 -1
  60. package/dist/global-skills/setup-sms/SKILL.md +1 -1
  61. package/dist/global-skills/sign-in-with-email-link/SKILL.md +1 -1
  62. package/dist/global-skills/sign-in-with-google/SKILL.md +1 -1
  63. package/dist/global-skills/sign-in-with-phone/SKILL.md +1 -1
  64. package/dist/global-skills/stripe-best-practices/SKILL.md +6 -11
  65. package/dist/global-skills/stripe-best-practices/references/billing.md +0 -5
  66. package/dist/global-skills/stripe-best-practices/references/payments.md +2 -4
  67. package/dist/global-skills/stripe-best-practices/references/tax.md +8 -78
  68. package/dist/global-skills/track-errors/SKILL.md +1 -1
  69. package/dist/global-skills/update-kit/SKILL.md +1 -1
  70. package/dist/global-skills/wire-auth/SKILL.md +1 -1
  71. package/dist/global-skills/wire-database/SKILL.md +1 -1
  72. package/dist/global-skills/wire-email/SKILL.md +1 -1
  73. package/dist/global-skills/wire-payments/SKILL.md +1 -1
  74. package/package.json +8 -8
  75. package/dist/global-skills/email-best-practices/.github/workflows/sync-skills.yml +0 -30
  76. package/dist/global-skills/email-best-practices/README.md +0 -63
  77. package/dist/global-skills/email-best-practices/references/accessibility.md +0 -189
  78. package/dist/global-skills/email-best-practices/references/compliance.md +0 -125
  79. package/dist/global-skills/email-best-practices/references/deliverability.md +0 -121
  80. package/dist/global-skills/email-best-practices/references/email-capture.md +0 -129
  81. package/dist/global-skills/email-best-practices/references/email-types.md +0 -173
  82. package/dist/global-skills/email-best-practices/references/list-management.md +0 -157
  83. package/dist/global-skills/email-best-practices/references/marketing-emails.md +0 -115
  84. package/dist/global-skills/email-best-practices/references/sending-reliability.md +0 -155
  85. package/dist/global-skills/email-best-practices/references/transactional-email-catalog.md +0 -418
  86. package/dist/global-skills/email-best-practices/references/transactional-emails.md +0 -92
  87. package/dist/global-skills/email-best-practices/references/webhooks-events.md +0 -167
  88. package/dist/global-skills/email-best-practices/tests/README.md +0 -35
  89. package/dist/global-skills/email-best-practices/tests/scenarios/01-spam-deliverability.md +0 -46
  90. package/dist/global-skills/email-best-practices/tests/scenarios/02-multi-region-compliance.md +0 -48
  91. package/dist/global-skills/email-best-practices/tests/scenarios/03-retry-idempotency.md +0 -36
  92. package/dist/global-skills/email-best-practices/tests/scenarios/04-webhook-bounce-handling.md +0 -52
  93. package/dist/global-skills/email-best-practices/tests/scenarios/05-new-saas-email-plan.md +0 -51
  94. package/dist/global-skills/neon-postgres/references/neon-sdk.md +0 -262
@@ -1,418 +0,0 @@
1
- # Transactional Email Catalog
2
-
3
- A comprehensive catalog of transactional emails organized by category, plus recommended email combinations for different app types.
4
-
5
- ## When to Use This
6
-
7
- - Planning what transactional emails your app needs
8
- - Choosing the right emails for your app type
9
- - Understanding what content each email type should include
10
- - Implementing transactional email features
11
-
12
- ## Email Combinations by App Type
13
-
14
- Use these combinations as a starting point based on what you're building.
15
-
16
- ### Authentication-Focused App
17
-
18
- Apps where user accounts and security are core (login systems, identity providers, account management).
19
-
20
- **Essential:**
21
- - Email verification
22
- - Password reset
23
- - OTP / 2FA codes
24
- - Security alerts (new device, password change)
25
- - Account update notifications
26
-
27
- **Optional:**
28
- - Welcome email (must not be promotional)
29
- - Account deletion confirmation
30
-
31
- ### Newsletter / Content Platform
32
-
33
- Apps focused on content delivery and subscriptions.
34
-
35
- **Essential:**
36
- - Email verification
37
- - Password reset
38
- - Welcome email (must not be promotional)
39
- - Subscription confirmation
40
-
41
- **Optional:**
42
- - OTP / 2FA codes
43
- - Account update notifications
44
-
45
- ### E-commerce / Marketplace
46
-
47
- Apps where users buy products or services.
48
-
49
- **Essential:**
50
- - Email verification
51
- - Password reset
52
- - Welcome email (must not be promotional)
53
- - Order confirmation
54
- - Shipping notifications
55
- - Invoice / receipt
56
- - Payment failed notices
57
-
58
- **Optional:**
59
- - OTP / 2FA codes
60
- - Security alerts
61
- - Subscription confirmations (for recurring orders)
62
-
63
- ### SaaS / Subscription Service
64
-
65
- Apps with paid subscription tiers and ongoing billing.
66
-
67
- **Essential:**
68
- - Email verification
69
- - Password reset
70
- - Welcome email (must not be promotional)
71
- - OTP / 2FA codes
72
- - Security alerts
73
- - Subscription confirmation
74
- - Subscription renewal notice
75
- - Payment failed notices
76
- - Invoice / receipt
77
-
78
- **Optional:**
79
- - Account update notifications
80
- - Feature change notifications (for breaking changes)
81
-
82
- ### Financial / Fintech App
83
-
84
- Apps handling money, payments, or sensitive financial data.
85
-
86
- **Essential:**
87
- - Email verification
88
- - Password reset
89
- - OTP / 2FA codes (required for sensitive actions)
90
- - Security alerts (all types)
91
- - Account update notifications
92
- - Transaction confirmations
93
- - Invoice / receipt
94
- - Payment failed notices
95
-
96
- **Optional:**
97
- - Welcome email (must not be promotional)
98
- - Compliance notices
99
-
100
- ### Social / Community Platform
101
-
102
- Apps focused on user interaction and community features.
103
-
104
- **Essential:**
105
- - Email verification
106
- - Password reset
107
- - Welcome email (must not be promotional)
108
- - Security alerts
109
-
110
- **Optional:**
111
- - OTP / 2FA codes
112
- - Account update notifications
113
- - Activity notifications (mentions, replies)
114
-
115
- ### Developer Tools / API Platform
116
-
117
- Apps targeting developers with API access and integrations.
118
-
119
- **Essential:**
120
- - Email verification
121
- - Password reset
122
- - OTP / 2FA codes
123
- - Security alerts
124
- - API key notifications (creation, expiration)
125
- - Subscription confirmation
126
- - Payment failed notices
127
-
128
- **Optional:**
129
- - Welcome email (must not be promotional)
130
- - Usage alerts (approaching limits)
131
- - Feature change notifications
132
-
133
- ### Healthcare / HIPAA-Compliant App
134
-
135
- Apps handling protected health information.
136
-
137
- **Essential:**
138
- - Email verification
139
- - Password reset
140
- - OTP / 2FA codes (required)
141
- - Security alerts (all types, detailed)
142
- - Account update notifications
143
- - Appointment confirmations
144
-
145
- **Optional:**
146
- - Welcome email (must not be promotional)
147
- - Compliance notices
148
-
149
- **Note:** Healthcare apps have strict requirements. Emails should contain minimal PHI and link to secure portals for sensitive information.
150
-
151
- ---
152
-
153
- ## Full Email Catalog
154
-
155
- ### Authentication & Security
156
-
157
- #### Email Verification / Account Verification
158
-
159
- **When to send:** Immediately after user signs up or changes email address.
160
-
161
- **Purpose:** Verify the email address belongs to the user.
162
-
163
- **Content should include:**
164
- - Clear verification link or code
165
- - Expiration time (typically 24-48 hours)
166
- - Instructions on what to do
167
- - Security notice if link is clicked by mistake
168
-
169
- **Best practices:**
170
- - Send immediately (within seconds)
171
- - Include expiration notice
172
- - Provide resend option
173
- - Link to support if issues
174
-
175
- #### OTP / 2FA Codes
176
-
177
- **When to send:** When user requests two-factor authentication code.
178
-
179
- **Purpose:** Provide time-sensitive authentication code.
180
-
181
- **Content should include:**
182
- - The OTP code (clearly displayed)
183
- - Expiration time (typically 5-10 minutes)
184
- - Security warnings
185
- - Instructions on what to do if not requested
186
-
187
- **Best practices:**
188
- - Send immediately
189
- - Code should be large and easy to read
190
- - Include expiration prominently
191
- - Warn about sharing codes
192
- - Provide "I didn't request this" link
193
-
194
- #### Password Reset
195
-
196
- **When to send:** When user requests password reset.
197
-
198
- **Purpose:** Allow user to securely reset forgotten password.
199
-
200
- **Content should include:**
201
- - Reset link (with token)
202
- - Expiration time (typically 1 hour)
203
- - Security warnings
204
- - Instructions if not requested
205
-
206
- **Best practices:**
207
- - Send immediately
208
- - Link expires quickly (1 hour)
209
- - Include IP address and location if available
210
- - Provide "I didn't request this" link
211
- - Don't include the old password
212
-
213
- #### Security Alerts
214
-
215
- **When to send:** When security-relevant events occur (login from new device, password change, etc.).
216
-
217
- **Purpose:** Notify user of account security events.
218
-
219
- **Content should include:**
220
- - What happened (clear description)
221
- - When it happened
222
- - Location/IP if available
223
- - Action to take if suspicious
224
- - Link to security settings
225
-
226
- **Best practices:**
227
- - Send immediately
228
- - Be clear and specific
229
- - Include actionable steps
230
- - Provide way to report suspicious activity
231
-
232
- ### Account Management
233
-
234
- #### Welcome Email
235
-
236
- **When to send:** Immediately after successful account creation and verification.
237
-
238
- **Purpose:** Welcome new users and guide them to next steps (must not be promotional).
239
-
240
- **Content should include:**
241
- - Welcome message
242
- - Key features or next steps
243
- - Links to important resources
244
- - Support contact information
245
-
246
- **Best practices:**
247
- - Send after email verification
248
- - Keep it focused and actionable
249
- - Don't overwhelm with information
250
- - Set expectations about future emails
251
-
252
- #### Account Update Notifications
253
-
254
- **When to send:** When user changes account settings (email, password, profile, etc.).
255
-
256
- **Purpose:** Confirm account changes and provide security notice.
257
-
258
- **Content should include:**
259
- - What changed
260
- - When it changed
261
- - Action to take if unauthorized
262
- - Link to account settings
263
-
264
- **Best practices:**
265
- - Send immediately after change
266
- - Be specific about what changed
267
- - Include security notice
268
- - Provide easy way to revert if needed
269
-
270
- ### E-commerce & Transactions
271
-
272
- #### Order Confirmations
273
-
274
- **When to send:** Immediately after order is placed.
275
-
276
- **Purpose:** Confirm order details and provide receipt.
277
-
278
- **Content should include:**
279
- - Order number
280
- - Items ordered with quantities
281
- - Pricing breakdown
282
- - Shipping address
283
- - Estimated delivery date
284
- - Order tracking link (if available)
285
-
286
- **Best practices:**
287
- - Send within minutes of order
288
- - Include all order details
289
- - Make it easy to print or save
290
- - Provide customer service contact
291
-
292
- #### Shipping Notifications
293
-
294
- **When to send:** When order ships, with tracking updates.
295
-
296
- **Purpose:** Notify user that order has shipped and provide tracking.
297
-
298
- **Content should include:**
299
- - Order number
300
- - Tracking number
301
- - Carrier information
302
- - Expected delivery date
303
- - Tracking link
304
- - Shipping address confirmation
305
-
306
- **Best practices:**
307
- - Send when order ships
308
- - Include tracking number prominently
309
- - Provide carrier tracking link
310
- - Update on major tracking milestones
311
-
312
- #### Invoices and Receipts
313
-
314
- **When to send:** After payment is processed.
315
-
316
- **Purpose:** Provide payment confirmation and receipt.
317
-
318
- **Content should include:**
319
- - Invoice/receipt number
320
- - Payment amount
321
- - Payment method
322
- - Items/services purchased
323
- - Payment date
324
- - Downloadable PDF (if applicable)
325
-
326
- **Best practices:**
327
- - Send immediately after payment
328
- - Include all payment details
329
- - Make it easy to download/save
330
- - Include tax information if applicable
331
-
332
- ### Subscriptions & Billing
333
-
334
- #### Subscription Confirmations
335
-
336
- **When to send:** When user subscribes or changes subscription.
337
-
338
- **Purpose:** Confirm subscription details and billing information.
339
-
340
- **Content should include:**
341
- - Subscription plan details
342
- - Billing amount and frequency
343
- - Next billing date
344
- - Payment method
345
- - Link to manage subscription
346
-
347
- **Best practices:**
348
- - Send immediately after subscription
349
- - Clearly state billing terms
350
- - Provide easy cancellation option
351
- - Include support contact
352
-
353
- #### Subscription Renewal Notices
354
-
355
- **When to send:** Before subscription renews (typically 3-7 days before).
356
-
357
- **Purpose:** Notify user of upcoming renewal and charge.
358
-
359
- **Content should include:**
360
- - Renewal date
361
- - Amount to be charged
362
- - Payment method on file
363
- - Link to update payment method
364
- - Link to cancel if desired
365
-
366
- **Best practices:**
367
- - Send with enough notice (3-7 days)
368
- - Be clear about amount and date
369
- - Make it easy to update payment method
370
- - Provide cancellation option
371
-
372
- #### Payment Failed Notices
373
-
374
- **When to send:** When subscription payment fails.
375
-
376
- **Purpose:** Notify user of payment failure and provide resolution steps.
377
-
378
- **Content should include:**
379
- - What happened
380
- - Amount that failed
381
- - Reason for failure (if available)
382
- - Steps to resolve
383
- - Link to update payment method
384
- - Consequences if not resolved
385
-
386
- **Best practices:**
387
- - Send immediately after failure
388
- - Be clear about consequences
389
- - Provide easy resolution path
390
- - Include support contact
391
-
392
- ### Notifications & Updates
393
-
394
- #### Feature Announcements (Transactional)
395
-
396
- **When to send:** When a feature the user is using changes significantly.
397
-
398
- **Purpose:** Notify users of changes that affect their use of the service.
399
-
400
- **Content should include:**
401
- - What changed
402
- - How it affects the user
403
- - What action (if any) is needed
404
- - Link to more information
405
-
406
- **Best practices:**
407
- - Only for significant changes
408
- - Focus on user impact
409
- - Provide clear next steps
410
- - Link to documentation
411
-
412
- **Note:** General feature announcements are marketing emails. Only send as transactional if the change directly affects an active feature the user is using.
413
-
414
- ## Related Topics
415
-
416
- - [Email Types](./email-types.md) - Understanding transactional vs marketing
417
- - [Transactional Emails](./transactional-emails.md) - Best practices for sending transactional emails
418
- - [Compliance](./compliance.md) - Legal requirements for each email type
@@ -1,92 +0,0 @@
1
- # Transactional Email Best Practices
2
-
3
- Clear, actionable emails that users expect and need—password resets, confirmations, OTPs.
4
-
5
- ## Core Principles
6
-
7
- 1. **Clarity over creativity** - Users need to understand and act quickly
8
- 2. **Action-oriented** - Clear purpose, obvious primary action
9
- 3. **Time-sensitive** - Send immediately (within seconds)
10
-
11
- ## Subject Lines
12
-
13
- **Be specific and include context:**
14
-
15
- | ✅ Good | ❌ Bad |
16
- |---------|--------|
17
- | Reset your password for [App] | Action required |
18
- | Your order #12345 has shipped | Update on your order |
19
- | Your 2FA code for [App] | Security code: 12345 |
20
- | Verify your email for [App] | Verify your email |
21
-
22
- Include identifiers when helpful: order numbers, account names, expiration times.
23
-
24
- ## Pre-Header
25
-
26
- The text snippet after subject line. Use it to:
27
- - Reinforce subject ("This link expires in 1 hour")
28
- - Add urgency or context
29
- - Call-to-action preview
30
-
31
- Keep under 90 characters.
32
-
33
- ## Content Structure
34
-
35
- **Above the fold (first screen):**
36
- - Clear purpose
37
- - Primary action button
38
- - Time-sensitive details (expiration)
39
-
40
- **Hierarchy:** Header → Primary message → Details → Action button → Secondary info
41
-
42
- **Format:** Short paragraphs (2-3 sentences), bullet points, bold for emphasis, white space.
43
-
44
- ## Mobile-First Design
45
-
46
- 60%+ emails are opened on mobile.
47
-
48
- - **Layout:** Single column, stack vertically
49
- - **Buttons:** 44x44px minimum, full-width on mobile
50
- - **Text:** 16px minimum body, 20-24px headings
51
- - **OTP codes:** 24-32px, monospace font
52
-
53
- ## Sender Configuration
54
-
55
- | Field | Best Practice | Example |
56
- |-------|--------------|---------|
57
- | From Name | App/company name, consistent | [App Name] |
58
- | From Email | Subdomain, real address | hello@mail.example.com |
59
- | Reply-To | Monitored inbox | support@example.com |
60
-
61
- Avoid `noreply@` - users reply to transactional emails.
62
-
63
- ## Code and Link Display
64
-
65
- **OTP/Verification codes:**
66
- - Large (24-32px), monospace font
67
- - Centered, clear label
68
- - Include expiration nearby
69
- - Make copyable
70
-
71
- **Buttons:**
72
- - Large, tappable (44x44px+)
73
- - Contrasting colors
74
- - Clear action text ("Reset Password", "Verify Email")
75
- - HTTPS links only
76
-
77
- ## Error Handling
78
-
79
- **Resend functionality:**
80
- - Allow after 60 seconds
81
- - Limit attempts (3 per hour)
82
- - Show countdown timer
83
-
84
- **Expired links:**
85
- - Clear "expired" message
86
- - Offer to send new link
87
- - Provide support contact
88
-
89
- **"I didn't request this":**
90
- - Include in password resets, OTPs, security alerts
91
- - Link to security contact
92
- - Log clicks for monitoring
@@ -1,167 +0,0 @@
1
- # Webhooks and Events
2
-
3
- Receiving and processing email delivery events in real-time.
4
-
5
- ## Event Types
6
-
7
- | Event | When Fired | Use For |
8
- |-------|------------|---------|
9
- | `email.sent` | Email accepted by Resend | Confirming send initiated |
10
- | `email.delivered` | Email delivered to recipient server | Confirming delivery |
11
- | `email.bounced` | Email bounced (hard or soft) | List hygiene, alerting |
12
- | `email.complained` | Recipient marked as spam | Immediate unsubscribe |
13
- | `email.opened` | Recipient opened email | Engagement tracking |
14
- | `email.clicked` | Recipient clicked link | Engagement tracking |
15
-
16
- ## Webhook Setup
17
-
18
- ### 1. Create Endpoint
19
-
20
- Your endpoint must:
21
- - Accept POST requests
22
- - Return 2xx status quickly (within 5 seconds)
23
- - Handle duplicate events (idempotent processing)
24
-
25
- ```typescript
26
- app.post('/webhooks/resend', async (req, res) => {
27
- // Return 200 immediately to acknowledge receipt
28
- res.status(200).send('OK');
29
-
30
- // Process asynchronously
31
- processWebhookAsync(req.body).catch(console.error);
32
- });
33
- ```
34
-
35
- ### 2. Verify Signatures
36
-
37
- Always verify webhook signatures to prevent spoofing.
38
-
39
- ```typescript
40
- import { Webhook } from 'svix';
41
-
42
- const webhook = new Webhook(process.env.RESEND_WEBHOOK_SECRET);
43
-
44
- app.post('/webhooks/resend', (req, res) => {
45
- try {
46
- const payload = webhook.verify(
47
- JSON.stringify(req.body),
48
- {
49
- 'svix-id': req.headers['svix-id'],
50
- 'svix-timestamp': req.headers['svix-timestamp'],
51
- 'svix-signature': req.headers['svix-signature'],
52
- }
53
- );
54
- // Process verified payload
55
- } catch (err) {
56
- return res.status(400).send('Invalid signature');
57
- }
58
- });
59
- ```
60
-
61
- ### 3. Register Webhook URL
62
-
63
- Configure your webhook endpoint in the Resend dashboard or via API.
64
-
65
- ## Processing Events
66
-
67
- ### Bounce Handling
68
-
69
- ```typescript
70
- async function handleBounce(event) {
71
- const { email_id, email, bounce_type } = event.data;
72
-
73
- if (bounce_type === 'hard') {
74
- // Permanent failure - remove from all lists
75
- await suppressEmail(email, 'hard_bounce');
76
- await removeFromAllLists(email);
77
- } else {
78
- // Soft bounce - track and remove after threshold
79
- await incrementSoftBounce(email);
80
- const count = await getSoftBounceCount(email);
81
- if (count >= 3) {
82
- await suppressEmail(email, 'soft_bounce_limit');
83
- }
84
- }
85
- }
86
- ```
87
-
88
- ### Complaint Handling
89
-
90
- ```typescript
91
- async function handleComplaint(event) {
92
- const { email } = event.data;
93
-
94
- // Immediate suppression - no exceptions
95
- await suppressEmail(email, 'complaint');
96
- await removeFromAllLists(email);
97
- await logComplaint(event); // For analysis
98
- }
99
- ```
100
-
101
- ### Delivery Confirmation
102
-
103
- ```typescript
104
- async function handleDelivered(event) {
105
- const { email_id } = event.data;
106
- await updateEmailStatus(email_id, 'delivered');
107
- }
108
- ```
109
-
110
- ## Idempotent Processing
111
-
112
- Webhooks may be sent multiple times. Use event IDs to prevent duplicate processing.
113
-
114
- ```typescript
115
- async function processWebhook(event) {
116
- const eventId = event.id;
117
-
118
- // Check if already processed
119
- if (await isEventProcessed(eventId)) {
120
- return; // Skip duplicate
121
- }
122
-
123
- // Process event
124
- await handleEvent(event);
125
-
126
- // Mark as processed
127
- await markEventProcessed(eventId);
128
- }
129
- ```
130
-
131
- ## Error Handling
132
-
133
- ### Retry Behavior
134
-
135
- If your endpoint returns non-2xx, webhooks will retry with exponential backoff:
136
- - Retry 1: ~30 seconds
137
- - Retry 2: ~1 minute
138
- - Retry 3: ~5 minutes
139
- - (continues for ~24 hours)
140
-
141
- ### Best Practices
142
-
143
- - **Return 200 quickly** - Process asynchronously to avoid timeouts
144
- - **Be idempotent** - Handle duplicate deliveries gracefully
145
- - **Log everything** - Store raw events for debugging
146
- - **Alert on failures** - Monitor webhook processing errors
147
- - **Queue for processing** - Use a job queue for complex handling
148
-
149
- ## Testing Webhooks
150
-
151
- **Local development:** Use ngrok or similar to expose localhost.
152
-
153
- ```bash
154
- ngrok http 3000
155
- # Use the ngrok URL as your webhook endpoint
156
- ```
157
-
158
- **Verify handling:** Send test events through Resend dashboard or manually trigger each event type.
159
-
160
- ## Ingest webhooks for data storage
161
- - [Open source repo](https://github.com/resend/resend-webhooks-ingester)
162
- - [Why store data](https://resend.com/docs/dashboard/webhooks/how-to-store-webhooks-data)
163
-
164
- ## Related
165
-
166
- - [List Management](./list-management.md) - What to do with bounce/complaint data
167
- - [Sending Reliability](./sending-reliability.md) - Retry logic when sends fail
@@ -1,35 +0,0 @@
1
- # Skill Tests
2
-
3
- Tests for the `email-best-practices` skill using the RED-GREEN methodology from [writing-skills](https://github.com/yourorg/writing-skills).
4
-
5
- ## Skill Type
6
-
7
- This is a **reference/technique** skill (not discipline-enforcing), so tests focus on:
8
-
9
- - **Retrieval** — Does the agent find the right resource for a given problem?
10
- - **Application** — Does the agent produce correct, specific guidance?
11
- - **Gap** — Are common email scenarios adequately covered?
12
-
13
- ## Test Scenarios
14
-
15
- | # | Scenario | Tests | Key Resource(s) |
16
- |---|----------|-------|-----------------|
17
- | 1 | Emails going to spam | Retrieval + Application | deliverability.md |
18
- | 2 | Multi-region compliance | Retrieval + Application | compliance.md |
19
- | 3 | Retry logic + idempotency | Application | sending-reliability.md |
20
- | 4 | Webhook bounce/complaint handling | Application | webhooks-events.md, list-management.md |
21
- | 5 | New SaaS email infrastructure | Retrieval + Application + Gap | All resources |
22
-
23
- ## Running Tests
24
-
25
- Each scenario in `scenarios/` is a self-contained prompt. Run with a subagent:
26
-
27
- **RED (baseline):** Run the prompt as-is — no skill loaded. The agent uses only general knowledge.
28
-
29
- **GREEN (with skill):** Prepend: `You have access to an email best practices skill with resources in <path>. Read SKILL.md first, then read the relevant resource file(s).`
30
-
31
- Compare outputs against `results.md` for expected correctness criteria.
32
-
33
- ## Results
34
-
35
- See `results.md` for the full RED vs GREEN comparison and gap analysis from the initial test campaign.