claude-code-merge-queue

by funadorVerified

The local merge queue for parallel Claude Code agents

120
Stars
3
Forks
TypeScript
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/funador/claude-code-merge-queue

Getting Started

Guides for using skills like claude-code-merge-queue.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

Claude Code Merge Queue — the local, zero-cost merge queue for parallel Claude Code agents

npm version npm downloads CI License: MIT TypeScript Node Runtime deps

Claude Code Merge Queue 🚦

The local, zero-cost merge queue for parallel Claude Code agents. Several agents land, build, and test at the same time — this serializes it so push races, redundant heavy builds, and shared-resource test flakiness can't happen.

⚡ Quickstart

npm install --save-dev claude-code-merge-queue   # or: pnpm add -D / yarn add -D / bun add -d
npx claude-code-merge-queue init

Contents

Terminal demo: npm install --save-dev claude-code-merge-queue, then npx claude-code-merge-queue init — writes the config, CLAUDE.md, the WorktreeCreate hook, and land/sync/promote/preview scripts

⚙️ Configuration

Everything lives in one file — see examples/claude-code-merge-queue.config.mjs for every field with comments. The short version:

export default {
  branchPrefix: "lane/",               // lane/1, lane/2, ...
  worktreeSuffix: "-lane-",            // ../your-repo-lane-1
  portBase: 3000,                      // lane n gets portBase + n
  integrationBranch: "main",           // where agents land — see below
  productionBranch: null,              // set this for a two-stage model — see below
  protectedBranches: [],               // extra branches beyond the two above; most repos need none
  regenerableFiles: [],                // files a build tool rewrites — never block a rebase on these
  symlinks: [".env", ".env.local", "node_modules"],
  buildOutputDirs: ["dist", "build", ".next"], // preview never copies these onto your checkout
  checkCommand: "npm run check",       // what actually gates a landing — see below
  checksRequired: true,                // false = deliberately run with none; see below
};

A malformed config (empty branch names, a negative port, productionBranch equal to integrationBranch, ...) fails loud with every problem listed, the moment any command loads it — not a mysterious failure three steps later.

🆚 vs. GitHub's Merge Queue

GitHub Merge QueueClaude Code Merge Queue
Private repoEnterprise Cloud onlyAny plan, any repo
Cost per landingGitHub Actions minutes, every queue attempt$0 — runs on your own machine
RequiresA pull requestNothing — direct rebase + push

Same idea — serialize landings, test before merge, keep history clean — run locally instead of in someone else's billed cloud.

🧰 What's in the box

CommandWhat it does
claude-code-merge-queue hook worktree-createA Claude Code WorktreeCreate hook. Plugs Claude Code Merge Queue's numbered lanes into Claude's native worktree creation.
claude-code-merge-queue build-lock -- <cmd>Runs <cmd> — your build — serialized across every lane, machine-wide.
claude-code-merge-queue landRebases and pushes your lane onto the integration branch through a FIFO queue, so two lanes are never mid-push at once. Agents run this themselves.
claude-code-merge-queue syncFast-forwards your main checkout so a dev server actually sees what just landed — and re-installs dependencies if the lockfile changed.
claude-code-merge-queue promoteShips the integration branch to production. Human-only — never in an agent's instructions, never automated.
claude-code-merge-queue previewInstantly mirrors a lane's live working tree — uncommitted changes included — onto the main checkout, so you can look at it without a build.
claude-code-merge-queue portPrints a lane's dev-server port, derived from its own directory name.
claude-code-merge-queue pruneRemoves already-landed sibling lane worktrees on demand.

A pre-push hook makes land non-optional: a direct git push straight to the integration branch is rejected, with the actual command to run instead, and the same hook runs checkCommand before allowing a landing through — no checkCommand configured means every push fails by default. There's a way out for every block (see 🚨 The emergency hatch), but it takes naming the specific branch, not a generic flag.

📝 What init writes

  • claude-code-merge-queue.config.mjsintegrationBranch and checkCommand auto-detected.
  • CLAUDE.md (or appends to yours) — tells Claude Code to land its own work once green, without being asked.
  • .claude/settings.json — the WorktreeCreate hook wired in, without touching anything else already there.
  • .husky/pre-push — created or appended to, if you already have Husky. If you don't, init tells you rather than silently writing to the untracked .git/hooks/pre-push.
  • package.json scriptsland, sync, promote, preview, preview:restore, skipping any you've already defined yourself.
  • claude-code-merge-queue-preflight.mjs — a self-contained safety net that runs before land/sync, so a stale branch fails with a real diagnosis instead of a bare command not found.

🚨 The emergency hatch

Every blocked push — the integration branch, productionBranch, anything in protectedBranches — has a real way through it. One env var, no prompts, no second factor to remember:

CLAUDE_CODE_MERGE_QUEUE_EMERGENCY_PUSH=1 git push origin HEAD:main

This is a convention, not a hard guarantee: it stops mistakes and stray pushes, not an adversarial agent that sets the var itself.

🔍 Know the limits

  • No human reviews any of this before it lands. checkCommand passing is the only gate — a real test suite and echo ok look identical to this tool. Want a human on every change? This is missing that step on purpose.
  • Locks are crash-safe by PID liveness, not a timeout. kill -9 anything mid-claim and the next process notices the PID is dead and reclaims it — no stale locks, no timeout to tune.
  • One machine, not a fleet. The FIFO queue lives in local temp storage — two machines landing at once just get git's ordinary non-fast-forward rejection.
  • Not a security boundary. Every guardrail here stops mistakes and convention drift, not an adversarial agent — shell access always means git push --no-verify or editing the config on purpose.
  • A slow checkCommand is a real throughput ceiling. The FIFO lock holds for its entire duration — a 3–4 minute suite caps you well under 20 landings/hour.
  • Rebase conflicts abort, they never guess. git rebase --abort on any conflict, working tree left clean — CLAUDE.md tells the agent to resolve it and re-run land.

📄 License

MIT. Fork it, rename it, argue with the config shape — that's the point.

Frequently Asked Questions

What is claude-code-merge-queue?

claude-code-merge-queue is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by funador. The local merge queue for parallel Claude Code agents. It has 120 GitHub stars.

Is claude-code-merge-queue safe to use?

Yes. claude-code-merge-queue passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install claude-code-merge-queue?

Clone the repository with "git clone https://github.com/funador/claude-code-merge-queue" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is claude-code-merge-queue written in?

claude-code-merge-queue is primarily written in TypeScript. It is open-source under funador on GitHub, so you can review or fork the full source.

Are there alternatives to claude-code-merge-queue?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh claude-code-merge-queue against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details