mcpbeat

Jules Merge

google-labs-code/jules-merge

48k tokens
context cost
the whole folder, loaded on every use
81
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
120
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/google-labs-code/jules-sdk --skill jules-merge

What comes with it

115 130 bytes besides the instruction
AGENT_CONTEXT.md
README.md
build.ts
package.json
src/__tests__/fixtures/github-git-blob.ts
src/__tests__/fixtures/github-git-commit.ts
src/__tests__/fixtures/github-git-ref.ts
src/__tests__/fixtures/github-git-tree.ts
src/__tests__/fixtures/github-git.ts
src/__tests__/fixtures/github-pulls-create.ts
src/__tests__/fixtures/github-pulls-get.ts
src/__tests__/fixtures/github-pulls-list.ts
src/__tests__/fixtures/github-pulls-merge.ts
src/__tests__/fixtures/github-pulls.ts
src/__tests__/fixtures/github-repos-branch.ts
src/__tests__/fixtures/github-repos-compare.ts
src/__tests__/fixtures/github-repos-contents.ts
src/__tests__/fixtures/github-repos-get.ts
src/__tests__/fixtures/github-repos.ts
src/__tests__/fixtures/github-state.ts
src/__tests__/fixtures/github.ts
src/__tests__/reconcile/critical-paths.test.ts
src/__tests__/reconcile/scan-discovery.test.ts
src/__tests__/reconcile/scan-input-validation.test.ts
src/__tests__/shared/auth.test.ts
src/cli/get-contents.command.ts
src/cli/index.ts
src/cli/mcp.command.ts
src/cli/merge.command.ts
src/cli/push.command.ts
src/cli/scan.command.ts
src/cli/schema.command.ts
src/cli/stage-resolution.command.ts
src/cli/status.command.ts
src/index.ts
src/mcp/index.ts
src/mcp/server.ts
src/reconcile/get-contents-handler.ts
src/reconcile/index.ts
src/reconcile/manifest.ts

The instruction itself

11 sections, as written by the author

jules-merge Agent Skill

Workflow Order

Always execute commands in this sequence:

  • scan — detect conflicts and build the manifest
  • get-contents — fetch file versions (base, main, pr:<N>) for each hot zone
  • stage-resolution — write resolved content for each conflicted file
  • status — confirm all files resolved (ready: true, pending is empty)
  • push — create the multi-parent reconciliation commit and PR
  • merge — merge the reconciliation PR using a merge commit

Command Reference

scan

  • Required: prs (array of PR numbers), repo (owner/repo)
  • Optional: base (branch name, default: main), includeClean

get-contents

  • source values: "base" | "main" | "pr:<N>" (e.g. "pr:42")
  • Always check totalLines in the response — if it exceeds your context budget, surface to the user rather than attempting to process the file
  • "base" = the common ancestor commit (merge base), not main

stage-resolution

  • parents format: "main,<prNumber>,<prNumber>" — always start with "main", followed by the PR numbers (as strings) that touch the file
  • Example: ["main", "10", "11"]
  • Either content (inline string) or fromFile (local path) must be provided
  • Use --dry-run to validate without writing to the manifest

push

  • mergeStrategy values: "sequential" (default) | "octopus"
  • sequential: creates N 2-parent merge commits in a chain — required for GitHub auto-close
  • octopus: creates a single N-parent commit — use for non-GitHub platforms or atomic history
  • Check warnings in the output — if "BASE_SHA_MISMATCH" is present, re-run scan before merging
  • --dry-run is safe to call at any time; it validates without writing
  • push is idempotent: calling it twice on the same branch reuses the existing PR
  • When using sequential, the output includes mergeChain — an array of { commitSha, parents, prId } per step

merge

  • Always uses merge commit strategy — never squash or rebase
  • This preserves the ancestry chain that auto-closes fleet PRs via GitHub's "closes" detection

Exit Codes

| Code | Meaning | Action |

|------|---------|--------|

| 0 | Success | Continue |

| 1 | Recoverable conflict | Surface to user or re-scan |

| 2 | Hard error | Abort and surface to user |

Key Invariants

  • Merge strategy: always merge (not squash/rebase) — squash breaks the ancestry chain that closes fleet PRs
  • Push merge strategy: default sequential creates 2-parent chain for GitHub compatibility; use octopus only for non-GitHub platforms
  • parents format: ["main", "<prN>", "<prN>"] — the string "main" is always first, followed by PR numbers as strings
  • Scan before push: if push returns warnings: ["BASE_SHA_MISMATCH"], re-run scan to refresh the base SHA before proceeding
  • Context window: check totalLines on every get-contents response; if a file is too large for your context budget, surface to the user rather than processing it
  • Idempotency: scan overwrites the manifest; push reuses an existing open PR on the same branch
  • No pending files: push will throw if status.pending is non-empty — resolve all hot zones first

Schema Introspection

jules-merge schema <command>     # input/output schema for one command
jules-merge schema --all         # all schemas at once

How to use it

Copy the folder

Take google-labs-code/jules-merge from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.