본문으로 건너뛰기
Skillpedia
자동화31k · #9318

webhook-transforms

하는 일

이 스킬은 외부 서비스가 브레인으로 이벤트를 보낼 수 있는 방법을 설정합니다. 각 이벤트는 출처가 표시된 페이지로 바뀌고, 변환에 실패한 이벤트는 잃지 않고 저장됩니다.

사용하는 경우

  • ✓문자, 회의 결과, 소셜 언급을 브레인에 자동으로 저장하고 싶을 때.
  • ✓외부 이벤트를 브레인 페이지로 바꾸는 방법을 정의하고 싶을 때.
  • ✓변환이 실패했을 때 이벤트에 무슨 일이 일어나는지 확인해야 할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/garrytan/gbrain/blob/master/plugin/skills/webhook-transforms/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 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

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