Community生產力與協作github.com

claude-office-skills/webhook-automation

建置與管理基於 Webhook 的即時事件處理與 API 連接整合

webhook-automation 是什麼?

這項技能專為 Claude Code、Cursor 或 Codex 等 AI 代理工具設計,幫助開發者建置與管理 Webhook 整合,實現即時事件處理與 API 連接。它涵蓋 Webhook 伺服器設定、端點註冊、安全驗證(如 HMAC 簽章)、事件驅動的自動化工作流程,以及與 Slack、GitHub、Stripe 等第三方服務的整合。技能支援多種平台與框架,包含 Node.js、Python(FastAPI/Flask)與 Express.js,並提供指令列工具來快速建立、測試與監控 Webhook。透過這項技能,開發者可以輕鬆打造事件驅動的架構,減少輪詢負擔,並確保資料傳輸的安全性與可靠性。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/claude-office-skills/skills/tree/main/skills/webhook-automation

Installed? Explore more 生產力與協作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

webhook-automation 是做什麼的?

建置與管理基於 Webhook 的即時事件處理與 API 連接整合

概覽

此技能提供建置、管理與監控 Webhook 整合的完整解決方案,支援即時事件驅動架構。開發者可以使用它來設定 Webhook 伺服器、註冊端點、實作安全機制,並與外部服務(如 Slack、GitHub、Stripe)進行事件處理。

支援平台

  • Claude Code:透過自然語言指令設定 Webhook
  • Cursor:整合 AI 輔助編輯器中的事件處理
  • Codex:擴展 CLI 工具以自動化 Webhook 管理

主要功能

  • Webhook 伺服器設定:快速建置 Express.js、FastAPI 或 Flask 端點
  • 安全驗證:支援 HMAC 簽章驗證與基本授權
  • 事件路由:根據事件類型動態路由至對應處理器
  • 監控與日誌:內建重試機制與錯誤處理
  • 第三方整合:與 Slack、GitHub、Stripe 等 API 對接

開始使用

安裝

npm install @claude-office/webhook-automation

或使用 Python:

pip install webhook-automation

基本使用

  1. 啟動 Webhook 伺服器:
webhook-server start --port 8080
  1. 註冊端點:
webhook register --url https://example.com/webhook --events push,pull_request
  1. 測試 Webhook:
webhook test --endpoint my-endpoint --payload '{"action": "created"}'

設定

變數名稱說明預設值
WEBHOOK_SECRETHMAC 簽章金鑰無
PORT伺服器監聽埠口3000
LOG_LEVEL日誌層級 (debug, info, warn, error)info

架構範例

graph LR
    A[GitHub] -->|Push 事件| B(Webhook 伺服器)
    B --> C{事件路由器}
    C -->|推播通知| D[Slack]
    C -->|更新 CI| E[GitHub Actions]

進階使用

自訂處理器

// Node.js 範例
const webhook = require('webhook-automation');

webhook.on('push', async (event) => {
  console.log(`收到推播事件:${event.repository.name}`);
  await notifySlack(event);
});

Python 範例

from webhook_automation import WebhookServer

server = WebhookServer(secret="my-secret")

@server.on("issues")
async def handle_issue(event):
    print(f"問題 ${event['action']}:${event['issue']['title']}")

常見問題

  • 如何驗證 Webhook 請求?:使用 WEBHOOK_SECRET 環境變數設定密鑰,伺服器會自動驗證 HMAC 簽章。
  • 支援哪些事件類型?:內建支援 push、pull_request、issues、release 等常見事件,並可自訂擴充。
  • 如何處理重試?:伺服器預設提供最多 3 次重試,間隔時間為指數退避。

授權

MIT

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

claude-office-skills/academic-search

Search and analyze academic literature. Find papers, understand research methodologies, and synthesize academic findings for research projects.

claude-office-skills/ads-copywriter

Multi-platform ad copy generation for Google Ads, Meta/Facebook, TikTok, LinkedIn with A/B testing variants

claude-office-skills/ai-agent-builder

Build AI agents with tools, memory, and multi-step reasoning - ChatGPT, Claude, Gemini integration patterns

claude-office-skills/airtable-automation

Airtable database automation - views, automations, integrations, and workflow triggers

claude-office-skills/ai-slides

Generate complete presentations with AI - from outline to polished slides

claude-office-skills/amazon-seller

Automate Amazon seller operations including inventory, orders, pricing, and advertising management

claude-office-skills/apple-shortcuts-integration

Create and trigger Apple Shortcuts for iOS/macOS automation and cross-platform workflows

claude-office-skills/applicant-screening

Screen job applications against requirements and score candidates

claude-office-skills/asana-automation

Automate Asana project management workflows, task tracking, team collaboration, and reporting

claude-office-skills/batch-convert

Batch convert documents between multiple formats using a unified pipeline

claude-office-skills/batch-processor

Process multiple documents in bulk with parallel execution

claude-office-skills/brand-guidelines-generator

Create and maintain brand style guides for consistent visual identity

claude-office-skills/browser-automation

Automate web browser interactions, scraping, testing, and workflow automation with Puppeteer/Playwright

claude-office-skills/calendar-automation

Google Calendar and Outlook automation - scheduling optimization, meeting workflows, time blocking, and Slack/Sheets integration

claude-office-skills/changelog-generator

Generate release notes from git commits, updates, or feature lists

claude-office-skills/chart-designer

Design effective data visualizations and charts. Generate chart configurations for ECharts, Chart.js, and other libraries. Create dashboards and reports.

claude-office-skills/chat-with-pdf

Answer questions about PDF content, summarize, and extract information

claude-office-skills/clickup-automation

Automate ClickUp workspace management, task workflows, time tracking, and team productivity

claude-office-skills/company-research

Conduct comprehensive company research and due diligence. Analyze business model, competitive landscape, management, and market position.

claude-office-skills/competitive-analysis

Analyze competitors systematically. Compare products, features, pricing, positioning, and market strategies. Generate comprehensive competitive intelligence reports.

相關技能