frappe-webhook-manager
БесплатноБез исполняемых скриптовНе проверенCreate webhook handlers for Frappe integrations. Use when implementing webhooks, event-driven integrations, or external system notifications.
Об этом скилле
Frappe Webhook Manager
Generate secure webhook receivers and senders for Frappe integrations with external systems.
Global Rules
These Frappe conventions apply to everything this skill generates, and override any conflicting example below.
- Bench commands: use bare
bench(never./env/bin/benchor a full path). Always pass--site <site>explicitly — never run a barebench migrate/bench run-tests. Runbench startin the background and only if it isn't already running. Don't run discovery commands (which bench,bench --version). - DocType files live at
apps/<app>/<app>/<module>/doctype/<name>/<name>.json— the app name appears twice (directory + Python package) — with an empty__init__.pyalongside. Nevermkdirthe folder; write the JSON and runbench --site <site> migrateto create the structure. Don't addcreation,modified,owner,modified_by, ordocstatusas fields — Frappe manages them. - Database & ORM: prefer
frappe.qb.get_query()over rawfrappe.db.sql(). Usefrappe.db.get_all()for server logic (ignores permissions) andfrappe.db.get_list()for user-facing APIs (enforces them). Never usefrappe.db.set_value()on a field with validation or lifecycle logic — load the doc anddoc.save()so controller hooks run. Batch-fetch related records; never query inside a loop (N+1). - Never call
frappe.db.commit()in controllers, request handlers, background jobs, or patches — Frappe auto-commits on success and rolls back on uncaught errors. Flush manually only to make a write visible to a subsequentfrappe.enqueue()(or passenqueue_after_commit=True). - Permissions & APIs: put permission checks inside controller methods (enforced on every call path), not in API wrappers. Type-hint every
@frappe.whitelist()parameter so Frappe validates and casts it, and passmethods=[...]to pin the HTTP verb.
When to Use This Skill
Claude should invoke this skill when:
- User wants to receive webhooks from external services
- User needs to send webhooks to external systems
- User mentions webhook, event-driven integration, or external notifications
- User wants to integrate payment gateways, APIs, or third-party services
- User needs to handle real-time events from external systems
Capabilities
1. Webhook Receiver
Secure Webhook Endpoint: verify the signature BEFORE trusting any of the payload, and pin the verb to POST.
import frappe
from frappe import _
import hmac
import hashlib
@frappe.whitelist(allow_guest=True, methods=["POST"])
def webhook_receiver():
"""Receive webhook from external service"""
# Get signature
signature = frappe.get_request_header('X-Webhook-Signature') or ''
# Verify signature against the raw body FIRST — never trust the payload before this
secret = frappe.conf.get('webhook_secret')
expected = hmac.new(
secret.encode(),
frappe.request.data,
hashlib.sha256
).hexdigest()
if not hmac.compare_digest(signature, expected):
frappe.throw(_('Invalid signature'), frappe.AuthenticationError)
# Only now is it safe to parse the payload
payload = frappe.parse_json(frappe.request.data)
# Process webhook (offload anything slow to a background job)
event = payload.get('event')
if event == 'payment.success':
handle_payment_success(payload)
elif event == 'customer.updated':
handle_customer_update(payload)
# Return only a status — never echo sensitive fields back
return {'status': 'success'}
2. Outgoing Webhook
Trigger outbound webhooks from doc_events in hooks.py rather than inside the DocType controller, and enqueue delivery — never send inline inside the document event (a slow/failed receiver must not block or roll back the save).
Wire the trigger in hooks.py (handlers are dotted paths to importable functions):
# apps/myapp/myapp/hooks.py
doc_events = {
"Sales Invoice": {
"on_submit": "myapp.webhooks.queue_invoice_webhook",
}
}
Enqueue delivery (the handler receives doc and the event method):
# apps/myapp/myapp/webhooks.py
import frappe
def queue_invoice_webhook(doc, method):
"""doc_events handler: enqueue, don't send inline."""
frappe.enqueue(
"myapp.webhooks.send_webhook",
queue="short",
timeout=120,
job_id=f"webhook::{doc.name}::invoice.submitted", # stable id
deduplicate=True, # skip if an identical job is already queued
enqueue_after_commit=True, # only fire after the save commits
event="invoice.submitted",
data=doc.as_dict(),
)
Send with HMAC signature and a bounded retry:
# apps/myapp/myapp/webhooks.py
import frappe
import hmac
import hashlib
import json
import requests
def send_webhook(event, data):
"""Runs in a worker. No frappe.db.commit() — Frappe auto-commits on success."""
webh
Установить frappe-webhook-manager в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл frappe-webhook-manager?
Create webhook handlers for Frappe integrations. Use when implementing webhooks, event-driven integrations, or external system notifications.
Как установить скилл frappe-webhook-manager?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл frappe-webhook-manager запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic