本文へスキップ
Skillpedia
自動化31k · #9318

webhook-transforms

できること

このスキルは、外部のサービスがブレインにイベントを送れる仕組みを設定します。各イベントは、情報源を記したページに変換され、失敗したイベントは失われずに保存されます。

使う場面

  • ✓テキスト、会議の結果、ソーシャルメディアの言及を、自動でブレインに保存したいとき。
  • ✓外部のイベントをどうブレインのページに変換するか定義したいとき。
  • ✓変換に失敗したとき、そのイベントがどうなるか確認したいとき。

スキルのリンク

https://github.com/garrytan/gbrain/blob/master/plugin/skills/webhook-transforms/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/garrytan/gbrain/blob/master/plugin/skills/webhook-transforms/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“録音アプリが送ってくる会議の要約はすべて、ブレインのページとして保存してください。失敗したイベントは保管してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、イベントのデータをブレインのページに変える変換の手順を定義し、外部のサービスが呼び出せるアドレスを登録します。変換が失敗した場合、生のデータは保留フォルダに保存され、一度再試行されます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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. Register webhook URL. Provide the external service with the webhook endpoint.

  3. On event received:

    • Parse payload
    • Run transform function
    • Write brain page via gbrain put
    • Extract entities, run enrichment
    • Add timeline entries to mentioned entities
    • Sync: gbrain sync
  4. Error handling:

    • If transform throws: log raw payload to _dead-letter/{timestamp}.md
    • 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_path}"

When it fails

Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:

  • A transformed write returns write_pending (exit 10): the event is accepted; record the request id and poll it, never replay the event under a new id.
  • source_binding_required / insufficient_scope: the webhook's token cannot write that source; tell the user which grant the brain host's operator must add.
  • A malformed payload: reject it with the parse error and log it; do not write a partial page.

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
よくある質問

変換に失敗したらどうなりますか?

生のイベントは保留フォルダに保存され、一度再試行されるため、イベントは失われません。

保存する前にウェブの内容は整えられますか?

はい。HTMLとスクリプトの内容が取り除かれ、ブレインのページに生のコードが残らないようにします。

届いたイベントは人物や会社にリンクされますか?

はい。各イベントに対してエンティティの検出を行い、関係する人物のタイムラインに項目を追加します。

詳細

作者による元の説明

Generic framework for converting external events (SMS, meetings, social mentions) into brain-ingestible signals. Define a transform function, register a webhook URL, and incoming events get processed through the brain pipeline.

repo: garrytan/gbrain

人気

GitHubのスター
31k
ランキング
#9318
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル