Create webhook handlers for Frappe integrations. Use when implementing webhooks, event-driven integrations, or external system notifications.
Generates secure webhook handlers and senders for Frappe integrations with external systems.
/plugin marketplace add Venkateshvenki404224/frappe-apps-manager/plugin install frappe-apps-manager@frappe-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Generate secure webhook receivers and senders for Frappe integrations with external systems.
Claude should invoke this skill when:
Secure Webhook Endpoint:
import frappe
import hmac
import hashlib
@frappe.whitelist(allow_guest=True)
def webhook_receiver():
"""Receive webhook from external service"""
# Get signature
signature = frappe.get_request_header('X-Webhook-Signature')
# Verify signature
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)
# Parse payload
payload = frappe.parse_json(frappe.request.data)
# Process webhook
event = payload.get('event')
if event == 'payment.success':
handle_payment_success(payload)
elif event == 'customer.updated':
handle_customer_update(payload)
return {'status': 'success'}
Send Webhook on Document Event:
class SalesInvoice(Document):
def on_submit(self):
# Send webhook on submission
send_webhook('invoice.submitted', self.as_dict())
def send_webhook(event, data):
"""Send webhook to external system"""
webhook_url = frappe.conf.get('external_webhook_url')
payload = {
'event': event,
'data': data,
'timestamp': frappe.utils.now()
}
# Enqueue for async processing
frappe.enqueue(
'_send_webhook',
webhook_url=webhook_url,
payload=payload,
queue='short'
)
def _send_webhook(webhook_url, payload):
"""Send webhook with retry logic"""
import requests
for attempt in range(3):
try:
response = requests.post(
webhook_url,
json=payload,
headers={'Content-Type': 'application/json'},
timeout=10
)
if response.status_code == 200:
return True
except Exception as e:
if attempt == 2:
frappe.log_error(frappe.get_traceback(),
f"Webhook Failed: {webhook_url}")
return False
Frappe Webhook Implementation:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.