[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EG4DFW16FERFBA376S92ZT":3,"skill-same:01M6EG4DFW16FERFBA376S92ZT":51},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":25,"repositoryHtmlUrl":26,"repositoryHomepageUrl":27,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M6EG4DFW16FERFBA376S92ZT","sendgrid",null,"ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fsendgrid\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"# SendGrid\n\n## Overview\n\nSendGrid (by Twilio) is the most widely-used transactional email service. It handles email delivery at scale — from single welcome emails to millions of marketing messages. This skill covers sending emails via API and SMTP, dynamic templates, bulk\u002Fbatch sending, event webhooks (opens, clicks, bounces), email validation, and deliverability configuration (SPF, DKIM, domain authentication).\n\n## Instructions\n\n### Step 1: Setup\n\n```bash\n# Node.js\nnpm install @sendgrid\u002Fmail\n\n# Python\npip install sendgrid\n```\n\n```typescript\n\u002F\u002F lib\u002Femail.ts — SendGrid client setup\nimport sgMail from '@sendgrid\u002Fmail'\n\nsgMail.setApiKey(process.env.SENDGRID_API_KEY!)\n```\n\n### Step 2: Send Single Email\n\n```typescript\n\u002F\u002F send-email.ts — Send a transactional email\nimport sgMail from '@sendgrid\u002Fmail'\n\nsgMail.setApiKey(process.env.SENDGRID_API_KEY!)\n\n\u002F\u002F Simple text\u002FHTML email\nawait sgMail.send({\n  to: 'recipient@example.com',\n  from: { email: 'noreply@myapp.com', name: 'My App' },\n  subject: 'Welcome to My App',\n  text: 'Thanks for signing up!',\n  html: '\u003Ch1>Welcome!\u003C\u002Fh1>\u003Cp>Thanks for signing up.\u003C\u002Fp>',\n})\n\n\u002F\u002F With dynamic template (recommended for production)\nawait sgMail.send({\n  to: 'recipient@example.com',\n  from: { email: 'noreply@myapp.com', name: 'My App' },\n  templateId: 'd-abc123def456',    \u002F\u002F template ID from SendGrid dashboard\n  dynamicTemplateData: {\n    name: 'Alex',\n    action_url: 'https:\u002F\u002Fmyapp.com\u002Fverify?token=xyz',\n    company_name: 'My App',\n  },\n})\n```\n\n### Step 3: Bulk Sending\n\n```typescript\n\u002F\u002F bulk-send.ts — Send to multiple recipients efficiently\n\u002F\u002F sendMultiple sends individual emails (each recipient only sees their own address)\n\nawait sgMail.sendMultiple({\n  to: ['user1@example.com', 'user2@example.com', 'user3@example.com'],\n  from: { email: 'noreply@myapp.com', name: 'My App' },\n  templateId: 'd-abc123def456',\n  dynamicTemplateData: { announcement: 'New feature launched!' },\n})\n\n\u002F\u002F Personalized bulk send (different data per recipient)\nconst messages = users.map(user => ({\n  to: user.email,\n  from: { email: 'noreply@myapp.com', name: 'My App' },\n  templateId: 'd-abc123def456',\n  dynamicTemplateData: {\n    name: user.name,\n    plan: user.plan,\n    usage: user.monthlyUsage,\n  },\n}))\n\n\u002F\u002F Send in batches of 1000 (SendGrid limit per API call)\nfor (let i = 0; i \u003C messages.length; i += 1000) {\n  await sgMail.send(messages.slice(i, i + 1000))\n}\n```\n\n### Step 4: Event Webhooks\n\n```typescript\n\u002F\u002F app\u002Fapi\u002Fwebhooks\u002Fsendgrid\u002Froute.ts — Process email events\n\u002F\u002F SendGrid posts events when emails are delivered, opened, clicked, bounced, etc.\n\nimport { NextRequest, NextResponse } from 'next\u002Fserver'\n\ntype SendGridEvent = {\n  email: string\n  event: 'delivered' | 'open' | 'click' | 'bounce' | 'dropped' | 'spamreport' | 'unsubscribe'\n  timestamp: number\n  sg_message_id: string\n  url?: string           \u002F\u002F for click events\n  reason?: string        \u002F\u002F for bounce\u002Fdrop events\n}\n\nexport async function POST(req: NextRequest) {\n  const events: SendGridEvent[] = await req.json()\n\n  for (const event of events) {\n    switch (event.event) {\n      case 'bounce':\n        \u002F\u002F Mark email as invalid in your database\n        await db.users.update({ email: event.email }, { emailBounced: true })\n        break\n      case 'spamreport':\n      case 'unsubscribe':\n        \u002F\u002F Respect opt-out immediately\n        await db.users.update({ email: event.email }, { emailOptOut: true })\n        break\n      case 'open':\n        await db.emailEvents.create({ type: 'open', email: event.email, messageId: event.sg_message_id })\n        break\n      case 'click':\n        await db.emailEvents.create({ type: 'click', email: event.email, url: event.url })\n        break\n    }\n  }\n\n  return NextResponse.json({ received: true })\n}\n```\n\n### Step 5: Domain Authentication\n\n```bash\n# Set up domain authentication for deliverability\n# In SendGrid dashboard: Settings → Sender Authentication → Domain Authentication\n# This adds DNS records for your domain:\n\n# SPF — tells receiving servers that SendGrid can send on your behalf\n# Type: CNAME, Host: em1234.yourdomain.com → u1234.wl.sendgrid.net\n\n# DKIM — cryptographic signature proving email integrity\n# Type: CNAME, Host: s1._domainkey.yourdomain.com → s1.domainkey.u1234.wl.sendgrid.net\n# Type: CNAME, Host: s2._domainkey.yourdomain.com → s2.domainkey.u1234.wl.sendgrid.net\n\n# After adding DNS records, verify in SendGrid dashboard\n# Deliverability improves significantly with proper authentication\n```\n\n## Examples\n\n### Example 1: Set up transactional email for a SaaS app\n**User prompt:** \"I need to send welcome emails, password resets, and invoice receipts. Set up SendGrid with templates and track delivery.\"\n\nThe agent will:\n1. Configure SendGrid with domain authentication.\n2. Create dynamic templates for each email type in the dashboard.\n3. Build a reusable email service module with template-based sending.\n4. Set up event webhooks to track delivery, bounces, and opt-outs.\n5. Add bounce handling to prevent sending to invalid addresses.\n\n## Guidelines\n\n- Always use dynamic templates instead of inline HTML — they're version-controlled in SendGrid, support A\u002FB testing, and non-engineers can edit them.\n- Set up domain authentication (SPF + DKIM) before sending production emails. Without it, your emails will land in spam.\n- Handle bounces and unsubscribes immediately via webhooks — continuing to send to bounced addresses damages your sender reputation.\n- Use `sendMultiple` (not `send` with multiple `to` addresses) for bulk emails — it sends individual messages so recipients don't see each other's addresses.\n- SendGrid's free tier includes 100 emails\u002Fday. For production, the Essentials plan starts at $20\u002Fmonth for 50K emails.\n- Always include an unsubscribe link in marketing emails — it's required by CAN-SPAM law and improves deliverability.\n",{},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FTerminalSkills\u002Fskills\u002Fsendgrid",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill sendgrid",{"tool":37,"command":38},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill sendgrid",{"tool":40,"command":41},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill sendgrid","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FTerminalSkills\u002Fskills\u002Fsendgrid\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"LICENSE.txt","LICENSE","许可证",10174,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.qwen\u002Fskills\u002Ffrontend-design\u002FLICENSE.txt",[52,61,70,79,85,91],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[58,59,60],"model","model hierarchy","model hierarchy skill",{"skillNo":62,"name":63,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[67,68,69],"MCP","zoom","zoom mcp",{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[76,77,78,68],"sdk","zoom apps sdk","apps",{"skillNo":80,"name":81,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[81],{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":18},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[87],{"skillNo":92,"name":93,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":18},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[93]]