Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

pr-fix

/pr-fix

Doprowadza PR w ShieldBattery do zielonego stanu: czyta CI, odróżnia regresje od znanych flaków, weryfikuje uwagi z review w kodzie, wypycha poprawki i zamyka rozwiązane wątki.

Repozytorium
ShieldBattery ↗
Licencja
MIT
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Doprowadza PR w ShieldBattery do zielonego stanu: czyta CI, odróżnia regresje od znanych flaków, weryfikuje uwagi z review w kodzie, wypycha poprawki i zamyka rozwiązane wątki.

Wyzwalacze z opisu

s head commit, tell a real regression from this repo
Oryginalny opis (EN)

Bring a ShieldBattery PR to green and work through its review (`/pr-fix`, `/pr-fix N`) - read CI for the PR's head commit, tell a real regression from this repo's known flakes and rerun the flakes, verify every review claim against the code before changing anything, push fixes, then resolve the threads and minimize the comments that were addressed. Never posts replies or comments as the user. Use when asked to fix CI, address review, check on a PR, or after the implement skill has pushed one.

Jak działa

  1. Rules
  2. Steps
Sekcje z nagłówków SKILL.md, w oryginale · 140 linii, 1 181 słów
Podgląd SKILL.md
---
name: pr-fix
description: Bring a ShieldBattery PR to green and work through its review (`/pr-fix`, `/pr-fix N`) - read CI for the PR's head commit, tell a real regression from this repo's known flakes and rerun the flakes, verify every review claim against the code before changing anything, push fixes, then resolve the threads and minimize the comments that were addressed. Never posts replies or comments as the user. Use when asked to fix CI, address review, check on a PR, or after the implement skill has pushed one.
---

# Fixing up a PR

## Rules

- **Never write to the PR conversation as the user.** No replies, comments or reviews. Resolving a
  thread and minimizing a comment are the only writes. Disagreement with feedback goes in chat.
- **Verify before acting.** A reviewer, human or `claude[bot]`, can be wrong about the code. Check
  the claim in the tree before changing anything; a claim that doesn't hold is reported, not fixed.
- **Flakes get reruns, regressions get fixes.** Never both for the same failure.
- **Ordinary commits.** Fixes are new commits on the PR branch in the repo's message style. No
  amend or force-push except when rebasing onto the base to clear merge conflicts (step 1) or
  rebasing a stacked child (step 4).

## Steps

### 1. Find the PR

```bash
gh pr view [N] --json number,headRefName,baseRefName,headRefOid,isDraft,url,mergeable,mergeStateStatus
git checkout <headRefName> && git pull --ff-only
```

If `mergeable` is `CONFLICTING` (`mergeStateStatus: DIRTY`), resolve that before reading CI:
GitHub can't build a merge ref for a conflicting PR, so the `pull_request` runs never start and
the `push` runs alone can look fully green. Rebase onto the base branch (never merge it in),
resolve each stop, run the local gates from step 2 for the conflicted areas, and push with
`--force-with-lease`. Conflicts in `__snapshots__/` files are regenerated, not hand-merged: take
either side, rerun that test with `-u`, and `git add` the result. `UNKNOWN` means GitHub is still
computing it; query again.

Without a number, the PR is the current branch's. If there is none, ask which PR; don't guess from
`gh pr list`.

### 2. Read CI

```bash
gh pr checks N                                   # one line per job, with run links
gh run view <run-id> --json event,headSha,conclusion
gh run view <run-id> --log-failed | tail -80
```

What runs, and when:

| Workflow           | Jobs                                                                                                               | Runs on                                                                  |
| ------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| JS CI              | `unit-tests`: vitest, typecheck, lint, circular-deps, translation catalogs, email templates, graphql codegen check | every `push` and `pull_request`                                          |
|                    | `integration-tests`: docker compose stack + Playwright                                                             |                                                                          |
| Game CI            | clippy (x86, x64), rustfmt, cargo test (x86, x64)                                                                  | `game/**`                                                                |
| server-rs CI       | clippy, rustfmt, cargo test + `gen-schema` check, typeshare check, `sqlx prepare` check                            | `server-rs/**`, `migrations/**`, `schema.graphql`, `common/typeshare.ts` |
| Claude Code Review | `claude-review`: posts a review from `claude[bot]`                                                                 | PR opened, synchronize, reopened, ready for review                       |

Reading the results:

- Every commit gets two runs of each workflow, one `push` and one `pull_request`. Both report the
  branch's head SHA, but `push` builds the branch tip and `pull_request` builds the branch merged
  into master. A split result on the same SHA is a flake only when the branch is up to date with
  master (`git fetch origin && git log --oneline HEAD..origin/master` prints nothing). Otherwise
  the two runs built different code: a `pull_request`-only failure means the branch breaks once
  merged, so rebase onto master, reproduce locally, and fix it as a regression; a `push`-only
  failure means master already carries the fix, and the rebase clears it.
- All workflows cancel in-progress runs on a new push, so a pending rerun on the previous SHA ends
  as `cancelled`. That is not a failure.
- `claude` (the mention-triggered workflow) shows as `skipping` on every PR. Normal.

Known flakes, both in `integration-tests`. Rerun with `gh run rerun <run-id> --failed`:

- Step "Running Docker containers": `service "migration" didn't complete successfully: exit 1`. The
  migration container connected before postgres was ready to serve queries.
