webhook-handler
Installation
SKILL.md
Add a New Webhook Event Handler
Follow these steps exactly. Do not skip any step.
Step 1: Write Failing Tests
Create test file tests/events/<handler-name>.test.ts with test cases for:
- Valid payload parsing
- Invalid payload rejection (returns
err) - Edge cases (system notes, ignored actions)
Run bun test to confirm the tests fail.
Step 2: Add Zod Schema
In src/events/parser.ts:
- Define the Zod schema for the new event payload
- Export the inferred TypeScript type