{"id":"ff7740e5-c7dc-4850-b5c2-b43660b92fc4","entityType":"agent","slug":"clawhub-534422530-laosi-webhook-receiver","name":"Webhook Receiver Pro","canonicalUrl":"https://www.xpersona.co/agent/clawhub-534422530-laosi-webhook-receiver","canonicalPath":"/agent/clawhub-534422530-laosi-webhook-receiver","generatedAt":"2026-10-11T20:59:33.291Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-11T16:20:28.193Z","emptyReason":null},"description":"Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重试 Skill: Webhook Receiver Pro Owner: 534422530 Summary: Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重试 Tags: automation:2.0.0, events:2.0.0, http:2.0.0, latest:2.0.0, pro:2.0.0, webhook:2.0.0 Version history: v2.0.0 | 2026-05-29T23:31:42.021Z | auto **Major update with premium badge and metadata improvements:** - Version updated to 2.0.0 and \"premium\" badge added. - Added new metadata file: hub.json. - Minor text","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s170k9770tgh0506hw0dwtb6pd83kwyq:laosi-webhook-receiver","sourceUrl":"https://clawhub.ai/534422530/laosi-webhook-receiver","homepage":"https://clawhub.ai/534422530/skills/laosi-webhook-receiver","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/534422530/laosi-webhook-receiver","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/534422530/skills/laosi-webhook-receiver","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重试 Skill: Webhook Receiver Pro Owner: 534422530 Summary: Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重试 Ta"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T16:20:28.193Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T16:20:28.193Z","emptyReason":null},"stars":null,"forks":null,"downloads":1029,"packageName":null,"latestVersion":"2.0.0","tractionLabel":"1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T16:20:28.180Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T16:20:28.193Z","lastCrawledAt":"2026-10-11T16:20:28.180Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T16:20:28.180Z","lastVerifiedAt":null,"highlights":[{"version":"2.0.0","createdAt":"2026-05-29T23:31:42.021Z","changelog":"**Major update with premium badge and metadata improvements:** - Version updated to 2.0.0 and \"premium\" badge added. - Added new metadata file: hub.json. - Minor text and encoding issues introduced (truncated or malformed Chinese characters in description, features, and dependencies). - No changes to core code functionality.","fileCount":4,"zipByteSize":4308},{"version":"1.0.0","createdAt":"2026-05-29T01:25:58.055Z","changelog":"Initial release of the webhook-receiver skill. - Provides a local HTTP service to receive and process webhook events. - Supports event logging, event type filtering, and automatic retry mechanism. - Handles multiple webhook formats including GitHub, Slack, and generic sources. - Offers event persistence, statistics, and simple signature verification for security. - Python 3.8+ implementation using only standard library modules.","fileCount":3,"zipByteSize":3760}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170k9770tgh0506hw0dwtb6pd83kwyq:laosi-webhook-receiver","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T20:59:33.290Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-webhook-receiver/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-11T16:20:28.193Z","emptyReason":null},"readme":"Skill: Webhook Receiver Pro\n\nOwner: 534422530\n\nSummary: Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重试\n\nTags: automation:2.0.0, events:2.0.0, http:2.0.0, latest:2.0.0, pro:2.0.0, webhook:2.0.0\n\nVersion history:\n\nv2.0.0 | 2026-05-29T23:31:42.021Z | auto\n\n**Major update with premium badge and metadata improvements:**\n\n- Version updated to 2.0.0 and \"premium\" badge added.\n- Added new metadata file: hub.json.\n- Minor text and encoding issues introduced (truncated or malformed Chinese characters in description, features, and dependencies).\n- No changes to core code functionality.\n\nv1.0.0 | 2026-05-29T01:25:58.055Z | auto\n\nInitial release of the webhook-receiver skill.\n\n- Provides a local HTTP service to receive and process webhook events.\n- Supports event logging, event type filtering, and automatic retry mechanism.\n- Handles multiple webhook formats including GitHub, Slack, and generic sources.\n- Offers event persistence, statistics, and simple signature verification for security.\n- Python 3.8+ implementation using only standard library modules.\n\nArchive index:\n\nArchive v2.0.0: 4 files, 4308 bytes\n\nFiles: hub.json (588b), skill-card.md (2139b), SKILL.md (5990b), _meta.json (141b)\n\nFile v2.0.0:SKILL.md\n\n---\nbadge: premium\nname: webhook-receiver\nversion: 2.0.0\ndescription: Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重�?tags: [webhook, http, events, automation, integration]\nauthor: laosi\nsource: original\n---\n\n# Webhook Receiver - Webhook接收服务\n\n> 激活词: webhook / 接收webhook / hook\n\n## 功能\n\n- 本地HTTP服务接收webhook事件\n- 事件日志持久�?- 事件类型过滤\n- 自动重试机制\n- 支持多种webhook格式（GitHub/Slack/Generic�?\n## Python 实现\n\n```python\nimport os, json, hashlib, hmac\nfrom datetime import datetime\nfrom http.server import HTTPServer, BaseHTTPRequestHandler\nfrom typing import Callable, Dict, List, Optional\n\nWEBHOOK_LOG = os.path.join(os.path.dirname(__file__), \"webhook_logs.json\")\n\nclass WebhookEvent:\n    def __init__(self, headers: dict, body: str, source: str = \"unknown\"):\n        self.headers = headers\n        self.body = body\n        self.source = source\n        self.timestamp = datetime.now().isoformat()\n        self.id = hashlib.sha256(body.encode()).hexdigest()[:16]\n        self.parsed = self._parse_body()\n    \n    def _parse_body(self) -> dict:\n        try:\n            return json.loads(self.body)\n        except json.JSONDecodeError:\n            return {\"raw\": self.body[:200]}\n    \n    def to_dict(self) -> dict:\n        return {\n            \"id\": self.id,\n            \"source\": self.source,\n            \"timestamp\": self.timestamp,\n            \"headers\": self.headers,\n            \"parsed\": self.parsed,\n        }\n\nclass WebhookReceiver:\n    def __init__(self, log_file: str = None):\n        self.log_file = log_file or WEBHOOK_LOG\n        self.handlers: Dict[str, Callable] = {}\n        self.events: List[dict] = self._load_events()\n        os.makedirs(os.path.dirname(self.log_file), exist_ok=True)\n    \n    def _load_events(self) -> list:\n        if os.path.exists(self.log_file):\n            try:\n                with open(self.log_file, encoding=\"utf-8\") as f:\n                    return json.load(f).get(\"events\", [])\n            except (json.JSONDecodeError, ValueError):\n                return []\n        return []\n    \n    def _save_events(self):\n        with open(self.log_file, \"w\", encoding=\"utf-8\") as f:\n            json.dump({\"events\": self.events[-500:]}, f,\n                      ensure_ascii=False, indent=2)\n    \n    def register_handler(self, event_type: str, handler: Callable):\n        \"\"\"注册事件处理函数\"\"\"\n        self.handlers[event_type] = handler\n    \n    def receive(self, event: WebhookEvent) -> dict:\n        \"\"\"处理接收到的webhook\"\"\"\n        event_dict = event.to_dict()\n        self.events.append(event_dict)\n        self._save_events()\n        \n        result = {\"received\": True, \"id\": event.id, \"source\": event.source}\n        \n        # 查找匹配的handler\n        event_type = event.parsed.get(\"event\", \"generic\")\n        if event_type in self.handlers:\n            try:\n                handler_result = self.handlers[event_type](event.parsed)\n                result[\"handler_result\"] = handler_result\n                result[\"processed\"] = True\n            except Exception as e:\n                result[\"error\"] = str(e)\n                result[\"processed\"] = False\n        else:\n            result[\"processed\"] = False\n            result[\"note\"] = f\"No handler for event type: {event_type}\"\n        \n        return result\n    \n    def verify_github_signature(self, payload: str, signature: str,\n                                 secret: str) -> bool:\n        \"\"\"验证GitHub webhook签名\"\"\"\n        expected = \"sha256=\" + hmac.new(\n            secret.encode(), payload.encode(), hashlib.sha256\n        ).hexdigest()\n        return hmac.compare_digest(expected, signature)\n    \n    def list_events(self, source: str = None, limit: int = 20) -> list:\n        \"\"\"列出最近事�?\"\"\n        events = self.events\n        if source:\n            events = [e for e in events if e.get(\"source\") == source]\n        return events[-limit:]\n    \n    def get_stats(self) -> dict:\n        \"\"\"统计信息\"\"\"\n        sources = {}\n        for e in self.events:\n            src = e.get(\"source\", \"unknown\")\n            sources[src] = sources.get(src, 0) + 1\n        return {\n            \"total_events\": len(self.events),\n            \"by_source\": sources,\n            \"oldest\": self.events[0][\"timestamp\"] if self.events else None,\n            \"newest\": self.events[-1][\"timestamp\"] if self.events else None,\n        }\n\n# 使用示例\nreceiver = WebhookReceiver()\n\n# 注册handler\ndef handle_github_push(data):\n    repo = data.get(\"repository\", {}).get(\"name\", \"unknown\")\n    commits = len(data.get(\"commits\", []))\n    print(f\"  Push to {repo}: {commits} commits\")\n    return {\"repo\": repo, \"commits\": commits}\n\nreceiver.register_handler(\"push\", handle_github_push)\n\n# 模拟接收webhook\nevent = WebhookEvent(\n    headers={\"X-GitHub-Event\": \"push\", \"Content-Type\": \"application/json\"},\n    body=json.dumps({\n        \"event\": \"push\",\n        \"repository\": {\"name\": \"my-repo\"},\n        \"commits\": [{\"message\": \"feat: add webhook\"}]\n    }),\n    source=\"github\"\n)\n\nresult = receiver.receive(event)\nprint(f\"Event: {result['id']}, processed: {result.get('processed')}\")\n\n# 统计\nstats = receiver.get_stats()\nprint(f\"Total events: {stats['total_events']}, by source: {stats['by_source']}\")\n```\n\n## 验证签名\n\n```python\ndef verify_webhook(payload, signature, secret):\n    \"\"\"GitHub/Stripe webhook签名验证\"\"\"\n    import hmac, hashlib\n    expected = \"sha256=\" + hmac.new(\n        secret.encode(), payload.encode(), hashlib.sha256\n    ).hexdigest()\n    return hmac.compare_digest(expected, signature)\n```\n\n## 使用场景\n\n1. **CI/CD**: 接收GitHub/GitLab push事件触发构建\n2. **支付通知**: 接收Stripe/PayPal支付成功回调\n3. **监控告警**: 接收Grafana/Prometheus告警\n4. **聊天机器�?*: 接收Slack/Discord消息事件\n\n## 依赖\n\n- Python 3.8+\n- 标准库（http.server, json, hashlib�?\n\nFile v2.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn71pk44ca87scz3pstt90r66n80xhaa\",\n  \"slug\": \"laosi-webhook-receiver\",\n  \"version\": \"2.0.0\",\n  \"publishedAt\": 1780097502021\n}\n\nFile v2.0.0:skill-card.md\n\n## Description:\n\nWebhook Receiver Pro provides agent guidance and Python code for receiving webhook events locally, logging events, filtering event types, retrying processing, verifying signatures, and dispatching handlers.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[534422530](https://clawhub.ai/user/534422530)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and automation engineers use this skill to create or adapt a local Python webhook receiver for CI/CD, payment notification, monitoring alert, and chat event workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Webhook events may be persisted with full headers or payload data, including tokens or personal data.\n\nMitigation: Redact sensitive headers and payload fields before logging, and restrict access to persisted webhook log files.\n\nRisk: Webhook events can be logged or dispatched before required provider authentication is enforced.\n\nMitigation: Require provider signature verification before storing events or invoking handlers, and reject unsigned or invalid requests.\n\nRisk: The broad activation trigger 'hook' can invoke the skill in unrelated contexts.\n\nMitigation: Remove or narrow the activation trigger so the skill only activates for explicit webhook receiver requests.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/534422530/skills/laosi-webhook-receiver)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with Python code blocks and configuration notes]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include webhook receiver code, event handling examples, and security caveats.]\n\n## Skill Version(s):\n\n2.0.0 (source: server release metadata, SKILL.md frontmatter, hub.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v2.0.0:hub.json\n\n{\r\n    \"description\":  \"Premium version with full implementation, examples, and enterprise support\",\r\n    \"minOpenClawVersion\":  \"1.2.0\",\r\n    \"version\":  \"2.0.0\",\r\n    \"tags\":  [\r\n                 \"webhook\",\r\n                 \"http\",\r\n                 \"events\",\r\n                 \"automation\",\r\n                 \"pro\"\r\n             ],\r\n    \"author\":  \"laosi\",\r\n    \"name\":  \"webhook-receiver\",\r\n    \"pricing\":  {\r\n                    \"price\":  2900,\r\n                    \"model\":  \"one-time\"\r\n                },\r\n    \"license\":  \"MIT\",\r\n    \"displayName\":  \"Webhook Receiver Pro\"\r\n}\n\nArchive v1.0.0: 3 files, 3760 bytes\n\nFiles: skill-card.md (1753b), SKILL.md (5981b), _meta.json (141b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: webhook-receiver\nversion: 1.0.0\ndescription: Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重试\ntags: [webhook, http, events, automation, integration]\nauthor: laosi\nsource: original\n---\n\n# Webhook Receiver - Webhook接收服务\n\n> 激活词: webhook / 接收webhook / hook\n\n## 功能\n\n- 本地HTTP服务接收webhook事件\n- 事件日志持久化\n- 事件类型过滤\n- 自动重试机制\n- 支持多种webhook格式（GitHub/Slack/Generic）\n\n## Python 实现\n\n```python\nimport os, json, hashlib, hmac\nfrom datetime import datetime\nfrom http.server import HTTPServer, BaseHTTPRequestHandler\nfrom typing import Callable, Dict, List, Optional\n\nWEBHOOK_LOG = os.path.join(os.path.dirname(__file__), \"webhook_logs.json\")\n\nclass WebhookEvent:\n    def __init__(self, headers: dict, body: str, source: str = \"unknown\"):\n        self.headers = headers\n        self.body = body\n        self.source = source\n        self.timestamp = datetime.now().isoformat()\n        self.id = hashlib.sha256(body.encode()).hexdigest()[:16]\n        self.parsed = self._parse_body()\n    \n    def _parse_body(self) -> dict:\n        try:\n            return json.loads(self.body)\n        except json.JSONDecodeError:\n            return {\"raw\": self.body[:200]}\n    \n    def to_dict(self) -> dict:\n        return {\n            \"id\": self.id,\n            \"source\": self.source,\n            \"timestamp\": self.timestamp,\n            \"headers\": self.headers,\n            \"parsed\": self.parsed,\n        }\n\nclass WebhookReceiver:\n    def __init__(self, log_file: str = None):\n        self.log_file = log_file or WEBHOOK_LOG\n        self.handlers: Dict[str, Callable] = {}\n        self.events: List[dict] = self._load_events()\n        os.makedirs(os.path.dirname(self.log_file), exist_ok=True)\n    \n    def _load_events(self) -> list:\n        if os.path.exists(self.log_file):\n            try:\n                with open(self.log_file, encoding=\"utf-8\") as f:\n                    return json.load(f).get(\"events\", [])\n            except (json.JSONDecodeError, ValueError):\n                return []\n        return []\n    \n    def _save_events(self):\n        with open(self.log_file, \"w\", encoding=\"utf-8\") as f:\n            json.dump({\"events\": self.events[-500:]}, f,\n                      ensure_ascii=False, indent=2)\n    \n    def register_handler(self, event_type: str, handler: Callable):\n        \"\"\"注册事件处理函数\"\"\"\n        self.handlers[event_type] = handler\n    \n    def receive(self, event: WebhookEvent) -> dict:\n        \"\"\"处理接收到的webhook\"\"\"\n        event_dict = event.to_dict()\n        self.events.append(event_dict)\n        self._save_events()\n        \n        result = {\"received\": True, \"id\": event.id, \"source\": event.source}\n        \n        # 查找匹配的handler\n        event_type = event.parsed.get(\"event\", \"generic\")\n        if event_type in self.handlers:\n            try:\n                handler_result = self.handlers[event_type](event.parsed)\n                result[\"handler_result\"] = handler_result\n                result[\"processed\"] = True\n            except Exception as e:\n                result[\"error\"] = str(e)\n                result[\"processed\"] = False\n        else:\n            result[\"processed\"] = False\n            result[\"note\"] = f\"No handler for event type: {event_type}\"\n        \n        return result\n    \n    def verify_github_signature(self, payload: str, signature: str,\n                                 secret: str) -> bool:\n        \"\"\"验证GitHub webhook签名\"\"\"\n        expected = \"sha256=\" + hmac.new(\n            secret.encode(), payload.encode(), hashlib.sha256\n        ).hexdigest()\n        return hmac.compare_digest(expected, signature)\n    \n    def list_events(self, source: str = None, limit: int = 20) -> list:\n        \"\"\"列出最近事件\"\"\"\n        events = self.events\n        if source:\n            events = [e for e in events if e.get(\"source\") == source]\n        return events[-limit:]\n    \n    def get_stats(self) -> dict:\n        \"\"\"统计信息\"\"\"\n        sources = {}\n        for e in self.events:\n            src = e.get(\"source\", \"unknown\")\n            sources[src] = sources.get(src, 0) + 1\n        return {\n            \"total_events\": len(self.events),\n            \"by_source\": sources,\n            \"oldest\": self.events[0][\"timestamp\"] if self.events else None,\n            \"newest\": self.events[-1][\"timestamp\"] if self.events else None,\n        }\n\n# 使用示例\nreceiver = WebhookReceiver()\n\n# 注册handler\ndef handle_github_push(data):\n    repo = data.get(\"repository\", {}).get(\"name\", \"unknown\")\n    commits = len(data.get(\"commits\", []))\n    print(f\"  Push to {repo}: {commits} commits\")\n    return {\"repo\": repo, \"commits\": commits}\n\nreceiver.register_handler(\"push\", handle_github_push)\n\n# 模拟接收webhook\nevent = WebhookEvent(\n    headers={\"X-GitHub-Event\": \"push\", \"Content-Type\": \"application/json\"},\n    body=json.dumps({\n        \"event\": \"push\",\n        \"repository\": {\"name\": \"my-repo\"},\n        \"commits\": [{\"message\": \"feat: add webhook\"}]\n    }),\n    source=\"github\"\n)\n\nresult = receiver.receive(event)\nprint(f\"Event: {result['id']}, processed: {result.get('processed')}\")\n\n# 统计\nstats = receiver.get_stats()\nprint(f\"Total events: {stats['total_events']}, by source: {stats['by_source']}\")\n```\n\n## 验证签名\n\n```python\ndef verify_webhook(payload, signature, secret):\n    \"\"\"GitHub/Stripe webhook签名验证\"\"\"\n    import hmac, hashlib\n    expected = \"sha256=\" + hmac.new(\n        secret.encode(), payload.encode(), hashlib.sha256\n    ).hexdigest()\n    return hmac.compare_digest(expected, signature)\n```\n\n## 使用场景\n\n1. **CI/CD**: 接收GitHub/GitLab push事件触发构建\n2. **支付通知**: 接收Stripe/PayPal支付成功回调\n3. **监控告警**: 接收Grafana/Prometheus告警\n4. **聊天机器人**: 接收Slack/Discord消息事件\n\n## 依赖\n\n- Python 3.8+\n- 标准库（http.server, json, hashlib）\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn71pk44ca87scz3pstt90r66n80xhaa\",\n  \"slug\": \"laosi-webhook-receiver\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1780017958055\n}\n\nFile v1.0.0:skill-card.md\n\n## Description: <br>\nWebhook Receiver Pro helps agents create Python webhook receiver code for local HTTP event handling with logging, event filtering, retry-oriented workflows, and GitHub, Slack, or generic webhook formats. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[534422530](https://clawhub.ai/user/534422530) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and automation engineers use this skill to build local webhook receivers for CI/CD events, payment callbacks, monitoring alerts, and chat or integration workflows. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Webhook event logs may store sensitive headers or payload data locally. <br>\nMitigation: Avoid sending secrets in webhook data unless redaction, restrictive file permissions, and periodic log clearing or rotation are added. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/534422530/laosi-webhook-receiver) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [code, guidance, configuration] <br>\n**Output Format:** [Markdown with Python code blocks] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Produces standard-library Python examples and operational guidance for receiving, verifying, logging, and inspecting webhook events.] <br>\n\n## Skill Version(s): <br>\n1.0.0 (source: frontmatter and server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>","readmeExcerpt":"Skill: Webhook Receiver Pro Owner: 534422530 Summary: Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重试 Tags: automation:2.0.0, events:2.0.0, http:2.0.0, latest:2.0.0, pro:2.0.0, webhook:2.0.0 Version history: v2.0.0 | 2026-05-29T23:31:42.021Z | auto **Major update with premium badge and metadata improvements:** - Version updated to 2.0.0 and \"premium\" badge added. - Added new metadata file: hub.json. - Minor text ","codeSnippets":[],"executableExamples":[{"language":"python","snippet":"import os, json, hashlib, hmac\nfrom datetime import datetime\nfrom http.server import HTTPServer, BaseHTTPRequestHandler\nfrom typing import Callable, Dict, List, Optional\n\nWEBHOOK_LOG = os.path.join(os.path.dirname(__file__), \"webhook_logs.json\")\n\nclass WebhookEvent:\n    def __init__(self, headers: dict, body: str, source: str = \"unknown\"):\n        self.headers = headers\n        self.body = body\n        self.source = source\n        self.timestamp = datetime.now().isoformat()\n        self.id = hashlib.sha256(body.encode()).hexdigest()[:16]\n        self.parsed = self._parse_body()\n    \n    def _parse_body(self) -> dict:\n        try:\n            return json.loads(self.body)\n        except json.JSONDecodeError:\n            return {\"raw\": self.body[:200]}\n    \n    def to_dict(self) -> dict:\n        return {\n            \"id\": self.id,\n            \"source\": self.source,\n            \"timestamp\": self.timestamp,\n            \"headers\": self.headers,\n            \"parsed\": self.parsed,\n        }\n\nclass WebhookReceiver:\n    def __init__(self, log_file: str = None):\n        self.log_file = log_file or WEBHOOK_LOG\n        self.handlers: Dict[str, Callable] = {}\n        self.events: List[dict] = self._load_events()\n        os.makedirs(os.path.dirname(self.log_file), exist_ok=True)\n    \n    def _load_events(self) -> list:\n        if os.path.exists(self.log_file):\n            try:\n                with open(self.log_file, encoding=\"utf-8\") as f:\n                    return json.load(f).get(\"events\", [])\n            except (json.JSONDecodeError, ValueError):\n                return []\n        return []\n    \n    def _save_events(self):\n        with open(self.log_file, \"w\", encoding=\"utf-8\") as f:\n            json.dump({\"events\": self.events[-500:]}, f,\n                      ensure_ascii=False, indent=2)\n    \n    def register_handler(self, event_type: str, handler: Callable):\n        \"\"\"注册事件处理函数\"\"\"\n        self.handlers[event_type] = handler\n    \n    def receive(self, event: WebhookEvent) -"},{"language":"python","snippet":"def verify_webhook(payload, signature, secret):\n    \"\"\"GitHub/Stripe webhook签名验证\"\"\"\n    import hmac, hashlib\n    expected = \"sha256=\" + hmac.new(\n        secret.encode(), payload.encode(), hashlib.sha256\n    ).hexdigest()\n    return hmac.compare_digest(expected, signature)"},{"language":"python","snippet":"import os, json, hashlib, hmac\nfrom datetime import datetime\nfrom http.server import HTTPServer, BaseHTTPRequestHandler\nfrom typing import Callable, Dict, List, Optional\n\nWEBHOOK_LOG = os.path.join(os.path.dirname(__file__), \"webhook_logs.json\")\n\nclass WebhookEvent:\n    def __init__(self, headers: dict, body: str, source: str = \"unknown\"):\n        self.headers = headers\n        self.body = body\n        self.source = source\n        self.timestamp = datetime.now().isoformat()\n        self.id = hashlib.sha256(body.encode()).hexdigest()[:16]\n        self.parsed = self._parse_body()\n    \n    def _parse_body(self) -> dict:\n        try:\n            return json.loads(self.body)\n        except json.JSONDecodeError:\n            return {\"raw\": self.body[:200]}\n    \n    def to_dict(self) -> dict:\n        return {\n            \"id\": self.id,\n            \"source\": self.source,\n            \"timestamp\": self.timestamp,\n            \"headers\": self.headers,\n            \"parsed\": self.parsed,\n        }\n\nclass WebhookReceiver:\n    def __init__(self, log_file: str = None):\n        self.log_file = log_file or WEBHOOK_LOG\n        self.handlers: Dict[str, Callable] = {}\n        self.events: List[dict] = self._load_events()\n        os.makedirs(os.path.dirname(self.log_file), exist_ok=True)\n    \n    def _load_events(self) -> list:\n        if os.path.exists(self.log_file):\n            try:\n                with open(self.log_file, encoding=\"utf-8\") as f:\n                    return json.load(f).get(\"events\", [])\n            except (json.JSONDecodeError, ValueError):\n                return []\n        return []\n    \n    def _save_events(self):\n        with open(self.log_file, \"w\", encoding=\"utf-8\") as f:\n            json.dump({\"events\": self.events[-500:]}, f,\n                      ensure_ascii=False, indent=2)\n    \n    def register_handler(self, event_type: str, handler: Callable):\n        \"\"\"注册事件处理函数\"\"\"\n        self.handlers[event_type] = handler\n    \n    def receive(self, event: WebhookEvent) -"},{"language":"python","snippet":"def verify_webhook(payload, signature, secret):\n    \"\"\"GitHub/Stripe webhook签名验证\"\"\"\n    import hmac, hashlib\n    expected = \"sha256=\" + hmac.new(\n        secret.encode(), payload.encode(), hashlib.sha256\n    ).hexdigest()\n    return hmac.compare_digest(expected, signature)"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nbadge: premium\nname: webhook-receiver\nversion: 2.0.0\ndescription: Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重�?tags: [webhook, http, events, automation, integration]\nauthor: laosi\nsource: original\n---\n\n# Webhook Receiver - Webhook接收服务\n\n> 激活词: webhook / 接收webhook / hook\n\n## 功能\n\n- 本地HTTP服务接收webhook事件\n- 事件日志持久�?- 事件类型过滤\n- 自动重试机制\n- 支持多种webhook格式（GitHub/Slack/Generic�?\n## Python 实现\n\n```python\nimport os, json, hashlib, hmac\nfrom datetime import datetime\nfrom http.server import HTTPServer, BaseHTTPRequestHandler\nfrom typing import Callable, Dict, List, Optional\n\nWEBHOOK_LOG = os.path.join(os.path.dirname(__file__), \"webhook_logs.json\")\n\nclass WebhookEvent:\n    def __init__(self, headers: dict, body: str, source: str = \"unknown\"):\n        self.headers = headers\n        self.body = body\n        self.source = source\n        self.timestamp = datetime.now().isoformat()\n        self.id = hashlib.sha256(body.encode()).hexdigest()[:16]\n        self.parsed = self._parse_body()\n    \n    def _parse_body(self) -> dict:\n        try:\n            return json.loads(self.body)\n        except json.JSONDecodeError:\n            return {\"raw\": self.body[:200]}\n    \n    def to_dict(self) -> dict:\n        return {\n            \"id\": self.id,\n            \"source\": self.source,\n            \"timestamp\": self.timestamp,\n            \"headers\": self.headers,\n            \"parsed\": self.parsed,\n        }\n\nclass WebhookReceiver:\n    def __init__(self, log_file: str = None):\n        self.log_file = log_file or WEBHOOK_LOG\n        self.handlers: Dict[str, Callable] = {}\n        self.events: List[dict] = self._load_events()\n        os.makedirs(os.path.dirname(self.log_file), exist_ok=True)\n    \n    def _load_events(self) -> list:\n        if os.path.exists(self.log_file):\n            try:\n                with open(self.log_file, encoding=\"utf-8\") as f:\n                    return json.load(f).get(\"events\", [])\n            except (json.JSONDecodeError, ValueError):\n                return []\n        return []\n    \n    def _save_events(self):\n        with open(self.log_file, \"w\", encoding=\"utf-8\") as f:\n            json.dump({\"events\": self.events[-500:]}, f,\n                      ensure_ascii=False, indent=2)\n    \n    def register_handler(self, event_type: str, handler: Callable):\n        \"\"\"注册事件处理函数\"\"\"\n        self.handlers[event_type] = handler\n    \n    def receive(self, event: WebhookEvent) -> dict:\n        \"\"\"处理接收到的webhook\"\"\"\n        event_dict = event.to_dict()\n        self.events.append(event_dict)\n        self._save_events()\n        \n        result = {\"received\": True, \"id\": event.id, \"source\": event.source}\n        \n        # 查找匹配的handler\n        event_type = event.parsed.get(\"event\", \"generic\")\n        if event_type in self.handlers:\n            try:\n                handler_result = self.handlers[event_type](event.parsed)\n                result[\"handler_result\"] = handler_result\n                result[\"processed\"] = True\n            except Exception as e:\n                r"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn71pk44ca87scz3pstt90r66n80xhaa\",\n  \"slug\": \"laosi-webhook-receiver\",\n  \"version\": \"2.0.0\",\n  \"publishedAt\": 1780097502021\n}"},{"path":"skill-card.md","content":"## Description:\n\nWebhook Receiver Pro provides agent guidance and Python code for receiving webhook events locally, logging events, filtering event types, retrying processing, verifying signatures, and dispatching handlers.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[534422530](https://clawhub.ai/user/534422530)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and automation engineers use this skill to create or adapt a local Python webhook receiver for CI/CD, payment notification, monitoring alert, and chat event workflows.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Webhook events may be persisted with full headers or payload data, including tokens or personal data.\n\nMitigation: Redact sensitive headers and payload fields before logging, and restrict access to persisted webhook log files.\n\nRisk: Webhook events can be logged or dispatched before required provider authentication is enforced.\n\nMitigation: Require provider signature verification before storing events or invoking handlers, and reject unsigned or invalid requests.\n\nRisk: The broad activation trigger 'hook' can invoke the skill in unrelated contexts.\n\nMitigation: Remove or narrow the activation trigger so the skill only activates for explicit webhook receiver requests.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/534422530/skills/laosi-webhook-receiver)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with Python code blocks and configuration notes]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May include webhook receiver code, event handling examples, and security caveats.]\n\n## Skill Version(s):\n\n2.0.0 (source: server release metadata, SKILL.md frontmatter, hub.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"hub.json","content":"{\r\n    \"description\":  \"Premium version with full implementation, examples, and enterprise support\",\r\n    \"minOpenClawVersion\":  \"1.2.0\",\r\n    \"version\":  \"2.0.0\",\r\n    \"tags\":  [\r\n                 \"webhook\",\r\n                 \"http\",\r\n                 \"events\",\r\n                 \"automation\",\r\n                 \"pro\"\r\n             ],\r\n    \"author\":  \"laosi\",\r\n    \"name\":  \"webhook-receiver\",\r\n    \"pricing\":  {\r\n                    \"price\":  2900,\r\n                    \"model\":  \"one-time\"\r\n                },\r\n    \"license\":  \"MIT\",\r\n    \"displayName\":  \"Webhook Receiver Pro\"\r\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重试 Skill: Webhook Receiver Pro Owner: 534422530 Summary: Webhook接收 - 本地HTTP服务接收和处理webhook事件，支持日志记录、事件过滤、自动重试 Tags: automation:2.0.0, events:2.0.0, http:2.0.0, latest:2.0.0, pro:2.0.0, webhook:2.0.0 Version history: v2.0.0 | 2026-05-29T23:31:42.021Z | auto **Major update with premium badge and metadata improvements:** - Version updated to 2.0.0 and \"premium\" badge added. - Added new metadata file: hub.json. - Minor text","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1097,"uniquenessScore":50,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T16:20:28.193Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T16:20:28.193Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T20:59:33.291Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}