一键导入
test-webhook
Generate and send test GitHub webhook payloads to the local webhook server.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate and send test GitHub webhook payloads to the local webhook server.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | test-webhook |
| description | Generate and send test GitHub webhook payloads to the local webhook server. |
| user-invocable | true |
You are a webhook testing tool for the claude-code-reviewer project. You generate realistic GitHub webhook payloads and send them to the local server for testing.
Read config.yaml to determine:
webhook.port (default: 3000)webhook.path (default: /webhook)webhook.secret (for HMAC signature)repos[] (for owner/repo in payloads)Ask the user which webhook event to simulate:
commentTrigger regex on a PR (triggers forced re-review). The trigger pattern is configurable in config.yaml under review.commentTrigger (default: ^\s*/review\s*$). Read the config to use the actual pattern; default to /review as the comment body.Also ask for a PR number (default: 1).
Build a JSON payload matching the GitHub webhook format. The payload must match the field access patterns in src/webhook/server.ts:
{
"action": "<action>",
"pull_request": {
"number": <N>,
"title": "Test PR #<N>",
"draft": false,
"merged": false,
"head": { "sha": "<random-hex-40>" },
"base": { "ref": "main" }
},
"repository": {
"full_name": "<owner>/<repo>"
}
}
Adjust fields per event:
"merged": true in pull_request"draft": true"changes": { "title": { "from": "Old Title" } }{
"action": "created",
"issue": {
"number": <N>,
"pull_request": { "url": "https://api.github.com/repos/<owner>/<repo>/pulls/<N>" }
},
"comment": {
"body": "/review",
"user": { "login": "test-user", "type": "User" }
},
"repository": {
"full_name": "<owner>/<repo>"
}
}
Generate a random 40-character hex string for head.sha.
If webhook.secret is configured (non-empty), compute the HMAC-SHA256 signature:
echo -n '<payload>' | openssl dgst -sha256 -hmac '<secret>'
The signature header value is sha256=<hex-digest>.
If no secret is configured, skip the signature header.
Use curl to send the webhook:
curl -s -o /dev/null -w "%{http_code}" \
-X POST \
-H "Content-Type: application/json" \
-H "X-GitHub-Event: <event>" \
-H "X-Hub-Signature-256: sha256=<hmac>" \
"http://localhost:<port><path>" \
-d '<payload>'
Omit the X-Hub-Signature-256 header if no secret is configured.
Report the HTTP status code and interpret it:
webhook.path in config)For lifecycle events (closed, merged, converted_to_draft), offer to read data/state.json after sending to verify the state was updated correctly. Show the PR's new status.
localhost — webhooks are for the local dev server/review trigger requires the PR to exist in state (or the server will fetch it via gh CLI)Review a pull request diff for bugs, security issues, and code quality. Use when reviewing PRs or diffs.
Guide adding a new config field across types, defaults, config.yaml, and optional state/env wiring.
System prompt for automated PR description generation. Used by the runtime module.
Trace a specific PR through the review pipeline to diagnose failures.
Read state.json and diagnose PR statuses, errors, stuck entries, and anomalies.
Generate a structured PR description from the diff. Fetches the diff, analyzes changes, and optionally applies the description.