Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

merge

/merge

Scala bieżący pull request po osiągnięciu stanu gotowości w pętli babysit, po jednorazowym potwierdzeniu użytkownika i przeglądzie.

Repozytorium
mazarbul ↗
Licencja
Apache-2.0
Ostatnia zmiana repozytorium
31.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
0
Przestarzałość

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

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Scala bieżący pull request po osiągnięciu stanu gotowości w pętli babysit, po jednorazowym potwierdzeniu użytkownika i przeglądzie.

Wyzwalacze z opisu

merge itmerge this PRgo ahead and merge

Argumenty

/merge [PR-number]
Oryginalny opis (EN)

Merges the current PR after the babysit loop reaches merge_ready. USE ONLY WHEN user explicitly says 'merge it' / 'merge this PR' / 'go ahead and merge' AFTER reviewing the PR. Refuses unless babysit-state.phase == merge_ready. Confirms once, then runs gh pr merge --squash (no --admin). Schedules post-merge deploy watch. NOT FOR auto-merge from any other skill or hook.

Jak działa

  1. Steps
  2. Gotchas
Sekcje z nagłówków SKILL.md, w oryginale · 99 linii, 422 słów
Podgląd SKILL.md
---
name: merge
description: Merges the current PR after the babysit loop reaches merge_ready. USE ONLY WHEN user explicitly says 'merge it' / 'merge this PR' / 'go ahead and merge' AFTER reviewing the PR. Refuses unless babysit-state.phase == merge_ready. Confirms once, then runs gh pr merge --squash (no --admin). Schedules post-merge deploy watch. NOT FOR auto-merge from any other skill or hook.
allowed-tools: Bash, Read, Write, Skill, CronCreate, PushNotification
disable-model-invocation: true
argument-hint: [PR-number]
---

The ONLY skill in this project that runs `gh pr merge`. Hard-gated: requires babysit state to be at `merge_ready` AND explicit user confirmation in the most recent user message.

## Steps

**1. Resolve PR + verify state**

```bash
PR="${ARGUMENTS:-$(gh pr view --json number -q .number)}"
STATE=".claude/babysit-state-${PR}.json"

if [ ! -f "$STATE" ]; then
  echo "REFUSED: no babysit state for PR #$PR. /merge requires a prior /babysit-pr run that reached merge_ready."
  exit 1
fi

PHASE=$(jq -r '.phase' "$STATE")
if [ "$PHASE" != "merge_ready" ]; then
  echo "REFUSED: PR #$PR is in phase '$PHASE', not merge_ready."
  echo "Run /babysit-tick manually to refresh state, or wait for the next Cron tick."
  exit 1
fi
```

**2. Confirm destructive action**

Pass the last user message to the guard:

```bash
.claude/scripts/guard-destructive.sh merge "$LAST_USER_MESSAGE"
```

(In Claude, that means: read your most recent user turn. Pass its text as arg 2. If `guard-destructive.sh` returns non-zero, abort and print its stderr message.)

**3. Merge**

```bash
gh pr merge $PR --squash --delete-branch
```

- **Never `--admin`** , that bypasses branch protection.
- **Never `--rebase`** , squash is the project default.
- `--delete-branch` is fine; the babysit state still has the audit log.

**4. Schedule post-merge deploy watch**

Capture the merged commit SHA:

```bash
MERGED_SHA=$(gh pr view $PR --json mergeCommit --jq .mergeCommit.oid)
```

Update state:

```bash
source .claude/scripts/babysit-state.sh "$PR"
set_field merged_sha "$MERGED_SHA"
set_phase post_merge_watch
reset_iter post_merge_iter
log_audit "merged" "sha=$MERGED_SHA"
```

Schedule a fresh Cron (the previous one was deleted at `merge_ready`):

Invoke `CronCreate` with:
- `expression`: `*/4 * * * *`
- `durable`: `true`
- `prompt`: `Run /babysit-tick for PR #$PR`
- `description`: `babysit deploy for PR #$PR`

The new job's ID is a different value from the pre-merge `cron_job_id`
(already deleted). Persist it under a distinct key so `/babysit-abort`
and the `post_merge_watch` exit branch can find it:

```bash
# After CronCreate returns the new job id:
set_field post_merge_cron_job_id "$NEW_CRON_ID"
log_audit "post_merge_cron_scheduled" "id=$NEW_CRON_ID"
```

**5. Notify**

PushNotification (proactive): "PR #$PR merged. Watching deploy actions. Notifications on success/failure."

**6. Report**

Print:
- Merge SHA
- Deploy watch state file
- `/babysit-abort $PR` to stop the deploy watch early

---

## Gotchas

- Merge is irreversible (squash discards branch history). Refuse and ask if uncertain.
- The post-merge Cron is a *different* job from the pre-merge one. Persist its ID under `post_merge_cron_job_id`; the `post_merge_watch` branch in `/babysit-tick` reads that key first and falls back to `cron_job_id` only for legacy state files.
- If branch protection requires extra approvals or status checks, `gh pr merge` will fail. Read the error; don't bypass with `--admin`.

Wersje

RepozytoriumWynikLicencja
Ta strona · mo-cmyk/mazarbul100Apache-2.0
dkarter/dotfiles100MIT
ek33450505/claude-agent-team100MIT
remotion-dev/remotion100MIT
mnabaci/Roastpilot100GPL-3.0
alirezarezvani/claude-skills100MIT
rhiza-research/weather-skills100MIT
yuvasee/samocode100MIT
camronh/EZVals100MIT

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

Pobrania w ostatnich 30 dniach: 2 · ranking

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

Podobne skille

  • 100babysit-pr
    Monitoruje pull request do gotowości do scalenia: sprawdza status CI, przegląda komentarze do PR i automatycznie naprawia problemy.
  • 100pr-babysit
    Monitoruje pull request przez CI, recenzje i scalenie, by doprowadzić go do stanu zielonego lub gotowego do scalenia.
  • 95t3-babysit-pr
    Monitoruje pull request podczas przeglądu i CI, aż do zakończenia.
  • 90babysit
    Pilnuje otwartego MR lub PR w drodze do scalenia: konflikty, wątki recenzji, wyniki CI i gotowość zmiany.
  • 100merge-pr
    Scala gotowy pull request: sprawdza CI i recenzje, synchronizuje z gałęzią bazową, potwierdza z użytkownikiem, robi squash merge i sprząta, bez wdrażania na środowiska.
  • 100babysit-pr
    Monitoruje pull request w trakcie przeglądu i CI, gdy użytkownik prosi o obserwowanie PR.

Uwagi i zgłoszenia

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