skills/bellwether/SKILL.md
Bring the current PR to a mergeable state: CI green, all review comments resolved, no merge conflicts. Self-contained — watches CI, fixes issues, watches again until merge-ready. Use when the user wants to keep a PR green, auto-fix CI, resolve review comments, or says "get this merged".
npx skillsauth add roderik/bellwether bellwetherInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Self-contained cycle: watch CI -> the instant work appears, fix it -> push -> watch again -> until merge-ready.
IMPORTANT: Execute ALL work in the main thread. Do NOT use the Agent tool, Task tool, or spawn sub-agents. Track all state in your working memory (context window). This skill runs as a sequential loop — you fetch, evaluate, fix, commit, reply, then loop.
bellwether check --watch. This command returns only when the PR is actually merge-ready (pr.ready=true), when actionable work appears (CI failures, unresolved reviews, merge conflicts), when the PR reaches a terminal state (merged or closed), or on timeout. It keeps polling while the PR is still not ready but there is nothing local to fix yet, including pending external checks and mergeable=blocked|unstable|unknown. Do NOT add sleep or polling.pending or in_progress CI is NOT success, NOT "probably fine", and NOT a reason to stop. It means the loop is still running. Keep bellwether check --watch in control until it returns actionable work or pr.ready=true.gh api, gh pr checks, gh pr view --json, gh api repos/*/check-runs, or any manual GitHub API calls to check CI or review status.sleep to wait for CI. The --watch flag handles waiting internally.gh api. The bellwether CLI returns them in structured format.bellwether is not found, install it first: npm install -g bellwetherWhen bellwether check --watch returns, apply the first matching rule:
| # | Condition | Action |
|---|-----------|--------|
| 1 | Any FAIL CI check is failing (not INFRA) | Fix CI (Phase 1). Push. Restart watch. |
| 2 | Any unresolved review comment is actionable | Fix comments (Phase 2). Push. Restart watch. |
| 3 | pr.mergeable=dirty\|behind | Sync branch. Push. Restart watch. |
| 4 | Any CI checks are pending or in progress, and there are no actionable reviews yet | Immediately restart bellwether check --watch. This is waiting, not success; do not report completion, do not stop, and do not say it will probably pass. |
| 5 | pr.ready=true | Done. Report "merge-ready". |
| 6 | pr.state=merged\|closed | Done. Report status. |
| 7 | pr.mergeable=blocked, CI green, 0 unresolved reviews, only missing PR review approval | Terminal. Report "Waiting for human review approval — external dependency." Stop. Do not restart watch. Do not fire the Stop hook again. |
| 8 | Only INFRA checks failing, no FAIL checks, 0 unresolved reviews | Done. Report "infrastructure CI failures are external — cannot fix locally." |
Status-only responses are forbidden when rule 1 or 2 applies. If there are failing CI checks or unresolved actionable review comments, you MUST fix them — never respond with just a status summary.
Pending CI does not block review work. If CI is pending but unresolved actionable review comments exist, fix the reviews (rule 2) immediately. Do not wait for CI to finish first.
The first moment new work appears, act immediately. The instant bellwether check --watch returns with a CI failure, unresolved actionable review, merge conflict, or behind branch, start fixing it right away. Do not defer it to a later pass.
Unresolved review comments on touched or related code are always in scope. Do not wait for a new user prompt. The only exceptions:
1. bellwether check --watch (returns only on pr.ready=true, actionable work, merged/closed PR state, or timeout; DO NOT substitute with gh/GitHub API calls — use this exact command)
2. Apply the Decision Table above — the first matching rule determines your action
3. If timed out:
- If any CI job is still pending or in progress -> go to 1 (restart watch)
- If CI is green, unresolved reviews are 0, and the only remaining blocker is review approval or another external dependency you cannot clear yourself -> done, report that exact external blocker
- Otherwise -> go to 1 (restart watch)
Never interpret a pending check or in-progress job as "close enough". Those states are never terminal. A timeout only becomes terminal when it confirms there is no actionable work left and the remaining blocker is purely external.
bellwether check --watch returnsThree sections:
state (open/closed/merged), mergeable (clean/dirty/behind/blocked/unstable), ready (true when all conditions met)FAIL checks are code failures you can fix. INFRA checks are infrastructure failures (deploy, security scan, coverage gate) you cannot fix locally.[STALE] were made against a different commit than current HEAD — verify relevance before acting.Important: allPassing=true is not sufficient on its own. The only success condition is pr.ready=true.
INFRA checks are external — skip them. Only fix FAIL checks. INFRA-prefixed failures are infrastructure CI (deploy previews, security scans, coverage gates, environment provisioning) that you cannot fix locally. Report them and move on. If unsure whether a check is fixable, attempt local reproduction — "command not found" or environment-specific errors mean infrastructure.
For each FAIL key in the CI section:
grep the codebase). If the same mistake appears in other files, fix all of them now — don't wait for CI to catch each one individually.any cast, error ignore), stop and find the real fix. Suppressions are only acceptable when the rule is genuinely inapplicable — explain why in the commit message.git add -A).DO NOT proceed to Phase 2 until CI is green. When CI fails, the required sequence is: reproduce locally -> fix -> rerun the failing command locally -> push -> restart the watch.
Process ALL comments in a single batch before replying to any of them.
Staleness check first. Reviews marked [STALE] were made against a different commit than current HEAD. For each stale review:
Read every REVIEW key. For each one, classify it and track the comment ID and planned action in your working memory:
Bot comments (CodeRabbit, Copilot, Cursor Bugbot):
Bot severity heuristics:
[nitpick] or starting with "Nitpick:": resolve without fixing unless you agree the change is genuinely valuable.Human comments:
Fix all true positives and actionable items. Verify locally. Stage files by name, commit once, push.
DO NOT start Step C until the commit exists and is pushed.
Every single review thread MUST be both replied to AND resolved. Treat any thread left formally open as unfinished work and a bug in your execution, not an acceptable outcome.
EVERY reply MUST use --resolve. NEVER use --reply without --resolve. --resolve marks review threads as resolved in GitHub — always include it so threads don't stay open.
Reply to each comment individually — one bellwether check --reply ... --resolve call per comment:
# Fixed something
bellwether check --reply "<id>:Fixed in <hash>. <description>" --resolve
# Won't fix / false positive
bellwether check --reply "<id>:Won't fix — <reason>" --resolve
# Already addressed
bellwether check --reply "<id>:Already handled — <explanation>" --resolve
Rules for thread resolution:
--resolve on EVERY reply. No exceptions.--resolve. Won't fix? --resolve. False positive? --resolve. Already addressed? --resolve.DO NOT restart the watch until ALL replies are posted AND all threads are resolved. After all replies, go to step 1 of the loop.
pr.ready=true, pr.state=merged|closed, or you have exhausted all possible fixes. Do NOT ask the user if they want to wait, come back later, or stop watching. The --watch flag handles waiting — trust it and keep looping.in_progress means "stay in the loop", not "we're probably fine" — an in-progress job is unfinished work. Stay alive, keep Bellwether watching, and be ready to fix the first failure or review that appears.--reply call MUST include --resolve. An unresolved thread is a task you haven't finished. Zero unresolved threads is the only acceptable state before stopping.pr.ready is false, keep going. The only exceptions are Decision Table rules 7 and 8: external blockers you cannot fulfill (human review approval, infrastructure CI).pr.mergeable=blocked, CI green, 0 unresolved reviews), this is terminal for the agent. Do not loop, do not retry, do not fire the Stop hook again. Report once and stop. Same for infrastructure-only CI failures (INFRA checks with no FAIL checks).testing
Bring the current PR to a mergeable state: CI green, all review comments resolved, no merge conflicts. Self-contained — watches CI, fixes issues, watches again until merge-ready. Use when the user wants to keep a PR green, auto-fix CI, resolve review comments, or says "get this merged".
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".
testing
Host security hardening and risk-tolerance configuration for OpenClaw deployments. Use when a user asks for security audits, firewall/SSH/update hardening, risk posture, exposure review, OpenClaw cron scheduling for periodic checks, or version status checks on a machine running OpenClaw (laptop, workstation, Pi, VPS).
testing
Create, edit, improve, or audit AgentSkills. Use when creating a new skill from scratch or when asked to improve, review, audit, tidy up, or clean up an existing skill or SKILL.md file. Also use when editing or restructuring a skill directory (moving files to references/ or scripts/, removing stale content, validating against the AgentSkills spec). Triggers on phrases like "create a skill", "author a skill", "tidy up a skill", "improve this skill", "review the skill", "clean up the skill", "audit the skill".