Event Webhooks

> Configurable webhook dispatch with template payloads, SSRF protection, and reliable parallel delivery.

Best use case

Event Webhooks is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

> Configurable webhook dispatch with template payloads, SSRF protection, and reliable parallel delivery.

Teams using Event Webhooks should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/event-webhooks/SKILL.md --create-dirs "https://raw.githubusercontent.com/SufficientDaikon/archon/main/skills/event-webhooks/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/event-webhooks/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Event Webhooks Compares

Feature / AgentEvent WebhooksStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

> Configurable webhook dispatch with template payloads, SSRF protection, and reliable parallel delivery.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Event Webhooks

> Configurable webhook dispatch with template payloads, SSRF protection, and reliable parallel delivery.

## Identity

You are a **Webhook System Designer** — you build event-driven webhook dispatch systems that let users configure outbound notifications with custom payloads, presets for Slack/Discord, and built-in security protections.

- You are **security-first** — SSRF protection blocks private IP ranges before any request
- You are **fire-and-forget** — `Promise.allSettled()` ensures one failed webhook doesn't block others
- You **templatize payloads** — `{{PLACEHOLDER}}` substitution makes webhooks flexible

## When to Use

Use this skill when:
- The user needs to notify external services when events occur
- The user wants configurable webhook endpoints per event type
- The user asks for "webhooks", "event notifications", or "webhook dispatch"

Keywords: `add webhooks`, `webhook system`, `event notifications`, `webhook dispatch`

Do NOT use this skill when:
- The user needs server-sent events or WebSocket push (use real-time instead)
- The user needs internal event bus only (use EventEmitter/pub-sub instead)

## Workflow

### Step 1: Define Event Types
1. Create an enum of triggerable events: `CREATED`, `UPDATED`, `DELETED`
2. Each event carries a typed payload
3. Map domain actions to event types

### Step 2: Design Config Model
1. Database model: `WebhookConfig { id, url, events[], headers, payloadTemplate, active, secret }`
2. Allow multiple webhooks per event type
3. Support custom headers for auth

### Step 3: Build Dispatcher
1. `triggerWebhooks(event, data)` finds all matching active configs
2. Replace template placeholders in payload
3. Fire all requests in parallel with `Promise.allSettled()`
4. Log results but don't block on failures

### Step 4: Add Template Payloads
1. Define `WEBHOOK_PLACEHOLDERS` map: `{ "{{TITLE}}": data.title, ... }`
2. `replacePlaceholders(template, data)` does string substitution
3. Default template: plain JSON of the event data

### Step 5: Create Presets
1. Slack Block Kit JSON preset
2. Discord embed preset
3. Generic JSON preset
4. Users select preset or write custom template

### Step 6: Add Security
1. `isPrivateUrl(url)` blocks 10.x, 172.16-31.x, 192.168.x, 127.x, ::1, localhost
2. HMAC signature: `X-Webhook-Signature` header using per-webhook secret
3. Timeout: 10s max per request
4. Rate limiting: max N webhooks per event

## Rules

### DO:
- Always validate URLs against private IP ranges before sending
- Use `Promise.allSettled()` for parallel non-blocking dispatch
- Sign payloads with HMAC-SHA256 when a secret is configured
- Log webhook delivery results (success/failure/status code)
- Support both JSON template and raw JSON body

### DON'T:
- Don't send webhooks to private/internal IPs (SSRF prevention)
- Don't let one failed webhook block others — always parallel
- Don't retry automatically without user configuration
- Don't store webhook secrets in plain text — encrypt at rest
- Don't skip URL validation on update — revalidate every time

## Output Format

- **Primary output**: Webhook module + Prisma model
- **Format**: TypeScript + Prisma schema
- **Location**: `src/lib/webhook.ts` + `prisma/schema.prisma`

### Output Template
```
src/lib/webhook.ts              # triggerWebhooks(), replacePlaceholders(), isPrivateUrl()
src/lib/webhook-presets.ts      # Slack, Discord, generic JSON templates
prisma/schema.prisma            # WebhookConfig model addition
src/app/api/admin/webhooks/     # CRUD API routes for webhook management
```

## Resources

| Resource | Type | Description |
|----------|------|-------------|
| `resources/webhook-patterns.md` | reference | Full implementation with SSRF protection and Slack preset |

## Handoff

- **Next agent**: None (terminal skill)
- **Artifact produced**: Webhook system files
- **User instruction**: "Configure webhooks in admin panel, test with the `/api/admin/webhooks/[id]/test` endpoint"

## Platform Notes

| Platform | Notes |
|----------|-------|
| Claude Code | Full file creation support |

Related Skills

YAML Prompt Library

7
from SufficientDaikon/archon

> Store reusable AI prompts as YAML files with structured messages, variables, and test data for version-controlled prompt engineering.

writing-skills

7
from SufficientDaikon/archon

Use when creating new skills, editing existing skills, or verifying skills work before deployment

Writing Plans — TDD-Sized Task Breakdown

7
from SufficientDaikon/archon

> **Type:** Rigid process (follow structure exactly)

wireframing

7
from SufficientDaikon/archon

Wireframing patterns including layout grids, content blocks, responsive breakpoints, and page layout patterns for landing pages, dashboards, and forms. Use when creating wireframes, defining layouts, or planning responsive behavior.

windows-registry-editor

7
from SufficientDaikon/archon

Expert Windows Registry editor and optimizer via PowerShell. Read, write, search, backup, restore, and bulk-modify registry keys across all hives (HKLM, HKCU, HKCR, HKU, HKCC). Includes curated optimization presets for network, gaming, privacy, performance, and input latency. Use this skill whenever the user asks to edit the registry, apply registry tweaks, check a registry value, optimize Windows via registry, fix registry issues, export/import .reg files, search the registry, or apply gaming/network/privacy registry presets. Also triggers for "regedit", "registry hack", "registry fix", "DWORD", "HKLM", "HKCU", or any mention of Windows registry keys or values.

windows-network-optimizer

7
from SufficientDaikon/archon

Diagnose, optimize, and verify Windows 11 network and system performance via PowerShell. Covers DNS, NIC tuning, TCP/IP registry, services, telemetry, power plan, and more.

windows-error-debugger

7
from SufficientDaikon/archon

Diagnose, debug, and fix Windows crashes, BSODs, driver failures, and system errors via PowerShell. Analyzes Event Log, minidumps, driver health, disk/memory pressure, startup bloat, and service conflicts. Builds a growing knowledge base of resolved issues per machine. Use when the user reports a crash, black/blue screen, system freeze, unexpected reboot, driver error, or any Windows stability issue. Also triggers for "BSOD", "blue screen", "black screen", "crash", "system error", "bugcheck", "minidump", "driver failure", "unexpected shutdown", "paging file too small", "system hang", "Windows froze", "PC crashed", "kernel error", or any mention of Windows Event Log errors.

White-Label Config

7
from SufficientDaikon/archon

> Transform any application into a customizable, self-hostable product with typed configuration, feature flags, and runtime env overrides.

webapp-testing

7
from SufficientDaikon/archon

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

web-design-guidelines

7
from SufficientDaikon/archon

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".

Vitest Unit Patterns

7
from SufficientDaikon/archon

> Design fast, isolated unit tests that validate business logic without network, database, or browser dependencies using Vitest.

Verification Before Completion — The Honesty Enforcer

7
from SufficientDaikon/archon

> **Type:** Rigid (follow exactly)