Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ops-merge

БесплатноБез исполняемых скриптовНе проверен

Autonomous PR merge pipeline. Scans all repos for open PRs, dispatches subagents to fix CI, resolve conflicts, address review comments, then merges. Use…

davepoonот davepoon★ 3 815 звёзд на GitHub

Об этом скилле

Runtime Context

Before executing, load:

  1. Preferences: cat ${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/preferences.json — read owner, timezone, project registry
  2. Daemon health: cat ${CLAUDE_PLUGIN_DATA_DIR}/daemon-health.json — if action_needed set, surface to user
  3. Secrets: GitHub token: env $GITHUB_TOKEN → Doppler MCP (mcp__doppler__*) → doppler secrets get GITHUB_TOKEN --plain → password manager

OPS ► MERGE

CLI/API Reference

gh CLI (GitHub)

Command Usage Output
gh pr list --repo <owner/repo> --json number,title,state,headRefName,statusCheckRollup,reviewDecision,mergeable,isDraft List PRs with status JSON array
gh pr view <n> --repo <repo> --json title,body,state,mergeable,reviews PR details JSON
gh pr checks <n> --repo <repo> CI check status Check list
gh pr merge <n> --repo <repo> --squash --admin Squash merge PR Merge result
gh pr create --repo <repo> --title "<t>" --body "<b>" --base dev Create PR PR URL
gh run list --repo <repo> --limit 5 --json conclusion,name,headBranch CI runs JSON array
gh run view <id> --repo <repo> --log-failed Failed CI logs Log output
gh run watch <run-id> --repo <repo> Stream CI run Live output (use with Monitor)
gh api repos/<repo>/pulls/<n>/comments --jq '.[].body' PR review comments Comment text

Agent Teams support

If CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is set, use Agent Teams for fixer agents (Phase 3). This enables:

  • Steering fixers mid-flight if priorities change (e.g., a critical PR should be merged first)
  • Fixers can report blockers and you can redirect them without waiting for completion
  • Shared context: if fixer-A discovers a breaking change that affects fixer-B's PR, you can notify B

Team setup (only when flag is enabled, Phase 3):

TeamCreate("merge-fixers")
Agent(team_name="merge-fixers", name="fixer-[repo]", ...)

Use SendMessage(to="fixer-my-api", content="PR #2958 was just merged — rebase your branch") to coordinate.

If the flag is NOT set, fall back to standard parallel subagents with isolation: "worktree".

Pre-gathered PR data

${CLAUDE_PLUGIN_ROOT}/bin/ops-merge-scan 2>/dev/null || echo '{"prs":[],"error":"merge-scan failed"}'

Your task

You are the merge orchestrator. Your job is to get every open PR across the owner's repos merged — fixing whatever blocks them first.

Parse arguments

From $ARGUMENTS:

  • --main → after all PRs merge to dev, also sync dev↔main for repos that have both branches
  • --repo <slug> → scope to one repo only (e.g., --repo Lifecycle-Innovations-Limited/my-api)
  • --dry-run → report what would happen, don't dispatch agents or merge anything
  • --force → skip the confirmation prompt before merging
  • (empty) → process all repos, merge to dev only

Phase 1 — Classify the PR queue

Parse the pre-gathered JSON. For each PR, it's already classified as one of:

Classification Meaning Action
ready CI green, approved, no conflicts Merge immediately
needs-rebase mergeable: CONFLICTING Dispatch fixer: rebase on base branch
needs-ci-fix CI failures in statusCheckRollup Dispatch fixer: investigate logs, fix, push
needs-review-response reviewDecision: CHANGES_REQUESTED Dispatch fixer: resolve comments
blocked mergeStateStatus: BLOCKED (branch protection, required reviews) Note why, skip
draft isDraft: true Skip — not ready for merge

Print the queue:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 OPS ► MERGE — PR Queue
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

| Repo | PR | Title | Status | Action |
|------|----|-------|--------|--------|
| my-api | #2958 | fix(migration) | ready | merge |
| my-app | #4456 | feat(apple-04) | needs-ci-fix | dispatch fixer |
| ... | ... | ... | ... | ... |

Ready: N  |  Fix needed: N  |  Blocked: N  |  Draft: N
──────────────────────────────────────────────────────

If --dry-run, stop here. Print the queue and exit.

Phase 2 — Confirm and merge ready PRs

Unless --force was passed, use AskUserQuestion to confirm before merging:

Ready to merge N PRs:
  [repo]#[number] — [title] → [base]
  [repo]#[number] — [title] → [base]

  [Merge all N no
Полный SKILL.md на GitHub

Установить ops-merge в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Read
Write
Edit
Grep
Glob
Agent
TaskCreate
TaskUpdate
TaskList
AskUserQuestion
TeamCreate
SendMessage
Monitor
WebSearch

FAQ

Что делает скилл ops-merge?

Autonomous PR merge pipeline. Scans all repos for open PRs, dispatches subagents to fix CI, resolve conflicts, address review comments, then merges. Use --main to also sync dev↔main branches.

Как установить скилл ops-merge?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ops-merge запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ops-merge с