本文へ移動
cccskills
無料GitHub で公開

finish-pr

Complete the post-submit PR loop: wait for CI and Cursor Bugbot on the latest pushed revision, triage and fix actionable findings, amend and resubmit, and repeat until clean. MUST be used after creating or updating a PR before declaring implementation work complete.

日本語の概要は準備中です。原文の説明を表示しています。

ayunis-core/ayunis-coreスター 34(GitHub 34 + cccskills 0)
連携ツールGitHub

実行スコア 未検証

インストール方法を見る

含まれるファイル(2)

  • SKILL.md8.5 KB
  • agents/openai.yaml204 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Finish PR

Treat PR submission as the start of verification, not the end of the task. Keep ownership of the PR until its latest submitted revision is green and Bugbot-clean.

1. Resolve the submitted PRs

Load git-workflow and follow its Graphite safety rules throughout this workflow.

Identify every PR whose branch was created or updated by the submission. For a Graphite stack, include every submitted PR in the stack, not only the current or top PR. Record each PR number, URL, branch, and remote head SHA:

gh pr view <branch-or-number> --json number,url,headRefName,headRefOid

Use the remote headRefOid as the revision under verification. If the remote head changes while waiting, discard the stale result and restart verification for the new SHA.

2. Wait for CI and Bugbot

Wait for all checks on every submitted PR. For an ordinary PR:

gh pr checks <pr-number> --watch --interval 30

Graphite downstack sentinel — do not use --watch

On a stacked PR, Graphite deliberately keeps Graphite / mergeability_check in progress until every downstack PR merges. gh pr checks --watch waits for that sentinel forever even after all real verification has passed.

Before watching a stacked PR, inspect the check run on the recorded head SHA:

gh api repos/{owner}/{repo}/commits/<head-sha>/check-runs \
  --jq '.check_runs[] | select(.name == "Graphite / mergeability_check") |
    {status, conclusion, title: .output.title, summary: .output.summary}'

Treat it as an intentional pending sentinel only when its current-SHA output explicitly says that it will pass when downstack PRs merge (and names the downstack dependency). Do not ignore the check merely because its name contains Graphite; any other output or a failed conclusion requires investigation.

When the sentinel is confirmed, do not run gh pr checks --watch for that PR. Poll the JSON state instead and evaluate every check except that exact sentinel:

gh pr checks <pr-number> --json name,bucket,state,link

Continue while any non-sentinel check is pending; handle any non-sentinel failure or cancellation normally. Once all non-sentinel checks have passed or intentionally skipped, record the sentinel and its downstack PR in the verification report and continue to Bugbot comment triage. The sentinel is expected stack state, not a blocker and not evidence that CI is still running.

If no checks are visible immediately after submission, wait 30 seconds and query again. Do not interpret absent checks as success.

Zero runs created — check the platform before the repo

If no workflow runs exist at all for the new head SHA after a couple of minutes, the cause is far more often platform-side than repo-side. Check that first, before diagnosing workflow triggers, branch filters, or re-pushing:

curl -s https://www.githubstatus.com/api/v2/summary.json \
  | jq '.components[] | select(.name == "Actions") | {name, status}'
gh run list --limit 10   # repo-wide: are other branches stuck too?

If Actions reports degraded_performance or major_outage, stop diagnosing the PR — go to the outage rule below. Runs that GitHub never created during an incident do not appear later on their own; they need a re-trigger after recovery.

2b. External platform outage — report blocked, do not camp on it

A confirmed platform incident is an external condition, which §5 already classifies as blocked. Blocked means hand back, not poll harder.

  • Do not sit in escalating in-session sleep loops, background watchers, or self-scheduled wake-ups waiting for a provider to recover. Sessions have burned 2–6 hours this way, across multiple PRs on the same day, while the answer was always "GitHub is down."

  • Within ~1 hour of confirming the incident, report the PR as blocked with the incident status and the exact SHA awaiting verification, and stop. Let the user decide whether to wait.

  • Never push a no-op or empty commit to force a synchronize event. It pollutes the branch history with meaningless SHAs and discards any Bugbot pass already earned on the real head.

  • After recovery, re-trigger with a same-SHA method so existing check results stay valid:

    gh pr close <pr-number> && gh pr reopen <pr-number>   # same SHA, re-fires triggers
    

    Do this once, and say in the report that you did it — closing and reopening is a visible mutation of PR state, not a silent recovery step. If it does not produce runs, report blocked rather than repeating it.

The same applies to any external provider the loop depends on (Bugbot, the registry, Linear). Verify the incident is real before invoking this rule — a single failed check is not an outage.

After the watch completes, inspect the final state explicitly:

gh pr checks <pr-number> --json name,bucket,state,link

