{"skill":{"slug":"pr-auto-check","displayName":"PR Auto-Check","summary":"Automated PR submission pipeline: run code review, verify service health, and post the full result to a Discord channel. Use when a new PR is submitted and n...","description":"---\nname: pr-auto-check\ndescription: |\n  Automated PR submission pipeline: run code review, verify service health,\n  and post the full result to a Discord channel. Use when a new PR is submitted\n  and needs automated review + health validation + team notification.\n  Triggers on: \"PR auto check\", \"check this PR\", \"PR review pipeline\",\n  \"run PR checks\", \"PR提交检查\", \"自动化PR检查\".\n---\n\n# PR Auto-Check\n\nAutomated pipeline that runs on new PR submission: code review → health check → Discord notification.\n\n## Workflow\n\n1. **Run the pipeline script** — collects CI status, diff stats, and health check results:\n   ```bash\n   bash {baseDir}/scripts/pr_auto_check.sh --pr <number> [--repo <owner/repo>] [--json]\n   ```\n   - `--json`: machine-readable output (for piping)\n   - Without `--json`: human-readable report printed to stdout\n   - Prints the temp result-file path as the last line (for piping to notification)\n\n2. **Conduct code review** — use the `code-review` skill on the PR diff. Focus on:\n   - Critical issues and security findings\n   - CI/CD failures (if any)\n   - Summarize findings into the report\n\n3. **Post result to Discord**:\n   ```bash\n   bash {baseDir}/scripts/notify_discord.sh --webhook <DISCORD_WEBHOOK_URL> --result <json-file>\n   ```\n\n## One-liner (CI/CD integration)\n\n```bash\nRESULT=$(bash {baseDir}/scripts/pr_auto_check.sh --pr 42 --json) && \\\n  bash {baseDir}/scripts/notify_discord.sh --webhook \"$WEBHOOK\" --result \"$RESULT\"\n```\n\n## Required Environment\n\n- `gh` CLI authenticated (`gh auth login`)\n- `jq` for JSON processing\n- `curl` for Discord webhook\n- Discord webhook URL (set as `DISCORD_WEBHOOK` env var or pass `--webhook`)\n- Optional: `healthcheck` skill installed for service health validation\n\n## Discord Webhook Setup\n\n1. Server Settings → Integrations → Webhooks → New Webhook\n2. Copy the webhook URL\n3. Set `DISCORD_WEBHOOK` in your environment or pass via `--webhook`\n\n## Exit Codes (pr_auto_check.sh)\n\n| Code | Meaning |\n|------|---------|\n| 0 | All checks passed |\n| 1 | CI failures or health warnings |\n| 2 | Critical health issues |\n\n## Output Format\n\nSee [references/output-format.md](references/output-format.md) for the JSON schema.\n","topics":["Code Review","Discord","Health","Pipeline"],"tags":{"latest":"3.0.0"},"stats":{"comments":0,"downloads":482,"installsAllTime":18,"installsCurrent":0,"stars":0,"versions":6},"createdAt":1777868825564,"updatedAt":1781831424090},"latestVersion":{"version":"3.0.0","createdAt":1778543525613,"changelog":"Full rebuild: automated PR review + health check + Discord notification pipeline","license":"MIT-0"},"metadata":null,"owner":{"handle":"terrycarter1985","userId":"s17brwfrqyjhbjgadkvar20h8x8492g8","displayName":"terrycarter1985","image":"https://avatars.githubusercontent.com/u/1542987?v=4"},"moderation":null}