Agent skill

Merge Master

by keybase in keybase/client

A skill your agent uses when periodically merging upstream master commits into a long-running refactor branch where code has moved, been renamed, or restructured — guiding careful per-commit…

BSD-3-ClauseAuto-check passedDevelopment

Install Merge Master

skills CLI
$ npx skills add keybase/client --skill merge-master -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install keybase/client merge-master --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/keybase/client.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skill/merge-master .claude/skills/merge-master && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
merge-master
GitHub stars
9.3k
Token cost
~1.3k tokens
SKILL.md length
480 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

A skill your agent uses when periodically merging upstream master commits into a long-running refactor branch where code has moved, been renamed, or restructured — guiding careful per-commit…

  • Works in 5 steps: Inspect the diff → Determine applicability. A commit may → Locate the target. Files may have moved.… → …
  • Periodically merging upstream master commits into a long-running refactor branch where code has moved
  • SKILL.md covers Find the Last Merge Point, Get New Master Commits Since…, Per-Commit Analysis and When to Stop and Ask, plus 4 more sections
  • Calls git, yarn and go

What it does

Merge Master is an agent skill from keybase/client. Use when periodically merging upstream master commits into a long-running refactor branch where code has moved, been renamed, or restructured — guiding careful per-commit analysis and transplant rather than a raw git merge.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Refactoring and Git workflow. It works with Git. The repository describes itself as: Keybase Go Library, Client, Service, OS X, iOS, Android, Electron. The licence is BSD-3-Clause.

When your agent uses it

  • Periodically merging upstream master commits into a long-running refactor branch where code has moved
  • Restructured — guiding careful per-commit analysis and transplant rather than a raw git merge

Example prompts

  • “/merge-master”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Inspect the diff
  2. Determine applicability. A commit may
  3. Locate the target. Files may have moved. Use search
  4. Apply the equivalent change — not a copy-paste of the diff, but the same intent applied to the current structure. Common cases
  5. Cover ALL file types. A single commit often touches multiple languages. For each commit, verify you've addressed every file in git show…

What it can do on your machine

Read from SKILL.md and the folder at commit 349f5f4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • yarn
    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and yarn, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Merge Master loads about 1.3k tokens when it runs. Until then it costs about 59 tokens; SKILL.md has 480 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~59
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from keybase/client at commit 349f5f4, republished under its BSD-3-Clause licence (© keybase). 480 words, ~1,252 tokens.

