[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7525M58QH95J91T7QRYS6B8":3,"skill-same:01M7525M58QH95J91T7QRYS6B8":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":31,"ownerHtmlUrl":32,"ownerBlogUrl":31,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M7525M58QH95J91T7QRYS6B8","webhook-receiver-hardener",null,"Hardens an inbound webhook endpoint so it verifies the sender signature on the raw body, resists replays, and acknowledges fast by persisting-then-enqueueing before any processing. Use when building or reviewing a handler that receives webhooks from Stripe, GitHub, or any third party, when adding HMAC signature verification, or when a sender is replaying events or hammering you with retries after slow acks.","SkillMedev\u002Fskills","SkillMedev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F298078254?v=4","01M74ZSGTQ918CB0VXW4EG3RMX","SkillMe","01M74ZSGVBT497NA95CBT8JTY4",25,"MIT","https:\u002F\u002Fgithub.com\u002FSkillMedev\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwebhook-receiver-hardener\u002FSKILL.md",[],[],"2026-11-11 18:27:18",false,"---\nname: webhook-receiver-hardener\ndescription: Hardens an inbound webhook endpoint so it verifies the sender signature on the raw body, resists replays, and acknowledges fast by persisting-then-enqueueing before any processing. Use when building or reviewing a handler that receives webhooks from Stripe, GitHub, or any third party, when adding HMAC signature verification, or when a sender is replaying events or hammering you with retries after slow acks.\nmetadata:\n  title: \"Webhook Receiver Hardener\"\n---\n# Webhook Receiver Hardener\n\nTurn an inbound webhook route into hostile-input-safe code: verify before you trust, persist before you ack, ack before you process.\n\nA webhook endpoint is an unauthenticated, internet-facing write path that an attacker can spam and a flaky sender will hammer with retries. Treat every byte as untrusted until the signature checks out.\n\n## Workflow\n\n1. **Capture the raw body.** Read the exact request bytes before any JSON parse or body-parsing middleware runs. A re-encoded body changes whitespace and ordering and silently breaks the HMAC. If the framework buffers\u002Freserializes by default, disable it for this route.\n2. **Verify the signature.** Compute the HMAC over the raw bytes with the signing secret loaded from config. Compare with a constant-time equality function - never `==` or string compare. Support two active secrets so secret rotation does not drop traffic. Reject failures with 401 before doing any other work.\n3. **Reject replays by timestamp.** Most providers sign a timestamp alongside the payload. Verify it is part of the signed material, then reject requests whose timestamp falls outside a tolerance window (commonly 5 minutes) to blunt captured-request replay.\n4. **Persist the raw event, then enqueue, then ack.** Synchronously do only the minimum: store the verified raw payload and its event ID durably, enqueue a background job, return 2xx. Return success only after the event is durably stored so a crash mid-processing causes safe redelivery rather than silent loss.\n5. **Process asynchronously and order-tolerantly.** Run all business logic in the background worker, not the request. Webhooks arrive out of order, so never assume sequence: act on the event's own version\u002Ftimestamp, or refetch current state from the provider's API rather than mutating from a possibly-stale payload. For strict ordering, partition the queue by resource ID.\n6. **Return the right status.** 2xx tells the sender to stop retrying; non-2xx requests a retry. A malformed-but-authentic event goes to a dead-letter queue and is acked, not retried forever. Log event ID and type on every receipt.\n\n## Worked example\n\nThe classic broken handler versus the hardened one (Express + Stripe-style signatures):\n\n**Bad:**\n\n```js\napp.use(express.json()); \u002F\u002F global parser destroys the raw body\n\napp.post(\"\u002Fwebhooks\u002Fstripe\", async (req, res) => {\n  if (req.headers[\"stripe-signature\"] !== computeSig(JSON.stringify(req.body))) {\n    return res.status(401).end();       \u002F\u002F re-serialized body ≠ signed bytes; string compare leaks timing\n  }\n  await fulfillOrder(req.body);          \u002F\u002F business logic inside the request\n  await sendReceiptEmail(req.body);      \u002F\u002F slow third-party call before the ack\n  res.status(200).end();                 \u002F\u002F sender already timed out and is retrying\n});\n```\n\nThree failures: the HMAC is computed over a re-encoded body (verification breaks or, worse, gets disabled \"temporarily\"), `!==` is not constant-time, and the ack waits on business logic - so the sender times out, retries, and double-fulfills.\n\n**Good:**\n\n```js\napp.post(\"\u002Fwebhooks\u002Fstripe\",\n  express.raw({ type: \"application\u002Fjson\" }),   \u002F\u002F raw bytes, this route only\n  async (req, res) => {\n    const sig = req.headers[\"stripe-signature\"];\n    if (!verifySignatureConstantTime(req.body, sig, [SECRET_CURRENT, SECRET_PREVIOUS])) {\n      return res.status(401).end();\n    }\n    if (!timestampWithinTolerance(sig, 300)) {   \u002F\u002F 5-minute replay window\n      return res.status(401).end();\n    }\n    const event = JSON.parse(req.body);          \u002F\u002F parse only after verification\n    await store.saveRawEvent(event.id, req.body); \u002F\u002F durable first\n    await queue.enqueue(\"webhook\", { eventId: event.id });\n    res.status(200).end();                        \u002F\u002F ack in milliseconds; work happens in the worker\n  });\n```\n\n## Quality bar\n\n- Signature is verified against raw bytes with a constant-time compare; tampered or unsigned requests get 401 and touch nothing else.\n- Two signing secrets are accepted during rotation; neither is hardcoded.\n- Replays outside the timestamp window are rejected.\n- The synchronous path is verify → persist → enqueue → 2xx, with no business logic, downstream calls, or blocking DB writes beyond the durable store.\n- A process crash after ack cannot lose the event; redelivery re-runs it safely.\n\n## Deliverable\n\nProduce a hardened webhook receiver consisting of:\n\n1. **The route handler** implementing the verify → persist → enqueue → ack pipeline, with raw-body capture scoped to this route.\n2. **The verification module**: constant-time HMAC check over raw bytes, dual-secret rotation support, and timestamp-window replay rejection.\n3. **The background worker skeleton** that loads the stored raw event by ID, processes order-tolerantly, and routes poison events to a dead-letter queue.\n4. **A checklist of what was hardened** - each Quality bar item marked verified, plus any provider-specific notes (header names, tolerance window, retry policy).\n\n## Do NOT\n\n- Do NOT parse JSON or run middleware before computing the HMAC over the raw body.\n- Do NOT compare signatures with `==` or ordinary string equality - use a constant-time compare.\n- Do NOT run business logic, call other services, or block on slow DB work inside the request; slow acks trigger sender timeouts and a retry storm.\n- Do NOT return 2xx before the event is durably persisted or enqueued.\n- Do NOT trust the payload's field order or arrival order to imply event sequence.\n- Do NOT disable signature verification for any third-party webhook, even in staging or for local convenience.\n- Do NOT use when the call is an internal, mutually-authenticated service-to-service request over mTLS - that channel may not need application-layer HMAC.\n- Do NOT use this skill to design the dedup-key mechanism that makes downstream handlers idempotent (which event-ID column, where it lives, how effects key off it) - use idempotency-enforcer instead. This skill stores the raw event and acks; idempotency-enforcer owns deduplication semantics.\n","# Webhook Receiver Hardener\n\nTurn an inbound webhook route into hostile-input-safe code: verify before you trust, persist before you ack, ack before you process.\n\nA webhook endpoint is an unauthenticated, internet-facing write path that an attacker can spam and a flaky sender will hammer with retries. Treat every byte as untrusted until the signature checks out.\n\n## Workflow\n\n1. **Capture the raw body.** Read the exact request bytes before any JSON parse or body-parsing middleware runs. A re-encoded body changes whitespace and ordering and silently breaks the HMAC. If the framework buffers\u002Freserializes by default, disable it for this route.\n2. **Verify the signature.** Compute the HMAC over the raw bytes with the signing secret loaded from config. Compare with a constant-time equality function - never `==` or string compare. Support two active secrets so secret rotation does not drop traffic. Reject failures with 401 before doing any other work.\n3. **Reject replays by timestamp.** Most providers sign a timestamp alongside the payload. Verify it is part of the signed material, then reject requests whose timestamp falls outside a tolerance window (commonly 5 minutes) to blunt captured-request replay.\n4. **Persist the raw event, then enqueue, then ack.** Synchronously do only the minimum: store the verified raw payload and its event ID durably, enqueue a background job, return 2xx. Return success only after the event is durably stored so a crash mid-processing causes safe redelivery rather than silent loss.\n5. **Process asynchronously and order-tolerantly.** Run all business logic in the background worker, not the request. Webhooks arrive out of order, so never assume sequence: act on the event's own version\u002Ftimestamp, or refetch current state from the provider's API rather than mutating from a possibly-stale payload. For strict ordering, partition the queue by resource ID.\n6. **Return the right status.** 2xx tells the sender to stop retrying; non-2xx requests a retry. A malformed-but-authentic event goes to a dead-letter queue and is acked, not retried forever. Log event ID and type on every receipt.\n\n## Worked example\n\nThe classic broken handler versus the hardened one (Express + Stripe-style signatures):\n\n**Bad:**\n\n```js\napp.use(express.json()); \u002F\u002F global parser destroys the raw body\n\napp.post(\"\u002Fwebhooks\u002Fstripe\", async (req, res) => {\n  if (req.headers[\"stripe-signature\"] !== computeSig(JSON.stringify(req.body))) {\n    return res.status(401).end();       \u002F\u002F re-serialized body ≠ signed bytes; string compare leaks timing\n  }\n  await fulfillOrder(req.body);          \u002F\u002F business logic inside the request\n  await sendReceiptEmail(req.body);      \u002F\u002F slow third-party call before the ack\n  res.status(200).end();                 \u002F\u002F sender already timed out and is retrying\n});\n```\n\nThree failures: the HMAC is computed over a re-encoded body (verification breaks or, worse, gets disabled \"temporarily\"), `!==` is not constant-time, and the ack waits on business logic - so the sender times out, retries, and double-fulfills.\n\n**Good:**\n\n```js\napp.post(\"\u002Fwebhooks\u002Fstripe\",\n  express.raw({ type: \"application\u002Fjson\" }),   \u002F\u002F raw bytes, this route only\n  async (req, res) => {\n    const sig = req.headers[\"stripe-signature\"];\n    if (!verifySignatureConstantTime(req.body, sig, [SECRET_CURRENT, SECRET_PREVIOUS])) {\n      return res.status(401).end();\n    }\n    if (!timestampWithinTolerance(sig, 300)) {   \u002F\u002F 5-minute replay window\n      return res.status(401).end();\n    }\n    const event = JSON.parse(req.body);          \u002F\u002F parse only after verification\n    await store.saveRawEvent(event.id, req.body); \u002F\u002F durable first\n    await queue.enqueue(\"webhook\", { eventId: event.id });\n    res.status(200).end();                        \u002F\u002F ack in milliseconds; work happens in the worker\n  });\n```\n\n## Quality bar\n\n- Signature is verified against raw bytes with a constant-time compare; tampered or unsigned requests get 401 and touch nothing else.\n- Two signing secrets are accepted during rotation; neither is hardcoded.\n- Replays outside the timestamp window are rejected.\n- The synchronous path is verify → persist → enqueue → 2xx, with no business logic, downstream calls, or blocking DB writes beyond the durable store.\n- A process crash after ack cannot lose the event; redelivery re-runs it safely.\n\n## Deliverable\n\nProduce a hardened webhook receiver consisting of:\n\n1. **The route handler** implementing the verify → persist → enqueue → ack pipeline, with raw-body capture scoped to this route.\n2. **The verification module**: constant-time HMAC check over raw bytes, dual-secret rotation support, and timestamp-window replay rejection.\n3. **The background worker skeleton** that loads the stored raw event by ID, processes order-tolerantly, and routes poison events to a dead-letter queue.\n4. **A checklist of what was hardened** - each Quality bar item marked verified, plus any provider-specific notes (header names, tolerance window, retry policy).\n\n## Do NOT\n\n- Do NOT parse JSON or run middleware before computing the HMAC over the raw body.\n- Do NOT compare signatures with `==` or ordinary string equality - use a constant-time compare.\n- Do NOT run business logic, call other services, or block on slow DB work inside the request; slow acks trigger sender timeouts and a retry storm.\n- Do NOT return 2xx before the event is durably persisted or enqueued.\n- Do NOT trust the payload's field order or arrival order to imply event sequence.\n- Do NOT disable signature verification for any third-party webhook, even in staging or for local convenience.\n- Do NOT use when the call is an internal, mutually-authenticated service-to-service request over mTLS - that channel may not need application-layer HMAC.\n- Do NOT use this skill to design the dedup-key mechanism that makes downstream handlers idempotent (which event-ID column, where it lives, how effects key off it) - use idempotency-enforcer instead. This skill stores the raw event and acks; idempotency-enforcer owns deduplication semantics.\n",{"name":5,"metadata":24,"description":7},{"title":25},"Webhook Receiver Hardener","main","97a13607d669157a4a16d5ba79b77f208319f7b9","skills\u002Fwebhook-receiver-hardener",3,"https:\u002F\u002Fgithub.com\u002FSkillMedev\u002Fskills","https:\u002F\u002Fskillme.dev","https:\u002F\u002Fgithub.com\u002FSkillMedev","MCP-native catalog of Claude Agent Skills. Browse, recommend, install, and auto-apply skills in chat. Open source, every skill free and clonable on GitHub.","2026-10-14 03:19:31",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add SkillMedev\u002Fskills --skill webhook-receiver-hardener",{"tool":41,"command":42},"bunx","bunx skills add SkillMedev\u002Fskills --skill webhook-receiver-hardener",{"tool":44,"command":45},"pnpm","pnpm dlx skills add SkillMedev\u002Fskills --skill webhook-receiver-hardener","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSkillMedev\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwebhook-receiver-hardener\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M75271B256DF3FX2VG5VRYEE","zone-2-cardio-plan","Use when someone asks to build a steady-state cardio plan, train an aerobic base or Zone 2, structure easy or endurance weekly cardio, train by heart-rate zones, or improve resting heart rate, VO2, or endurance. Builds a heart-rate-zone aerobic training block with session structure, modality choice, and progression. General fitness guidance, not medical advice. Do NOT use to design a strength or lifting program (use Strength Training Plan), high-intensity interval conditioning, HIIT, or circuits (use Conditioning & HIIT Program), or a mobility\u002Fflexibility routine (use Mobility Routine).","https:\u002F\u002Fgithub.com\u002FSkillMedev\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzone-2-cardio-plan\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7526VP1QBBKYBE17S1WR86Y","youtube-script-writer","Writes retention-engineered long-form YouTube scripts on a hook\u002Fbody\u002Fpayoff architecture - a first-30-seconds hook that survives the retention cliff, a beat-sheet body with mini-hooks and bridges, timed pattern interrupts, and a payoff that over-delivers - with B-roll and editing cues marked inline. Use when someone says \"script my next video\", \"my retention graph dies at the start\", \"tighten this draft\", or \"outline a video on X\". Do NOT use for the 3-second opener of TikTok, Reels, or Shorts - use video-hook-writer instead; do NOT use for spoken voiceover synced to on-screen tutorial actions - use narration-script instead; do NOT use for a sales demo built on a buyer's discovery notes - use demo-script instead; do NOT use to design the thumbnail and title - use thumbnail-concept instead.","https:\u002F\u002Fgithub.com\u002FSkillMedev\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fyoutube-script-writer\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7526P2T0WKMHDXS4Q58237T","win-back-campaign","Designs segmented win-back email sequences for dormant users - dormancy tiers, a three-beat sequence with a single proportional incentive, and a suppression rule - and measures success by re-activation, not opens. Use when someone says \"our users went quiet\", \"design a win-back campaign\", \"how do I re-engage lapsed customers\", \"should we email people who haven't logged in for months\", or lifecycle messaging has stopped landing with a lapsed segment. Do NOT use for recovering an unfinished checkout - use abandoned-cart-sequence instead. Do NOT use for diagnosing and fixing why active customers cancel - use churn-reduction instead. Do NOT use for building always-on onboarding or nurture flows - use email-drip-builder instead.","https:\u002F\u002Fgithub.com\u002FSkillMedev\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwin-back-campaign\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7526HF2RCDJ50P93WRZRHVV","wikipedia-style","Writes neutral, verifiable, encyclopedic prose following Wikipedia's core content policies and manual of style - NPOV, inline citations, notability-backed claims, and a strict ban on promotional language. Use when someone asks \"write this like a Wikipedia article\", \"draft a Wikipedia page for this company or person\", \"make this neutral and encyclopedic\", or \"why does my article draft keep getting rejected\". Do NOT use for persuasive or opinion writing - use op-ed-writer instead; for thesis-driven academic papers, use academic-essay; for verifying claims in existing text, use fact-checker.","https:\u002F\u002Fgithub.com\u002FSkillMedev\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwikipedia-style\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7526D43CTGRKGKNQ2GB0KVX","whitepapers","Structures and writes authoritative B2B whitepapers - a standalone executive summary, a data-sized problem statement, methodology, evidence-driven findings, recommendations, and a soft call to action - flagging every claim that needs a real citation. Use when a marketer asks \"write a whitepaper on this topic\", \"turn our research into a lead-gen asset\", \"make this credible enough for executives\", or a draft reads like a product pitch instead of analysis. Do NOT use for customer-story-driven proof - use case-study-builder instead; for policy audiences, use policy-brief.","https:\u002F\u002Fgithub.com\u002FSkillMedev\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwhitepapers\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M75268423Y3K50SY5WC2NX2G","white-space-analysis","Finds unmet market gaps by ranking jobs-to-be-done on importance versus satisfaction, overlaying them against current solutions and workarounds, and validating that each gap is real, winnable, and worth winning. Use when someone asks \"where are the gaps in this market\", \"what's underserved here\", \"where should we play next\", or is hunting for product, feature, or market-entry opportunities. Do NOT use for profiling competitors and building battle cards - use competitive-intelligence instead; for putting a dollar figure on an identified opportunity - use market-sizing instead; for extracting jobs-to-be-done from raw customer interviews - use jtbd-extractor instead.","https:\u002F\u002Fgithub.com\u002FSkillMedev\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwhite-space-analysis\u002FSKILL.md",[],[]]