Treat pending, fail, and cancel buckets as unfinished. A skipped check is acceptable only when the workflow intentionally skipped it; mention that in the final report.

Do not trust Cursor Bugbot's check conclusion by itself. A successful Bugbot check can still leave review comments.

3. Address CI failures

For each failing or cancelled check:

  1. Read the check details, annotations, and failed GitHub Actions logs. Use gh run view <run-id> --log-failed for Actions failures.
  2. Classify the failure before changing code:
    • PR-caused and actionable: fix it in the existing PR.
    • Flaky or cancelled: rerun it once, then wait for the rerun.
    • Infrastructure failure or demonstrably failing on the base revision: gather evidence and report the PR as blocked; do not broaden the PR silently.
  3. Run the relevant local validation for any code change.
  4. Amend and resubmit with the process in git-workflow.

After any resubmission, refresh every affected PR's remote head SHA and restart the full CI and Bugbot loop. Results from the previous SHA no longer count.

4. Address Bugbot findings

Load bugbot-triage and use its paginated comment fetching, full-stack scan, root-cause tracing, and verdicts. Do not recreate a shallower Bugbot review here.

The implementation request that produced the PR authorizes fixes for actionable CI and Bugbot findings that stay within the PR's scope:

  • Valid and simple: implement the direct root-cause fix.
  • Valid but symptom: implement the structural fix recommended by the triage, unless that would materially expand the requested scope; if it would, stop and explain the decision needed.
  • Invalid: record the evidence, reply when useful, and resolve the thread if permitted.

For valid findings, amend the existing PR rather than creating a separate fix PR. Resolve addressed threads when permitted. Resubmit and restart verification on the new head SHA.

5. Completion gate

Do not declare the task complete until all of these are true for every submitted PR:

  • The recorded remote head SHA is still the PR's current head.
  • Every CI check has completed successfully or was intentionally skipped with a documented reason; a current-SHA Graphite downstack sentinel verified as described in §2 is also acceptable and must be documented.
  • Cursor Bugbot completed on the current head.
  • All Bugbot comments across the submitted stack were triaged and no actionable finding remains.
  • The local worktree is clean and the submitted branches contain every fix.

A polling timeout is not success. Report blocked, never done, when authentication, infrastructure, or another external condition prevents verification.

"Keep waiting" applies to checks that are running — queued jobs, a slow test suite, a Bugbot pass in flight. It does not license open-ended polling when nothing is running because the platform is down: that is the blocked case, and §2b governs it. If you have polled the same unchanged external condition more than a few times, you are no longer verifying — report and hand back.

If the same CI failure or Bugbot finding survives three fix attempts, stop and escalate with the attempts and evidence. New findings on successive revisions are progress and restart the count for those findings.

Report

Report the PR URLs and concise evidence for CI and Bugbot status. Mention fixes made during the loop. If blocked, name the exact unfinished check or finding and the evidence that prevents further progress.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Query Ayunis deployed-environment telemetry in AppSignal — incidents, occurrence counts and error traces via the `appsignal-cli` binary; structured log attributes (user.id, org.id, nestjs.context, custom metadata) via the v2 logs API. Use when investigating a production/staging incident or log data — NOT for local dev logs (see backend-debugging).

日本語の概要は準備中です。原文の説明を表示しています。

ayunis-core/ayunis-core342026年10月26日 更新

Ayunis Core backend specifics — module boundaries, key files, and project conventions. Complements the nestjs-hexagonal-backend skill.

日本語の概要は準備中です。原文の説明を表示しています。

ayunis-core/ayunis-core342026年10月26日 更新

Frontend development in ayunis-core. Use when creating, modifying, or debugging frontend code (React, Feature-Sliced Design, API client).

日本語の概要は準備中です。原文の説明を表示しています。

ayunis-core/ayunis-core342026年10月26日 更新

Debug backend runtime errors (500s, crashes, unexpected behavior). Use when something is broken at runtime — not for writing new code.

日本語の概要は準備中です。原文の説明を表示しています。

ayunis-core/ayunis-core342026年10月26日 更新

Shared test fixtures for backend specs — port mock factories, domain builders, and shared IDs in a per-module testing/ folder. Use when a module's *.use-case.spec.ts files repeat the same mock-repository literal, inline entity construction, or hardcoded UUIDs across files.

日本語の概要は準備中です。原文の説明を表示しています。

ayunis-core/ayunis-core342026年10月26日 更新

Analyze Cursor Bugbot PR comments through a root-cause lens: is the finding valid, and is the suggested fix the real fix or a bandaid over a deeper problem? Use when the user asks to check, assess, or triage bugbot comments.

日本語の概要は準備中です。原文の説明を表示しています。

ayunis-core/ayunis-core342026年10月26日 更新

ayunis-core のスキルをすべて見る

このスキルの問題を報告する