From synapse-a2a
Continuously monitor a GitHub PR for merge conflicts, CI failures, and CodeRabbit review comments, then automatically fix any issues found. Polls every 5 minutes and loops until every check is green. Use this skill whenever a PR has just been created or code has been pushed to a PR branch — it should be the default follow-up action after any PR creation or push. Also trigger on: "watch this PR", "guard this PR", "monitor CI", "keep fixing until green", "PRを監視して", "CIが通るまで 直して", /pr-guardian. When a PostToolUse hook reports that a push or PR creation just happened, proactively invoke this skill to start monitoring without waiting for the user to ask.
npx claudepluginhub s-hiraoku/synapse-a2a --plugin synapse-a2aThis skill uses the workspace's default tool permissions.
Watch a PR, detect problems, fix them, repeat — until everything is green.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Watch a PR, detect problems, fix them, repeat — until everything is green.
After pushing a PR you typically wait for CI, check for merge conflicts, and respond to CodeRabbit review comments. Each issue requires a separate manual step. PR Guardian automates the entire feedback loop: it polls the PR status at a fixed interval, dispatches the appropriate fix skill when a problem is found, and exits only when all checks pass (or the iteration limit is reached).
/pr-guardian # Default: 5 min interval, 20 max iterations
/pr-guardian --interval 3 # Poll every 3 minutes
/pr-guardian --max-iterations 10 # Give up after 10 cycles
Before starting the loop, verify:
gh CLI is installed and authenticatedgh pr view)If any check fails, report the error and stop.
Run the bundled status script:
bash <skill-path>/scripts/poll_pr_status.sh
This returns a JSON object with these fields:
| Field | Type | Meaning |
|---|---|---|
branch | string | Current branch name |
pr_number | int | PR number |
checks_total | int | Total CI checks (excludes CodeRabbit) |
checks_passed | int | CI checks that passed |
checks_failed | int | CI checks that failed |
checks_running | int | CI checks still in progress |
has_conflict | bool | Merge conflicts detected |
coderabbit_check | string | CodeRabbit check status: none/pending/pass/fail |
coderabbit_comments | int | Number of CodeRabbit inline comments |
all_green | bool | True when everything passes (including CodeRabbit) |
Important: all_green is only true when ALL of these hold:
pending AND NOT none (review must have completed at least once)✅ Addressed are excluded)Print a concise status line each cycle:
[PR Guardian] Cycle 3/20 — PR #42
CI: 4 passed, 1 failed, 0 running
Conflicts: none
CodeRabbit: review completed, 2 inline comments
→ Action: fixing CodeRabbit comments
When issues are found, fix them one category at a time in this order. Only fix one category per cycle — after fixing, go back to Step 1 to re-poll, because a fix may have changed the state (e.g., a push triggers new CI runs).
Priority 1 — Merge conflicts
Merge conflicts block everything else. When has_conflict is true:
/fix-conflictPriority 2 — CI failures
When checks_failed > 0 and checks_running == 0 (wait for running
checks to finish before diagnosing failures):
/fix-ciPriority 3 — CodeRabbit review comments
When coderabbit_check == "pass" and coderabbit_comments > 0 and CI
is passing:
/fix-review/fix-review will verify each finding against current code before fixingIMPORTANT: Only dispatch /fix-review when coderabbit_check is
"pass" (review completed). If it is "pending", wait — the review is
still in progress and comments may not be final yet.
The correct action is to wait (not fix) when:
checks_running > 0: CI is still running — do not diagnose yetcoderabbit_check == "pending": CodeRabbit review is in progress —
wait for it to finish before looking at commentscoderabbit_check == "none": CodeRabbit hasn't started yet (common
right after a push) — wait at least one cycle for it to appearchecks_total == 0 and it's the first cycle: checks haven't started
yet — wait for GitHub Actions to pick up the pushSleep for the poll interval and re-check. Do not invoke any fix skill while checks are still running or reviews are pending — you would be fixing based on incomplete information.
After each cycle, check:
all_green == true): Print success message and exitIf none of these conditions are met, sleep for the configured interval and go back to Step 1.
sleep <interval_minutes * 60>
The default interval is 5 minutes (300 seconds). This gives CI enough time to run after a fix push before the next poll.
| Flag | Default | Description |
|---|---|---|
--interval | 5 | Minutes between polls |
--max-iterations | 20 | Max cycles before giving up |
Success:
[PR Guardian] All checks green! PR #42 is ready.
CI: 6/6 passed | Conflicts: none | CodeRabbit: pass, 0 comments
Completed in 3 cycles over 15 minutes.
Max iterations:
[PR Guardian] Reached 20 cycles without all-green.
Remaining issues:
- CI: tests failing (pytest assertion error in test_auth.py)
- CodeRabbit: 2 unresolved inline comments
Manual intervention needed.
Repeated failure:
[PR Guardian] Same CI failure persisted after 3 fix attempts.
Failing check: tests
Last error: AssertionError in test_auth.py:42
Automatic repair is not resolving this — please fix manually.
/fix-conflict, /fix-ci, and /fix-review.
It does not reimplement their logic — it orchestrates them.pending/pass/fail) is tracked
separately from inline comment count. A pending check means
the review is still running — do NOT dispatch /fix-review yet./fix-review verifies each CodeRabbit finding against the current
code before applying fixes — it does not blindly apply suggestions.