@olegkoval/agent-skills 1.23.0 → 1.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/.claude-plugin/plugin.json +2 -1
  2. package/.cursor-plugin/index.json +5 -0
  3. package/.grok-plugin/index.json +5 -0
  4. package/.kiro/steering/garmin-watchface.md +7 -0
  5. package/.kiro/steering/pr-finalize.md +140 -0
  6. package/.windsurf/rules/garmin-watchface.md +7 -0
  7. package/.windsurf/rules/pr-finalize.md +139 -0
  8. package/README.md +1 -0
  9. package/catalog/skills.json +30 -6
  10. package/package.json +1 -1
  11. package/packages/software-development/pr-finalize/SKILL.md +149 -0
  12. package/packages/software-development/pr-finalize/adapters/claude/plugin.json +5 -0
  13. package/packages/software-development/pr-finalize/adapters/claude/skills/pr-finalize/SKILL.md +150 -0
  14. package/packages/software-development/pr-finalize/adapters/codex/README.md +26 -0
  15. package/packages/software-development/pr-finalize/adapters/cursor/plugin.json +6 -0
  16. package/packages/software-development/pr-finalize/adapters/cursor/skills/pr-finalize/SKILL.md +151 -0
  17. package/packages/software-development/pr-finalize/adapters/grok/plugin.json +6 -0
  18. package/packages/software-development/pr-finalize/adapters/grok/skills/pr-finalize/SKILL.md +150 -0
  19. package/packages/software-development/pr-finalize/adapters/kiro/steering/pr-finalize.md +140 -0
  20. package/packages/software-development/pr-finalize/adapters/windsurf/rules/pr-finalize.md +139 -0
  21. package/packages/wearables/garmin-watchface/SKILL.md +7 -0
  22. package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/SKILL.md +7 -0
  23. package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/references/publishing.md +145 -0
  24. package/packages/wearables/garmin-watchface/adapters/claude/skills/garmin-watchface/scripts/ciq-release +333 -0
  25. package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/SKILL.md +7 -0
  26. package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/references/publishing.md +145 -0
  27. package/packages/wearables/garmin-watchface/adapters/cursor/skills/garmin-watchface/scripts/ciq-release +333 -0
  28. package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/SKILL.md +7 -0
  29. package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/references/publishing.md +145 -0
  30. package/packages/wearables/garmin-watchface/adapters/grok/skills/garmin-watchface/scripts/ciq-release +333 -0
  31. package/packages/wearables/garmin-watchface/adapters/kiro/steering/garmin-watchface.md +7 -0
  32. package/packages/wearables/garmin-watchface/adapters/windsurf/rules/garmin-watchface.md +7 -0
  33. package/packages/wearables/garmin-watchface/references/publishing.md +145 -0
  34. package/packages/wearables/garmin-watchface/scripts/ciq-release +333 -0
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: pr-finalize
3
+ description: >
4
+ Drives a single GitHub PR from "open with loose ends" to genuinely ready-to-merge: rebases off the
5
+ base branch and resolves conflicts, sweeps every review bot (Qodo, CodeRabbit, Greptile) plus human
6
+ comments to zero unaddressed findings, verifies that unit AND browser/E2E coverage was actually
7
+ added for the change, runs the repo's real lint/format/test gates before pushing, and reports what
8
+ still needs a human. Use when the user gives a PR URL or number and says "finalize this PR",
9
+ "fix all outstanding comments", "address the review feedback and push", "get this PR merge-ready",
10
+ or asks to clear what Qodo/CodeRabbit/Greptile could still comment on.
11
+ compatibility: Requires git and gh (GitHub CLI) authenticated. Review-bot sweeps only cover bots actually installed on the repo.
12
+ metadata:
13
+ version: "1.0"
14
+ allowed-tools: Bash(gh:*) Bash(git:*)
15
+ ---
16
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
17
+
18
+ # PR Finalize
19
+
20
+ One PR, taken all the way to merge-ready. The job is not "make the bots stop talking" — it is **land the change in a state a careful reviewer would sign off on**, with evidence for every claim.
21
+
22
+ ## Inputs
23
+
24
+ - **PR number or URL** (optional): detect from the current branch if not given.
25
+ - `--no-push` (optional): do everything except the final push. Use when the repo auto-merges and the user wants to eyeball first.
26
+
27
+ ## Non-negotiables
28
+
29
+ These are the failure modes this skill exists to prevent. Violating one makes the whole run worthless:
30
+
31
+ - **Never report a gate as passing without having run it.** Paste the real output. "Tests should pass" is not a result.
32
+ - **Never resolve or claim-fix a finding you didn't actually fix.** Blocked is an honest outcome; a false "done" is not.
33
+ - **Never `git add -A`.** Stage only the files your fixes touched. Start from a clean tree so that's safe.
34
+ - **Never invent test coverage.** If the change has no browser-reachable surface, say so explicitly and name the suite that *is* the real gate. Do not add a hollow E2E test to look thorough.
35
+ - **A green CI badge is not proof.** Many repos split their required check from the full suite (browser-free half only, etc.). Find out what the required check actually runs.
36
+
37
+ ## Instructions
38
+
39
+ ### 1. Establish the ground truth
40
+
41
+ ```bash
42
+ gh pr view <PR> --json number,title,body,state,isDraft,headRefName,baseRefName,mergeable,mergeStateStatus,labels,reviewDecision,statusCheckRollup,url
43
+ ```
44
+
45
+ Record four things before touching code:
46
+
47
+ - **`mergeable`** — `CONFLICTING` means step 2 is mandatory.
48
+ - **Which checks are failing**, and for each, whether it is *required*. Check branch protection (`gh api repos/{owner}/{repo}/branches/<base>/protection`) rather than assuming — a red optional job (a flaky bot-review runner, a nightly) is not a blocker, and burning the run waiting on one is a classic waste.
49
+ - **Whether the repo auto-merges.** Look for a shepherd/automerge workflow in `.github/workflows/` and read its *gating conditions* (required labels, required checks). If pushing could trigger an immediate merge, decide deliberately: either satisfy the review sweep first, or tell the user before you push. Never let an auto-merge race a review you were asked to complete.
50
+ - **Whether a bot review actually ran.** A `SUCCESS` status from a review bot can still mean "rate-limited, never reviewed" — read its comment body, not just the check state.
51
+
52
+ ### 2. Rebase onto the base branch
53
+
54
+ Require a clean tree first (`git status --porcelain` empty), then:
55
+
56
+ ```bash
57
+ git fetch origin <base>
58
+ git rebase origin/<base>
59
+ ```
60
+
61
+ Resolve conflicts by **understanding both sides**, not by picking one. Read the base-side commit that introduced the conflicting hunk (`git log -1 --format=%s <base> -- <file>`, then the diff) — a conflict usually means main changed an invariant your branch is unaware of, and blindly keeping "your" side silently reverts it. State in the PR comment which invariant you preserved and why.
62
+
63
+ After resolving, re-run the tests before continuing — a rebase that compiles is not a rebase that works.
64
+
65
+ ### 3. Sweep every review source
66
+
67
+ Collect findings from all of these; do not stop at the first:
68
+
69
+ ```bash
70
+ # inline review threads (all bots + humans), with resolution state
71
+ gh api repos/{owner}/{repo}/pulls/<PR>/comments --paginate
72
+ # rollup issue comments (where CodeRabbit/Qodo post summaries and rate-limit notices)
73
+ gh api repos/{owner}/{repo}/issues/<PR>/comments --paginate
74
+ # formal reviews
75
+ gh pr view <PR> --json reviews
76
+ ```
77
+
78
+ **Delegate to the dedicated loop skill when one exists** rather than reimplementing its bot's protocol — `qodoloop` for Qodo, `coderabbitloop` for CodeRabbit, `greploop` for Greptile. Each already encodes that bot's posting shape, its ready-made per-finding fix prompt, and its real terminal states. Use this skill's own sweep for human comments and for bots without a dedicated loop.
79
+
80
+ Triage every finding into exactly one bucket:
81
+
82
+ | Bucket | Action |
83
+ |---|---|
84
+ | **Real defect** | Fix it. This is the point of the exercise. |
85
+ | **Legitimate improvement** | Fix it if it's in scope for this PR. |
86
+ | **False positive** | Reply explaining *specifically* why the bot is wrong. Do not resolve silently. |
87
+ | **Needs a human call** | Reply, leave open, surface in the final report. |
88
+
89
+ Bot findings are suggestions from something that has not run the code. A "🐞 Bug" label is a hypothesis — verify it against the actual source before fixing, and against the actual behavior before dismissing.
90
+
91
+ ### 4. Close the coverage gap
92
+
93
+ Ask, for the change as a whole, what would catch a regression here — then check whether the PR actually has it.
94
+
95
+ - **Unit / integration tests:** does every new branch have a test that fails if you invert it? Bots frequently and correctly flag helper functions exercised only *indirectly* through a caller. A direct test per branch is cheap and is usually the right response.
96
+ - **Browser / E2E tests:** determine whether the repo supports them (`playwright.config.*`, `cypress.config.*`, a `test:e2e` script) **and** whether this change has any surface they can reach. Then do one of exactly two things:
97
+ - it has a reachable surface → add or extend the E2E spec;
98
+ - it does not → **say so explicitly in the PR comment**, name why (e.g. "this is entirely inside a Durable Object alarm loop; the E2E harness only serves static assets"), and name the suite that is the real gate.
99
+
100
+ Silence here reads as an oversight. An explicit "not applicable, because X" reads as diligence — and is checkable.
101
+
102
+ ### 5. Run the real gates
103
+
104
+ Discover them from the repo (`Makefile`, `package.json` scripts, CI workflow) — do not guess target names. Run, at minimum, the equivalents of:
105
+
106
+ ```bash
107
+ <lint> # e.g. make lint / npm run lint
108
+ <format> # check mode first; only write if it reports drift
109
+ <tests> # the suite covering the changed package
110
+ ```
111
+
112
+ Capture exit codes, not just output. Repo-specific traps worth checking for before you burn a cycle: linters whose cache replays findings from deleted sibling worktrees, formatters whose local toolchain version outruns CI's (churning unrelated files), and test runners that hang when two runs overlap.
113
+
114
+ If a gate fails, fix it. Do not push red.
115
+
116
+ ### 6. Push and explain
117
+
118
+ Stage only the files you touched, commit, and push (`--force-with-lease` after a rebase — never bare `--force`).
119
+
120
+ Then post **one** PR comment that a reviewer can audit without re-reading the diff:
121
+
122
+ - what the rebase conflict was and which side won, with the reason;
123
+ - each finding, and what you did about it (including the ones you rejected, with the argument);
124
+ - the coverage decision from step 4, including the explicit not-applicable if that's the answer;
125
+ - **verbatim** gate output — real numbers (`# pass 480 / # fail 0`, `0 issues.`), not adjectives.
126
+
127
+ Re-trigger any bot that never actually reviewed (e.g. `@coderabbitai review`) so the PR gets the pass it was owed.
128
+
129
+ ### 7. Verify and report
130
+
131
+ Re-read the PR state after the push — confirm `mergeable` flipped, checks went green, and clear now-stale labels (`needs-rebase`, etc.). Poll re-triggered bots for their new pass and handle anything it raises.
132
+
133
+ ```text
134
+ PR #965 finalized.
135
+ Rebase: 1 conflict resolved (kept main's #834 D1-first ordering)
136
+ Findings: 2 addressed, 0 rejected, 0 blocked
137
+ Coverage: +5 unit tests; E2E not applicable (no browser surface) — stated on the PR
138
+ Gates: tests 480/480, lint 0 issues, format clean
139
+ State: MERGEABLE, checks green
140
+ Needs human: none
141
+ ```
142
+
143
+ If anything is left, say precisely what and why — an honest "blocked on X" is the deliverable when X is genuinely a human call.
144
+
145
+ ## Related skills
146
+
147
+ - `qodoloop` — full Qodo thread protocol (per-finding Agent Prompts, resolve mutations).
148
+ - `coderabbitloop` — full CodeRabbit protocol.
149
+ - `greploop` — drives a PR to a 5/5 Greptile confidence score.
150
+ - `ci-fix-loop` — when the blocker is a failing pipeline rather than review feedback.
@@ -0,0 +1,26 @@
1
+ # Codex Adapter for pr-finalize
2
+
3
+ This is a Codex-specific adapter for the `olko:pr-finalize` skill.
4
+ The canonical skill definition is in `../../SKILL.md`.
5
+
6
+ ## Usage
7
+
8
+ Invoke in a Codex session:
9
+
10
+ ```text
11
+ Use the olko:pr-finalize skill to take PR #123 all the way to merge-ready.
12
+ ```
13
+
14
+ ## Workflow
15
+
16
+ See `../../SKILL.md` for the full workflow: establish the PR's ground truth (conflict state, which
17
+ checks are actually *required*, whether the repo auto-merges, whether each review bot really ran or
18
+ just rate-limited), rebase onto the base branch and resolve conflicts by understanding both sides,
19
+ sweep every review source (bots and humans) and triage each finding into fixed / rejected-with-reason
20
+ / needs-a-human, close the unit and E2E coverage gap — stating explicitly when E2E is not applicable
21
+ and why — run the repo's own lint/format/test gates and capture their real output, then push,
22
+ explain the whole thing in one auditable PR comment, and verify the resulting state.
23
+
24
+ The procedure is plain `git`/`gh` and is agent-agnostic. Where a dedicated per-bot loop skill exists
25
+ (`olko:qodoloop`, `olko:coderabbitloop`, `olko:greploop`), delegate that bot's sweep to it rather
26
+ than reimplementing its protocol.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "olko:pr-finalize",
3
+ "version": "0.1.0",
4
+ "description": "Drives one GitHub PR to genuinely merge-ready: rebases and resolves conflicts, sweeps every review bot and human comment to zero unaddressed findings, verifies unit and E2E coverage actually exists, runs the repo's real lint/format/test gates before pushing, and reports what still needs a human.",
5
+ "skills": "skills/"
6
+ }
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: pr-finalize
3
+ description: >
4
+ Drives a single GitHub PR from "open with loose ends" to genuinely ready-to-merge: rebases off the
5
+ base branch and resolves conflicts, sweeps every review bot (Qodo, CodeRabbit, Greptile) plus human
6
+ comments to zero unaddressed findings, verifies that unit AND browser/E2E coverage was actually
7
+ added for the change, runs the repo's real lint/format/test gates before pushing, and reports what
8
+ still needs a human. Use when the user gives a PR URL or number and says "finalize this PR",
9
+ "fix all outstanding comments", "address the review feedback and push", "get this PR merge-ready",
10
+ or asks to clear what Qodo/CodeRabbit/Greptile could still comment on.
11
+ compatibility: Requires git and gh (GitHub CLI) authenticated. Review-bot sweeps only cover bots actually installed on the repo.
12
+ metadata:
13
+ targets: ["cursor"]
14
+ version: "1.0"
15
+ allowed-tools: Bash(gh:*) Bash(git:*)
16
+ ---
17
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
18
+
19
+ # PR Finalize
20
+
21
+ One PR, taken all the way to merge-ready. The job is not "make the bots stop talking" — it is **land the change in a state a careful reviewer would sign off on**, with evidence for every claim.
22
+
23
+ ## Inputs
24
+
25
+ - **PR number or URL** (optional): detect from the current branch if not given.
26
+ - `--no-push` (optional): do everything except the final push. Use when the repo auto-merges and the user wants to eyeball first.
27
+
28
+ ## Non-negotiables
29
+
30
+ These are the failure modes this skill exists to prevent. Violating one makes the whole run worthless:
31
+
32
+ - **Never report a gate as passing without having run it.** Paste the real output. "Tests should pass" is not a result.
33
+ - **Never resolve or claim-fix a finding you didn't actually fix.** Blocked is an honest outcome; a false "done" is not.
34
+ - **Never `git add -A`.** Stage only the files your fixes touched. Start from a clean tree so that's safe.
35
+ - **Never invent test coverage.** If the change has no browser-reachable surface, say so explicitly and name the suite that *is* the real gate. Do not add a hollow E2E test to look thorough.
36
+ - **A green CI badge is not proof.** Many repos split their required check from the full suite (browser-free half only, etc.). Find out what the required check actually runs.
37
+
38
+ ## Instructions
39
+
40
+ ### 1. Establish the ground truth
41
+
42
+ ```bash
43
+ gh pr view <PR> --json number,title,body,state,isDraft,headRefName,baseRefName,mergeable,mergeStateStatus,labels,reviewDecision,statusCheckRollup,url
44
+ ```
45
+
46
+ Record four things before touching code:
47
+
48
+ - **`mergeable`** — `CONFLICTING` means step 2 is mandatory.
49
+ - **Which checks are failing**, and for each, whether it is *required*. Check branch protection (`gh api repos/{owner}/{repo}/branches/<base>/protection`) rather than assuming — a red optional job (a flaky bot-review runner, a nightly) is not a blocker, and burning the run waiting on one is a classic waste.
50
+ - **Whether the repo auto-merges.** Look for a shepherd/automerge workflow in `.github/workflows/` and read its *gating conditions* (required labels, required checks). If pushing could trigger an immediate merge, decide deliberately: either satisfy the review sweep first, or tell the user before you push. Never let an auto-merge race a review you were asked to complete.
51
+ - **Whether a bot review actually ran.** A `SUCCESS` status from a review bot can still mean "rate-limited, never reviewed" — read its comment body, not just the check state.
52
+
53
+ ### 2. Rebase onto the base branch
54
+
55
+ Require a clean tree first (`git status --porcelain` empty), then:
56
+
57
+ ```bash
58
+ git fetch origin <base>
59
+ git rebase origin/<base>
60
+ ```
61
+
62
+ Resolve conflicts by **understanding both sides**, not by picking one. Read the base-side commit that introduced the conflicting hunk (`git log -1 --format=%s <base> -- <file>`, then the diff) — a conflict usually means main changed an invariant your branch is unaware of, and blindly keeping "your" side silently reverts it. State in the PR comment which invariant you preserved and why.
63
+
64
+ After resolving, re-run the tests before continuing — a rebase that compiles is not a rebase that works.
65
+
66
+ ### 3. Sweep every review source
67
+
68
+ Collect findings from all of these; do not stop at the first:
69
+
70
+ ```bash
71
+ # inline review threads (all bots + humans), with resolution state
72
+ gh api repos/{owner}/{repo}/pulls/<PR>/comments --paginate
73
+ # rollup issue comments (where CodeRabbit/Qodo post summaries and rate-limit notices)
74
+ gh api repos/{owner}/{repo}/issues/<PR>/comments --paginate
75
+ # formal reviews
76
+ gh pr view <PR> --json reviews
77
+ ```
78
+
79
+ **Delegate to the dedicated loop skill when one exists** rather than reimplementing its bot's protocol — `qodoloop` for Qodo, `coderabbitloop` for CodeRabbit, `greploop` for Greptile. Each already encodes that bot's posting shape, its ready-made per-finding fix prompt, and its real terminal states. Use this skill's own sweep for human comments and for bots without a dedicated loop.
80
+
81
+ Triage every finding into exactly one bucket:
82
+
83
+ | Bucket | Action |
84
+ |---|---|
85
+ | **Real defect** | Fix it. This is the point of the exercise. |
86
+ | **Legitimate improvement** | Fix it if it's in scope for this PR. |
87
+ | **False positive** | Reply explaining *specifically* why the bot is wrong. Do not resolve silently. |
88
+ | **Needs a human call** | Reply, leave open, surface in the final report. |
89
+
90
+ Bot findings are suggestions from something that has not run the code. A "🐞 Bug" label is a hypothesis — verify it against the actual source before fixing, and against the actual behavior before dismissing.
91
+
92
+ ### 4. Close the coverage gap
93
+
94
+ Ask, for the change as a whole, what would catch a regression here — then check whether the PR actually has it.
95
+
96
+ - **Unit / integration tests:** does every new branch have a test that fails if you invert it? Bots frequently and correctly flag helper functions exercised only *indirectly* through a caller. A direct test per branch is cheap and is usually the right response.
97
+ - **Browser / E2E tests:** determine whether the repo supports them (`playwright.config.*`, `cypress.config.*`, a `test:e2e` script) **and** whether this change has any surface they can reach. Then do one of exactly two things:
98
+ - it has a reachable surface → add or extend the E2E spec;
99
+ - it does not → **say so explicitly in the PR comment**, name why (e.g. "this is entirely inside a Durable Object alarm loop; the E2E harness only serves static assets"), and name the suite that is the real gate.
100
+
101
+ Silence here reads as an oversight. An explicit "not applicable, because X" reads as diligence — and is checkable.
102
+
103
+ ### 5. Run the real gates
104
+
105
+ Discover them from the repo (`Makefile`, `package.json` scripts, CI workflow) — do not guess target names. Run, at minimum, the equivalents of:
106
+
107
+ ```bash
108
+ <lint> # e.g. make lint / npm run lint
109
+ <format> # check mode first; only write if it reports drift
110
+ <tests> # the suite covering the changed package
111
+ ```
112
+
113
+ Capture exit codes, not just output. Repo-specific traps worth checking for before you burn a cycle: linters whose cache replays findings from deleted sibling worktrees, formatters whose local toolchain version outruns CI's (churning unrelated files), and test runners that hang when two runs overlap.
114
+
115
+ If a gate fails, fix it. Do not push red.
116
+
117
+ ### 6. Push and explain
118
+
119
+ Stage only the files you touched, commit, and push (`--force-with-lease` after a rebase — never bare `--force`).
120
+
121
+ Then post **one** PR comment that a reviewer can audit without re-reading the diff:
122
+
123
+ - what the rebase conflict was and which side won, with the reason;
124
+ - each finding, and what you did about it (including the ones you rejected, with the argument);
125
+ - the coverage decision from step 4, including the explicit not-applicable if that's the answer;
126
+ - **verbatim** gate output — real numbers (`# pass 480 / # fail 0`, `0 issues.`), not adjectives.
127
+
128
+ Re-trigger any bot that never actually reviewed (e.g. `@coderabbitai review`) so the PR gets the pass it was owed.
129
+
130
+ ### 7. Verify and report
131
+
132
+ Re-read the PR state after the push — confirm `mergeable` flipped, checks went green, and clear now-stale labels (`needs-rebase`, etc.). Poll re-triggered bots for their new pass and handle anything it raises.
133
+
134
+ ```text
135
+ PR #965 finalized.
136
+ Rebase: 1 conflict resolved (kept main's #834 D1-first ordering)
137
+ Findings: 2 addressed, 0 rejected, 0 blocked
138
+ Coverage: +5 unit tests; E2E not applicable (no browser surface) — stated on the PR
139
+ Gates: tests 480/480, lint 0 issues, format clean
140
+ State: MERGEABLE, checks green
141
+ Needs human: none
142
+ ```
143
+
144
+ If anything is left, say precisely what and why — an honest "blocked on X" is the deliverable when X is genuinely a human call.
145
+
146
+ ## Related skills
147
+
148
+ - `qodoloop` — full Qodo thread protocol (per-finding Agent Prompts, resolve mutations).
149
+ - `coderabbitloop` — full CodeRabbit protocol.
150
+ - `greploop` — drives a PR to a 5/5 Greptile confidence score.
151
+ - `ci-fix-loop` — when the blocker is a failing pipeline rather than review feedback.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "olko:pr-finalize",
3
+ "version": "0.1.0",
4
+ "description": "Drives one GitHub PR to genuinely merge-ready: rebases and resolves conflicts, sweeps every review bot and human comment to zero unaddressed findings, verifies unit and E2E coverage actually exists, runs the repo's real lint/format/test gates before pushing, and reports what still needs a human.",
5
+ "skills": "skills/"
6
+ }
@@ -0,0 +1,150 @@
1
+ ---
2
+ name: pr-finalize
3
+ description: >
4
+ Drives a single GitHub PR from "open with loose ends" to genuinely ready-to-merge: rebases off the
5
+ base branch and resolves conflicts, sweeps every review bot (Qodo, CodeRabbit, Greptile) plus human
6
+ comments to zero unaddressed findings, verifies that unit AND browser/E2E coverage was actually
7
+ added for the change, runs the repo's real lint/format/test gates before pushing, and reports what
8
+ still needs a human. Use when the user gives a PR URL or number and says "finalize this PR",
9
+ "fix all outstanding comments", "address the review feedback and push", "get this PR merge-ready",
10
+ or asks to clear what Qodo/CodeRabbit/Greptile could still comment on.
11
+ compatibility: Requires git and gh (GitHub CLI) authenticated. Review-bot sweeps only cover bots actually installed on the repo.
12
+ metadata:
13
+ version: "1.0"
14
+ allowed-tools: Bash(gh:*) Bash(git:*)
15
+ ---
16
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
17
+
18
+ # PR Finalize
19
+
20
+ One PR, taken all the way to merge-ready. The job is not "make the bots stop talking" — it is **land the change in a state a careful reviewer would sign off on**, with evidence for every claim.
21
+
22
+ ## Inputs
23
+
24
+ - **PR number or URL** (optional): detect from the current branch if not given.
25
+ - `--no-push` (optional): do everything except the final push. Use when the repo auto-merges and the user wants to eyeball first.
26
+
27
+ ## Non-negotiables
28
+
29
+ These are the failure modes this skill exists to prevent. Violating one makes the whole run worthless:
30
+
31
+ - **Never report a gate as passing without having run it.** Paste the real output. "Tests should pass" is not a result.
32
+ - **Never resolve or claim-fix a finding you didn't actually fix.** Blocked is an honest outcome; a false "done" is not.
33
+ - **Never `git add -A`.** Stage only the files your fixes touched. Start from a clean tree so that's safe.
34
+ - **Never invent test coverage.** If the change has no browser-reachable surface, say so explicitly and name the suite that *is* the real gate. Do not add a hollow E2E test to look thorough.
35
+ - **A green CI badge is not proof.** Many repos split their required check from the full suite (browser-free half only, etc.). Find out what the required check actually runs.
36
+
37
+ ## Instructions
38
+
39
+ ### 1. Establish the ground truth
40
+
41
+ ```bash
42
+ gh pr view <PR> --json number,title,body,state,isDraft,headRefName,baseRefName,mergeable,mergeStateStatus,labels,reviewDecision,statusCheckRollup,url
43
+ ```
44
+
45
+ Record four things before touching code:
46
+
47
+ - **`mergeable`** — `CONFLICTING` means step 2 is mandatory.
48
+ - **Which checks are failing**, and for each, whether it is *required*. Check branch protection (`gh api repos/{owner}/{repo}/branches/<base>/protection`) rather than assuming — a red optional job (a flaky bot-review runner, a nightly) is not a blocker, and burning the run waiting on one is a classic waste.
49
+ - **Whether the repo auto-merges.** Look for a shepherd/automerge workflow in `.github/workflows/` and read its *gating conditions* (required labels, required checks). If pushing could trigger an immediate merge, decide deliberately: either satisfy the review sweep first, or tell the user before you push. Never let an auto-merge race a review you were asked to complete.
50
+ - **Whether a bot review actually ran.** A `SUCCESS` status from a review bot can still mean "rate-limited, never reviewed" — read its comment body, not just the check state.
51
+
52
+ ### 2. Rebase onto the base branch
53
+
54
+ Require a clean tree first (`git status --porcelain` empty), then:
55
+
56
+ ```bash
57
+ git fetch origin <base>
58
+ git rebase origin/<base>
59
+ ```
60
+
61
+ Resolve conflicts by **understanding both sides**, not by picking one. Read the base-side commit that introduced the conflicting hunk (`git log -1 --format=%s <base> -- <file>`, then the diff) — a conflict usually means main changed an invariant your branch is unaware of, and blindly keeping "your" side silently reverts it. State in the PR comment which invariant you preserved and why.
62
+
63
+ After resolving, re-run the tests before continuing — a rebase that compiles is not a rebase that works.
64
+
65
+ ### 3. Sweep every review source
66
+
67
+ Collect findings from all of these; do not stop at the first:
68
+
69
+ ```bash
70
+ # inline review threads (all bots + humans), with resolution state
71
+ gh api repos/{owner}/{repo}/pulls/<PR>/comments --paginate
72
+ # rollup issue comments (where CodeRabbit/Qodo post summaries and rate-limit notices)
73
+ gh api repos/{owner}/{repo}/issues/<PR>/comments --paginate
74
+ # formal reviews
75
+ gh pr view <PR> --json reviews
76
+ ```
77
+
78
+ **Delegate to the dedicated loop skill when one exists** rather than reimplementing its bot's protocol — `qodoloop` for Qodo, `coderabbitloop` for CodeRabbit, `greploop` for Greptile. Each already encodes that bot's posting shape, its ready-made per-finding fix prompt, and its real terminal states. Use this skill's own sweep for human comments and for bots without a dedicated loop.
79
+
80
+ Triage every finding into exactly one bucket:
81
+
82
+ | Bucket | Action |
83
+ |---|---|
84
+ | **Real defect** | Fix it. This is the point of the exercise. |
85
+ | **Legitimate improvement** | Fix it if it's in scope for this PR. |
86
+ | **False positive** | Reply explaining *specifically* why the bot is wrong. Do not resolve silently. |
87
+ | **Needs a human call** | Reply, leave open, surface in the final report. |
88
+
89
+ Bot findings are suggestions from something that has not run the code. A "🐞 Bug" label is a hypothesis — verify it against the actual source before fixing, and against the actual behavior before dismissing.
90
+
91
+ ### 4. Close the coverage gap
92
+
93
+ Ask, for the change as a whole, what would catch a regression here — then check whether the PR actually has it.
94
+
95
+ - **Unit / integration tests:** does every new branch have a test that fails if you invert it? Bots frequently and correctly flag helper functions exercised only *indirectly* through a caller. A direct test per branch is cheap and is usually the right response.
96
+ - **Browser / E2E tests:** determine whether the repo supports them (`playwright.config.*`, `cypress.config.*`, a `test:e2e` script) **and** whether this change has any surface they can reach. Then do one of exactly two things:
97
+ - it has a reachable surface → add or extend the E2E spec;
98
+ - it does not → **say so explicitly in the PR comment**, name why (e.g. "this is entirely inside a Durable Object alarm loop; the E2E harness only serves static assets"), and name the suite that is the real gate.
99
+
100
+ Silence here reads as an oversight. An explicit "not applicable, because X" reads as diligence — and is checkable.
101
+
102
+ ### 5. Run the real gates
103
+
104
+ Discover them from the repo (`Makefile`, `package.json` scripts, CI workflow) — do not guess target names. Run, at minimum, the equivalents of:
105
+
106
+ ```bash
107
+ <lint> # e.g. make lint / npm run lint
108
+ <format> # check mode first; only write if it reports drift
109
+ <tests> # the suite covering the changed package
110
+ ```
111
+
112
+ Capture exit codes, not just output. Repo-specific traps worth checking for before you burn a cycle: linters whose cache replays findings from deleted sibling worktrees, formatters whose local toolchain version outruns CI's (churning unrelated files), and test runners that hang when two runs overlap.
113
+
114
+ If a gate fails, fix it. Do not push red.
115
+
116
+ ### 6. Push and explain
117
+
118
+ Stage only the files you touched, commit, and push (`--force-with-lease` after a rebase — never bare `--force`).
119
+
120
+ Then post **one** PR comment that a reviewer can audit without re-reading the diff:
121
+
122
+ - what the rebase conflict was and which side won, with the reason;
123
+ - each finding, and what you did about it (including the ones you rejected, with the argument);
124
+ - the coverage decision from step 4, including the explicit not-applicable if that's the answer;
125
+ - **verbatim** gate output — real numbers (`# pass 480 / # fail 0`, `0 issues.`), not adjectives.
126
+
127
+ Re-trigger any bot that never actually reviewed (e.g. `@coderabbitai review`) so the PR gets the pass it was owed.
128
+
129
+ ### 7. Verify and report
130
+
131
+ Re-read the PR state after the push — confirm `mergeable` flipped, checks went green, and clear now-stale labels (`needs-rebase`, etc.). Poll re-triggered bots for their new pass and handle anything it raises.
132
+
133
+ ```text
134
+ PR #965 finalized.
135
+ Rebase: 1 conflict resolved (kept main's #834 D1-first ordering)
136
+ Findings: 2 addressed, 0 rejected, 0 blocked
137
+ Coverage: +5 unit tests; E2E not applicable (no browser surface) — stated on the PR
138
+ Gates: tests 480/480, lint 0 issues, format clean
139
+ State: MERGEABLE, checks green
140
+ Needs human: none
141
+ ```
142
+
143
+ If anything is left, say precisely what and why — an honest "blocked on X" is the deliverable when X is genuinely a human call.
144
+
145
+ ## Related skills
146
+
147
+ - `qodoloop` — full Qodo thread protocol (per-finding Agent Prompts, resolve mutations).
148
+ - `coderabbitloop` — full CodeRabbit protocol.
149
+ - `greploop` — drives a PR to a 5/5 Greptile confidence score.
150
+ - `ci-fix-loop` — when the blocker is a failing pipeline rather than review feedback.
@@ -0,0 +1,140 @@
1
+ <!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
2
+
3
+ ---
4
+ inclusion: manual
5
+ description: "Drives one GitHub PR to genuinely merge-ready: rebases and resolves conflicts, sweeps every review bot and human comment to zero unaddressed findings, verifies unit and E2E coverage actually exists, runs the repo's real lint/format/test gates before pushing, and reports what still needs a human."
6
+ ---
7
+
8
+ # PR Finalize
9
+
10
+ One PR, taken all the way to merge-ready. The job is not "make the bots stop talking" — it is **land the change in a state a careful reviewer would sign off on**, with evidence for every claim.
11
+
12
+ ## Inputs
13
+
14
+ - **PR number or URL** (optional): detect from the current branch if not given.
15
+ - `--no-push` (optional): do everything except the final push. Use when the repo auto-merges and the user wants to eyeball first.
16
+
17
+ ## Non-negotiables
18
+
19
+ These are the failure modes this skill exists to prevent. Violating one makes the whole run worthless:
20
+
21
+ - **Never report a gate as passing without having run it.** Paste the real output. "Tests should pass" is not a result.
22
+ - **Never resolve or claim-fix a finding you didn't actually fix.** Blocked is an honest outcome; a false "done" is not.
23
+ - **Never `git add -A`.** Stage only the files your fixes touched. Start from a clean tree so that's safe.
24
+ - **Never invent test coverage.** If the change has no browser-reachable surface, say so explicitly and name the suite that *is* the real gate. Do not add a hollow E2E test to look thorough.
25
+ - **A green CI badge is not proof.** Many repos split their required check from the full suite (browser-free half only, etc.). Find out what the required check actually runs.
26
+
27
+ ## Instructions
28
+
29
+ ### 1. Establish the ground truth
30
+
31
+ ```bash
32
+ gh pr view <PR> --json number,title,body,state,isDraft,headRefName,baseRefName,mergeable,mergeStateStatus,labels,reviewDecision,statusCheckRollup,url
33
+ ```
34
+
35
+ Record four things before touching code:
36
+
37
+ - **`mergeable`** — `CONFLICTING` means step 2 is mandatory.
38
+ - **Which checks are failing**, and for each, whether it is *required*. Check branch protection (`gh api repos/{owner}/{repo}/branches/<base>/protection`) rather than assuming — a red optional job (a flaky bot-review runner, a nightly) is not a blocker, and burning the run waiting on one is a classic waste.
39
+ - **Whether the repo auto-merges.** Look for a shepherd/automerge workflow in `.github/workflows/` and read its *gating conditions* (required labels, required checks). If pushing could trigger an immediate merge, decide deliberately: either satisfy the review sweep first, or tell the user before you push. Never let an auto-merge race a review you were asked to complete.
40
+ - **Whether a bot review actually ran.** A `SUCCESS` status from a review bot can still mean "rate-limited, never reviewed" — read its comment body, not just the check state.
41
+
42
+ ### 2. Rebase onto the base branch
43
+
44
+ Require a clean tree first (`git status --porcelain` empty), then:
45
+
46
+ ```bash
47
+ git fetch origin <base>
48
+ git rebase origin/<base>
49
+ ```
50
+
51
+ Resolve conflicts by **understanding both sides**, not by picking one. Read the base-side commit that introduced the conflicting hunk (`git log -1 --format=%s <base> -- <file>`, then the diff) — a conflict usually means main changed an invariant your branch is unaware of, and blindly keeping "your" side silently reverts it. State in the PR comment which invariant you preserved and why.
52
+
53
+ After resolving, re-run the tests before continuing — a rebase that compiles is not a rebase that works.
54
+
55
+ ### 3. Sweep every review source
56
+
57
+ Collect findings from all of these; do not stop at the first:
58
+
59
+ ```bash
60
+ # inline review threads (all bots + humans), with resolution state
61
+ gh api repos/{owner}/{repo}/pulls/<PR>/comments --paginate
62
+ # rollup issue comments (where CodeRabbit/Qodo post summaries and rate-limit notices)
63
+ gh api repos/{owner}/{repo}/issues/<PR>/comments --paginate
64
+ # formal reviews
65
+ gh pr view <PR> --json reviews
66
+ ```
67
+
68
+ **Delegate to the dedicated loop skill when one exists** rather than reimplementing its bot's protocol — `qodoloop` for Qodo, `coderabbitloop` for CodeRabbit, `greploop` for Greptile. Each already encodes that bot's posting shape, its ready-made per-finding fix prompt, and its real terminal states. Use this skill's own sweep for human comments and for bots without a dedicated loop.
69
+
70
+ Triage every finding into exactly one bucket:
71
+
72
+ | Bucket | Action |
73
+ |---|---|
74
+ | **Real defect** | Fix it. This is the point of the exercise. |
75
+ | **Legitimate improvement** | Fix it if it's in scope for this PR. |
76
+ | **False positive** | Reply explaining *specifically* why the bot is wrong. Do not resolve silently. |
77
+ | **Needs a human call** | Reply, leave open, surface in the final report. |
78
+
79
+ Bot findings are suggestions from something that has not run the code. A "🐞 Bug" label is a hypothesis — verify it against the actual source before fixing, and against the actual behavior before dismissing.
80
+
81
+ ### 4. Close the coverage gap
82
+
83
+ Ask, for the change as a whole, what would catch a regression here — then check whether the PR actually has it.
84
+
85
+ - **Unit / integration tests:** does every new branch have a test that fails if you invert it? Bots frequently and correctly flag helper functions exercised only *indirectly* through a caller. A direct test per branch is cheap and is usually the right response.
86
+ - **Browser / E2E tests:** determine whether the repo supports them (`playwright.config.*`, `cypress.config.*`, a `test:e2e` script) **and** whether this change has any surface they can reach. Then do one of exactly two things:
87
+ - it has a reachable surface → add or extend the E2E spec;
88
+ - it does not → **say so explicitly in the PR comment**, name why (e.g. "this is entirely inside a Durable Object alarm loop; the E2E harness only serves static assets"), and name the suite that is the real gate.
89
+
90
+ Silence here reads as an oversight. An explicit "not applicable, because X" reads as diligence — and is checkable.
91
+
92
+ ### 5. Run the real gates
93
+
94
+ Discover them from the repo (`Makefile`, `package.json` scripts, CI workflow) — do not guess target names. Run, at minimum, the equivalents of:
95
+
96
+ ```bash
97
+ <lint> # e.g. make lint / npm run lint
98
+ <format> # check mode first; only write if it reports drift
99
+ <tests> # the suite covering the changed package
100
+ ```
101
+
102
+ Capture exit codes, not just output. Repo-specific traps worth checking for before you burn a cycle: linters whose cache replays findings from deleted sibling worktrees, formatters whose local toolchain version outruns CI's (churning unrelated files), and test runners that hang when two runs overlap.
103
+
104
+ If a gate fails, fix it. Do not push red.
105
+
106
+ ### 6. Push and explain
107
+
108
+ Stage only the files you touched, commit, and push (`--force-with-lease` after a rebase — never bare `--force`).
109
+
110
+ Then post **one** PR comment that a reviewer can audit without re-reading the diff:
111
+
112
+ - what the rebase conflict was and which side won, with the reason;
113
+ - each finding, and what you did about it (including the ones you rejected, with the argument);
114
+ - the coverage decision from step 4, including the explicit not-applicable if that's the answer;
115
+ - **verbatim** gate output — real numbers (`# pass 480 / # fail 0`, `0 issues.`), not adjectives.
116
+
117
+ Re-trigger any bot that never actually reviewed (e.g. `@coderabbitai review`) so the PR gets the pass it was owed.
118
+
119
+ ### 7. Verify and report
120
+
121
+ Re-read the PR state after the push — confirm `mergeable` flipped, checks went green, and clear now-stale labels (`needs-rebase`, etc.). Poll re-triggered bots for their new pass and handle anything it raises.
122
+
123
+ ```text
124
+ PR #965 finalized.
125
+ Rebase: 1 conflict resolved (kept main's #834 D1-first ordering)
126
+ Findings: 2 addressed, 0 rejected, 0 blocked
127
+ Coverage: +5 unit tests; E2E not applicable (no browser surface) — stated on the PR
128
+ Gates: tests 480/480, lint 0 issues, format clean
129
+ State: MERGEABLE, checks green
130
+ Needs human: none
131
+ ```
132
+
133
+ If anything is left, say precisely what and why — an honest "blocked on X" is the deliverable when X is genuinely a human call.
134
+
135
+ ## Related skills
136
+
137
+ - `qodoloop` — full Qodo thread protocol (per-finding Agent Prompts, resolve mutations).
138
+ - `coderabbitloop` — full CodeRabbit protocol.
139
+ - `greploop` — drives a PR to a 5/5 Greptile confidence score.
140
+ - `ci-fix-loop` — when the blocker is a failing pipeline rather than review feedback.