- Signup spec: `apiRequestContext.get: socket hang up` on `http://localhost:5528/sent/...`. The fake
  mailgun sidecar dropped a connection.

Anything else is a regression until proven otherwise: read the failed log, reproduce with the local
equivalent, fix.

```bash
pnpm test && pnpm run typecheck && pnpm run lint && pnpm run check-circular
pnpm gen-translations:app --fail-on-update && pnpm gen-translations:email --fail-on-update
pnpm gen-emails && pnpm gen-graphql && git status --short     # generated files must be clean
(cd server-rs && cargo clippy --all-targets --workspace -- -D warnings && cargo fmt --all -- --check)
(cd game && cargo clippy --all-targets --workspace -- -D warnings && cargo fmt --all -- --check)
pnpm sqlx-prepare && git status --short server-rs/.sqlx
```

### 3. Read the review

Three sources; the top-level one is the one that gets missed:

```bash
# inline threads, with ids and resolved state
gh api graphql -f query='{ repository(owner:"ShieldBattery", name:"ShieldBattery") { pullRequest(number:N) { reviewThreads(first:100) { nodes { id isResolved isOutdated path line comments(first:10) { nodes { databaseId author { login } body } } } } } } }'
# top-level comments (node_id is what minimizeComment takes)
gh api repos/ShieldBattery/ShieldBattery/issues/N/comments --paginate --jq '.[] | {node_id, user: .user.login, created_at, body}'
# review bodies
gh pr view N --json reviews --jq '.reviews[] | {author: .author.login, state, body}'
```

Unaddressed feedback is every unresolved thread plus every top-level comment or review body that
isn't minimized. For each item, check the claim before touching code:

- "X doesn't exist", "X is unused", "the repo already does Y": grep for it.
- Formatting claims: `pnpm exec oxfmt --check <file>`. Character counts in a comment are not
  evidence.
- A thread from an earlier round may describe code that a later commit already changed: GitHub
  re-anchors unresolved comments to the new head. Compare against the commit the comment was written
  on before treating it as open.
- Suggestion blocks can be malformed. Apply the idea by hand, then `pnpm run lint:fix`.

`claude[bot]` reviews again on every push, so the loop only continues while you keep pushing. Batch
fixes into one push. When a round contradicts an earlier round, settle on the better design once,
say why in chat, and resolve both threads rather than flipping the code back and forth.

### 4. Fix and push

Commit on the PR branch; run the local gates from step 2 for what you touched. On a stacked PR,
fix at the tip when the change is local to it. A fix that belongs to a parent branch goes on the
parent, then each child is rebased onto its parent's new tip
(`git rebase --onto <parent-tip> <old-parent-tip>`) and pushed with `--force-with-lease`; never
merge the parent into the child.

After pushing, wait for the new runs (`gh pr checks N --watch`) and repeat step 2 until green or
blocked on something only the user can decide. Before calling it green, re-check `mergeable`:
master can move while you work.

### 5. Bookkeeping

```bash
gh api graphql -f query='mutation { resolveReviewThread(input:{threadId:"PRRT_..."}) { thread { isResolved } } }'
gh api graphql -f query='mutation { minimizeComment(input:{subjectId:"IC_...", classifier:RESOLVED}) { minimizedComment { isMinimized } } }'
```

Resolve a thread only once its fix is pushed. Leave open anything you disagreed with and anything
that asks the user a question. Minimize a top-level comment once every point in it is handled.

### 6. Report

In chat: mergeability (and any conflicts resolved), CI per job, naming which failures were flakes rerun and which were regressions fixed; each
feedback item with how it was addressed or why it was skipped; what was resolved or minimized; and
what is still open, with the reason.

Wersje

RepozytoriumWynikLicencja
Ta strona · ShieldBattery/ShieldBattery100MIT
GDriem/agent-skills100MIT
whoismdy/Code-review-ai-skills100MIT
smirnov-labs/claude-skills100MIT
contextgo/contextgo100Apache-2.0

Migawka bazy z 13.11.2026 · wersja paczki e378019e89b3 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100address-pr-review
    Sprawdza uwagi recenzentów PR względem gałęzi bazowej i opisu, a po wyraźnej zgodzie człowieka wprowadza poprawki, wysyła je i oznacza wątki jako rozwiązane.
  • 100review-fix
    Naprawia komentarze w bieżącym PR: od recenzentów, Greptile i czerwone CI, klasyfikuje uwagi, wypycha poprawki i zamyka wątki.
  • 100branchdiff-resolve
    Czyta otwarte komentarze z przeglądu kodu z branchdiff i rozwiązuje je poprawkami w kodzie: naprawia uwagi, zamyka wątki i obsługuje ustalenia recenzenta.
  • 100v1-address-review
    Rozwiązuje istniejące komentarze i wątki w przeglądzie PR, gdy użytkownik prosi o poprawki z recenzji albo o zamknięcie wątków.
  • 100flow-next-resolve-pr
    Rozwiązuje uwagi z przeglądu PR: pobiera nierozwiązane wątki, sortuje je, poprawia kod, odpowiada i zamyka wątki przez GraphQL.
  • 100fix-pr
    Czyta wszystkie nierozwiązane komentarze i wątki w przeglądzie zmiany (PR lub MR) oraz nieudane testy CI, wdraża poprawki, wypycha je i odpowiada w każdym wątku.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.