Download SKILL.mdSave it as .claude/skills/merge-master/SKILL.md (or your agent's skills folder).
name
merge-master
description
Use when periodically merging upstream master commits into a long-running refactor branch where code has moved, been renamed, or restructured — guiding careful per-commit analysis and transplant rather than a raw git merge.

Merge Master into Refactor Branch

Use this skill when you need to bring upstream master changes into a long-running refactor branch. A raw git merge master often produces conflicts in code that has moved or been restructured. Instead, analyze each master commit individually and apply the equivalent change to wherever that code now lives.

Find the Last Merge Point

bash
# Find the last time master was merged into this branch
git log --oneline --merges | grep -i master | head -3
# Note the commit hash and date
git log <hash> --format="%ai %s" -1

Get New Master Commits Since Last Merge

bash
# Find the master commit that was merged last time (parent 2 of the merge commit)
git log <last-merge-hash>^2 --oneline -1

# List all master commits since then, oldest first
git log <master-tip-at-last-merge>..origin/master --oneline --reverse

Per-Commit Analysis

For each commit in master since the last merge:

  1. Inspect the diff:

    bash
    git show <commit> --stat
    git show <commit> --name-only   # full file list first
    git show <commit>               # full diff
  2. Determine applicability. A commit may:

    • Already be logically applied (equivalent refactor done on this branch)
    • Not be relevant (area this branch doesn't touch)
    • Need transplanting (bug fix, API change, dep update that still applies)
  3. Locate the target. Files may have moved. Use search:

    bash
    cd shared && grep -r "functionName\|ClassName" --include="*.ts" --include="*.tsx" -l
  4. Apply the equivalent change — not a copy-paste of the diff, but the same intent applied to the current structure. Common cases:

    • Dep update in package.json: Apply same version bump (never downgrade)
    • Bug fix in moved file: Find where logic now lives, apply same fix
    • New util/helper added: Add it to the equivalent location in the refactored structure
    • Config/type change: Find all usages in the branch and update accordingly
  5. Cover ALL file types. A single commit often touches multiple languages. For each commit, verify you've addressed every file in git show <commit> --name-only — TS/TSX, Go, Kotlin, Swift, Java, tests, etc. Missing one language (e.g. applying TS changes but skipping Go) is a common failure mode.

Show full SKILL.md (238 more words)Show less

When to Stop and Ask

Stop and ask the user before proceeding when:

  • The master commit's target code no longer exists in the refactor branch and it's unclear if the change was superseded or just removed
  • The fix logic conflicts with the refactor's new design (different interface, different data flow)
  • Multiple master commits appear to be part of one logical change but their targets have diverged differently
  • A commit touches a large surface area and partial application would leave things inconsistent

State clearly: what the master commit does, where you expected to find it, and what you found instead.

Skipping Commits

If a commit is already applied or clearly irrelevant, document the skip inline:

SKIP <hash> "<title>" — reason (already applied in <our-commit> / not relevant)

Final Cross-Reference Check

Before validating, do a completeness pass to catch anything missed:

bash
# 1. List every file touched across ALL master commits being merged
git show <commit1> <commit2> ... --name-only | sort -u

# 2. For each file, confirm one of:
#    - Applied: we made an equivalent change
#    - Skipped: documented reason (already done / not relevant)
#    - N/A: the feature doesn't exist in our branch and that's intentional

Work through this list explicitly, file by file. If any file has no status, investigate before marking done.

Validation

After all commits are processed:

TypeScript (from shared/):

bash
yarn lint:all

Go (from go/):

bash
go build ./...

Fix any issues before reporting done. If lint or tsc surfaces problems in unrelated code, note them separately — don't silently expand scope.

Alternative: git merge + Conflict Resolution

For large batches of master commits, git merge origin/master can be more efficient — it surfaces exactly what conflicts:

bash
git merge origin/master
# Resolve each conflict file using the skill logic:
# - Our branch's structure wins (keep our patterns, interfaces, imports)
# - Master's intent is applied (keep the new behavior/logic)
# - Never blindly accept "ours" or "theirs" — understand what each side does
git add <resolved-files>
git merge --continue

Use this approach when there are many commits and the conflict markers clearly show the divergence. Use the per-commit approach when conflicts are ambiguous or when you need to understand each change's intent before applying it.

© keybase, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skill/merge-master of keybase/client.

Open the folder on GitHubat commit 349f5f4

Compare with similar skills

Merge Master next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Merge Master compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Merge Master this skillkeybase/client9.3k—~1.3kAutomated safety check: PassBSD-3-Clause
Docs Update from DiffQwenLM/qwen-code28k—~1.1kAutomated safety check: PassApache-2.0
Refactor Command To Commandlineresultruby-git/ruby-git1.8k—~1.3kAutomated safety check: PassMIT
Nemo Rl Auto ResearchNVIDIA/skills3.5k—~2.3kAutomated safety check: PassApache-2.0
Change Boottikalk/adlc-team-skills141—~1.8kAutomated safety check: PassMIT
Semantic Szz Analyzermajiayu000/claude-skill-registry6661 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Docs Update from Diff

    QwenLM/qwen-code

    Reads local git changes and updates only the matching docs pages, so documentation stays in sync with uncommitted or recent code changes.

    28k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Migrates a command class that still performs parsing or custom execution logic to return raw Git::CommandLine::Result, moving parsing to facade/parser layers.

    1.8k GitHub stars~1.3k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Official

    Autonomous NeMo-RL research agent workflow for directed hypothesis testing and open-ended discovery.

    3.5k GitHub stars~2.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Change Boot

    tikalk/adlc-team-skills

    A skill your agent uses when past-change rationale matters (refactoring unfamiliar code, revert or hotfix analysis, issue-linked commit archaeology, session authors git changes with human-authored…

    141 GitHub stars~1.8k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Semantic Szz Analyzer

    majiayu000/claude-skill-registry

    Identify bug-introducing commits using semantic analysis that extends traditional SZZ algorithm.

    666 GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed

More from keybase/client

All 14 skills in this repo
  • Analyzes V8, Chrome and Electron .heapsnapshot files with Node scripts to find memory leaks, detached DOM nodes and the retainer paths that keep objects alive.

    9.3k GitHub stars~875 tokensUpdated yesterday
    Auto-check passed
  • Analyzes Chrome or Electron DevTools Performance trace exports with Python scripts to find where render time actually goes, without opening DevTools.

    9.3k GitHub stars~809 tokensUpdated yesterday
    Auto-check passed
  • Captures a clean Keybase service log and analyzes it for redundant, duplicated or looping RPCs, then checks whether a caching fix reduced the calls.

    9.3k GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Parses a React DevTools Profiler JSON export with Python scripts to find re-render storms, commit fan-out and why a component rendered, without opening the DevTools UI.

    9.3k GitHub stars~978 tokensUpdated yesterday
    Auto-check passed
  • Address PR Feedback

    keybase/client

    Fetches GitHub Copilot review feedback from inline threads and review bodies, checks each finding against the code and fixes the valid ones.

    9.3k GitHub stars~657 tokensUpdated yesterday
    Auto-check passed
  • Takes a screenshot of a running Electron desktop app through playwright-cli over remote debugging, shrinks it and shows it so you can check the UI visually.

    9.3k GitHub stars~476 tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Merge Master

What does Merge Master do?

A skill your agent uses when periodically merging upstream master commits into a long-running refactor branch where code has moved, been renamed, or restructured — guiding careful per-commit…. Merge Master is an agent skill from keybase/client. Use when periodically merging upstream master commits into a long-running refactor branch where code has moved, been renamed, or restructured — guiding careful per-commit analysis and transplant rather than a raw git merge.

When should I use Merge Master?

Merge Master fits situations like: periodically merging upstream master commits into a long-running refactor branch where code has moved; restructured — guiding careful per-commit analysis and transplant rather than a raw git merge.

How do I install Merge Master in Claude Code?

Run `npx skills add keybase/client --skill merge-master -a claude-code`. Or copy the skill folder (skill/merge-master in keybase/client) into .claude/skills/merge-master in your project. Claude Code loads it when a task matches its description.

How do I install Merge Master in Codex?

Run `npx skills add keybase/client --skill merge-master -a codex`. Or copy the skill folder (skill/merge-master in keybase/client) into .agents/skills/merge-master in your project. Codex loads it when a task matches its description.

Can I use Merge Master in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add keybase/client --skill merge-master -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/merge-master, .gemini/skills/merge-master, .github/skills/merge-master and .opencode/skills/merge-master in your project.

What does Merge Master need to run?

Going by SKILL.md and its folder, Merge Master needs the command-line tools its instructions call (git, yarn and go).

Does Merge Master access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Merge Master safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Merge Master use?

Merge Master is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Merge Master use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Merge Master?

Skills that share tags, products or a category with Merge Master: Docs Update from Diff (QwenLM/qwen-code, 28k stars), Refactor Command To Commandlineresult (ruby-git/ruby-git, 1.8k stars), Nemo Rl Auto Research (NVIDIA/skills, 3.5k stars) and Change Boot (tikalk/adlc-team-skills, 141 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Merge Master?

keybase (a GitHub organization) maintains it in keybase/client, which has 9,256 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 7, 2026.

Source: keybase/client on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.