Skip to content
Back to skills

Webhook Transforms

ASecurity

Generic framework for converting external events (SMS, meetings, social mentions) into brain-ingestible signals. Define a transform function, point the event source at the receiving endpoint, and incoming events get processed through the brain pipeline.

  • 11 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 28, 2026
ai-agents

Works with

  • mcp

Security analysis

A100/100

Scanned September 28, 2026

npx -y skills add timurgaleev/memex --skill webhook-transforms --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Webhook Transforms?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Webhook Transforms
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/timurgaleev-webhook-transforms/badge)](https://www.skillsdirectory.com/skills/timurgaleev-webhook-transforms)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: webhook-transforms
version: 1.0.0
description: |
  Generic framework for converting external events (SMS, meetings, social mentions)
  into brain-ingestible signals. Define a transform function, point the event source
  at the receiving endpoint, and incoming events get processed through the brain
  pipeline.
triggers:
  - "set up webhook"
  - "process webhook event"
  - "transform this event"
tools:
  - page_put
  - add_timeline_event
  - search
  - put_raw_data
mutating: true
---

# Webhook Transforms

## Contract

This skill guarantees:
- External events are transformed into brain pages with proper citations
- Raw payloads are preserved (dead-letter queue if transform fails)
- Entity extraction runs on every transformed event
- Input sanitization: no raw HTML/script passes to brain pages
- Error handling: transform failure logs raw payload, retries once

## Phases

1. **Define transform.** Map event schema to brain page format:
   - Input: raw webhook payload (JSON)
   - Output: brain page content (markdown) + metadata (slug, type, citations)
   - Must sanitize: strip HTML tags, escape script content

2. **Wire up delivery.** Point the external service at whatever endpoint the
   operator exposes (host-side reverse proxy, or the agent harness's own
   inbound channel). The brain itself is not the webhook listener — events
   land with the agent, which runs the transform and writes over MCP.

3. **On event received:**
   - Parse payload
   - Run transform function
   - Write brain page via `page_put` (indexing happens on write — the brain
     is DB-canonical, no separate sync step)
   - Extract entities, run enrichment
   - Add timeline entries to mentioned entities via `add_timeline_event`

4. **Error handling:**
   - If transform throws: preserve the raw payload via `put_raw_data` and
     write a dead-letter page at `_dead-letter/{timestamp}` referencing it
   - Surface error type to agent
   - Retry once
   - Don't lose events

## Example Transforms

### SMS Received
```
Input: {from: "+1555...", body: "Meeting moved to 3pm", timestamp: "..."}
Output: Timeline entry on sender's brain page + task update if action item detected
```

### Meeting Completed
```
Input: {title: "Weekly sync", attendees: [...], transcript: "...", summary: "..."}
Output: Delegate to meeting-ingestion skill
```

### Social Mention
```
Input: {platform: "twitter", author: "@handle", text: "...", url: "..."}
Output: Brain page in media/ + entity extraction + backlinks
```

## Output Format

Event transformed and written to brain. Report: "Webhook: {event_type} from {source}
→ {brain_page_slug}"

## Anti-Patterns

- Passing raw HTML/script to brain pages (XSS risk)
- Silently dropping events when transform fails (use dead-letter queue)
- Processing webhooks without entity extraction
- Not sanitizing external input before brain writes

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.