merge-queue

Serialize agent branch merges into protected master with atomic locking.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/jacob-balslev/skill-graph --skill merge-queue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-queue
Source: https://github.com/jacob-balslev/skill-graph/tree/main/marketplace/skills/merge-queue
Command: npx skills add https://github.com/jacob-balslev/skill-graph --skill merge-queue

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill prevents race-condition failures and history pollution when multiple agent branches try to merge into main at the same time, especially when their changes overlap.

Core Features & Use Cases

  • Atomic lock for serialized commits: Acquires a shared merge lock so only one agent can merge at a time.
  • Idempotency and resume-safety: Ensures failed or partially completed merges can be resumed without duplicating commits.
  • Non-fast-forward merge policy: Uses --no-ff to preserve task-level history and make merges auditable.
  • Automated worktree/branch cleanup: Deletes task worktrees and remote branches after successful merges to prevent disk bloat.
  • Event emission for orchestration: Emits merge start/completion events for downstream monitoring.

Quick Start

Use the merge queue CLI to submit a task branch SH-XXXX for a serialized non-fast-forward merge into master.

Frequently Asked Questions about merge-queue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent concurrent git merge failures when multiple agent branches target master?

Concurrent git merge failures are prevented by acquiring an atomic lock that serializes agent branch merges into a protected master, ensuring only one merge executes at a time. This shared lock stops race conditions and overwrites when multiple branches merge simultaneously.

What is a non-fast-forward merge policy and why use it for multi-agent workflows?

A non-fast-forward merge policy uses the `--no-ff` git flag to always create a merge commit, preserving task-level history. In multi-agent workflows, this makes merges auditable by clearly distinguishing which agent branch introduced specific changes into master.

Can I resume a partially completed git merge without duplicating commits?

Yes, you can resume partially completed merges safely using idempotency checks. This ensures that failed or interrupted merge processes can be retried without duplicating commits or corrupting the branch history in the protected master repository.

How do I automate worktree and branch cleanup after a successful merge?

Automated worktree and branch cleanup deletes task worktrees and remote branches after a successful merge completes. This prevents disk bloat and removes obsolete agent branches once their changes have been serialized and merged into the protected master.

What's the best way to serialize overlapping git branch merges safely?

The best way to serialize overlapping branch merges is by using a merge queue that enforces atomic locking and sequential processing. This prevents hidden conflicts and race-condition failures when multiple agents attempt to merge changes simultaneously.