Finishing a Development Branch
obra/superpowers
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.
Pre-merge analysis and preparation. An agent skill from sd0xdev/sd0x-harness.
$ npx skills add sd0xdev/sd0x-harness --skill merge-prep -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sd0xdev/sd0x-harness merge-prep --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/merge-prep .claude/skills/merge-prep && rm -rf skills-srcUse ~/.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/
Install the "merge-prep" agent skill from https://github.com/sd0xdev/sd0x-harness/tree/main/skills/merge-prep into .claude/skills/merge-prep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "merge-prep", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sd0xdev/sd0x-harness/tree/main/skills/merge-prepType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sd0xdev/sd0x-harness --skill merge-prep -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sd0xdev/sd0x-harness merge-prep --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/merge-prep .agents/skills/merge-prep && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "merge-prep" agent skill from https://github.com/sd0xdev/sd0x-harness/tree/main/skills/merge-prep into .agents/skills/merge-prep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "merge-prep", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sd0xdev/sd0x-harness --skill merge-prep -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sd0xdev/sd0x-harness merge-prep --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/merge-prep .cursor/skills/merge-prep && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "merge-prep" agent skill from https://github.com/sd0xdev/sd0x-harness/tree/main/skills/merge-prep into .cursor/skills/merge-prep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "merge-prep", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sd0xdev/sd0x-harness.git --path skills/merge-prep--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sd0xdev/sd0x-harness --skill merge-prep -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sd0xdev/sd0x-harness merge-prep --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/merge-prep .gemini/skills/merge-prep && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "merge-prep" agent skill from https://github.com/sd0xdev/sd0x-harness/tree/main/skills/merge-prep into .gemini/skills/merge-prep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "merge-prep", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sd0xdev/sd0x-harness merge-prepInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sd0xdev/sd0x-harness --skill merge-prep -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/merge-prep .github/skills/merge-prep && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "merge-prep" agent skill from https://github.com/sd0xdev/sd0x-harness/tree/main/skills/merge-prep into .github/skills/merge-prep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "merge-prep", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sd0xdev/sd0x-harness --skill merge-prep -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sd0xdev/sd0x-harness merge-prep --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/merge-prep .opencode/skills/merge-prep && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "merge-prep" agent skill from https://github.com/sd0xdev/sd0x-harness/tree/main/skills/merge-prep into .opencode/skills/merge-prep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "merge-prep", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
merge-prepPre-merge analysis and preparation. An agent skill from sd0xdev/sd0x-harness.
Merge Prep is an agent skill from sd0xdev/sd0x-harness. Pre-merge analysis and preparation. Analyzes source branch vs target branch: commit stats, conflict detection, file impact. Analysis-only v1 — outputs report + suggested commands, does not auto-merge. Use when: user says 'merge prep', 'pre-merge', 'merge analysis', or /merge-prep
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/pre-merge-check.sh`).
It sits in Development. It works with Git. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit c9a2036. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
Bash(git:*)ReadGrepGlobFrom allowed-tools in the SKILL.md frontmatter.
Ships 1 file in scripts/ (Shell), which the agent can run.
Shell commands in SKILL.md call:
gitbashFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Merge Prep loads about 1.4k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 326 words of instructions outside code blocks.
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.
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); the scripts in this folder are not scanned.
The full file from sd0xdev/sd0x-harness at commit c9a2036, republished under its MIT licence (© sd0xdev). 326 words, ~1,369 tokens.
.claude/skills/merge-prep/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Analyze source branch vs target branch, detect conflicts, output analysis report with suggested commands. v1 is analysis-only — does not execute merge/commit/push.
| Scenario | Use Instead |
|---|---|
| Commit code (not merge) | /smart-commit |
| Merge to main (production) | Manual PR flow |
| Just view diff | git diff <target>..<branch> |
| Rebase or squash | Manual operation |
/merge-prep <source-branch> [--target <branch>]
<source-branch>: Branch to merge (required)--target: Target branch (default: {TARGET_BRANCH} or main)sequenceDiagram
participant C as Claude
participant U as User
C->>C: Step 1: Validate prerequisites
C->>C: Step 2: Pre-merge analysis
C->>U: Show analysis report
U->>C: Acknowledge
C->>C: Step 3: Conflict analysis (if any)
C->>U: Show conflict details + resolution suggestions
C->>C: Step 4: Generate merge commands
C->>U: Output commands for manual execution# 1a. Verify source branch exists
git rev-parse --verify <branch>
# 1b. Verify target branch exists
git rev-parse --verify <target>
# 1c. Verify working tree is clean
git status --porcelain| Check | Failure Action |
|---|---|
| Branch doesn't exist | Halt, list available branches |
| Target not found | Halt, suggest creating it |
| Uncommitted changes | Halt, suggest /smart-commit first |
Run the analysis script:
bash skills/merge-prep/scripts/pre-merge-check.sh <branch> [target]Script outputs JSON containing:
merge_base: Common ancestorsource_commits: New commits on source branchtarget_commits: Commits on target that source doesn't havehas_conflicts: Whether conflicts existconflict_files: List of conflict filesfile_stats: Affected file statisticsDisplay analysis report:
## Pre-merge Analysis
| Item | Value |
|------|-------|
| Source branch | feat/new-feature |
| Target branch | main |
| Common ancestor | b03ad72a |
| New commits | 12 |
| Affected files | 46 |
| Predicted conflicts | 9 files |
### Recent Commits
| Hash | Message |
|------|---------|
| abc1234 | feat: Add new API endpoint |
| def5678 | test: Add integration tests |For each conflict file, analyze commit history to determine conflict pattern:
| Pattern | Detection | Suggested Strategy |
|---|---|---|
| Iterative (v1→v3) | Both sides changed, source is superset | Take source |
| Parallel modification | Different people changed different logic | Per-hunk selection |
| Hotfix conflict | Target has hotfix merge, source doesn't | Take target |
| Doc add/add | Both sides added same-name file | Take source |
Display resolution suggestions:
### Conflict Files
| # | File | Pattern | Suggestion | Reason |
|---|------|---------|------------|--------|
| 1 | src/xxx.ts | Iterative | Take source | v3 includes all v1 changes |
| 2 | src/yyy.ts | Parallel | Per-hunk | Two sides changed different functions |
| 3 | docs/zzz.md | add/add | Take source | Target version is outdated |Output commands for manual execution:
## Suggested Merge Commands
### Option A: Merge commit (recommended)
```bash
git checkout <target>
git pull --ff-only origin <target>
git merge <source> --no-ff
# Resolve conflicts if any
# git add <resolved-files>
# git commit
git push origin <target>git checkout <target>
git pull --ff-only origin <target>
git merge --squash <source>
git commit -m "merge: Merge <source> into <target>"
git push origin <target>
### Step 5: Summary
```markdown
## Merge Summary
| Item | Value |
|------|-------|
| Source | feat/new-feature |
| Target | main |
| Commits | 12 |
| Files | 46 |
| Conflicts | 9 (resolution suggestions provided) |
| Tickets | PROJ-520, PROJ-123 |
⚠️ This is an analysis-only report. Execute the commands manually.Supports /merge-prep branch1 branch2 branch3 --target develop:
git mergegit pushgit commit| File | Purpose | When to Read |
|---|---|---|
| pre-merge-check.sh | Pre-merge analysis script | Step 2 |
© sd0xdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (scripts) in skills/merge-prep of sd0xdev/sd0x-harness.
Open the folder on GitHubat commit c9a2036
Merge Prep 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Merge Prep this skillsd0xdev/sd0x-harness | 192 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Finishing a Development Branchobra/superpowers | 296k | 5 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Code Review ChecklistshareAI-lab/learn-claude-code | 78k | 5 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Codebase Knowledge Graph Q&AEgonex-AI/Understand-Anything | 85k | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| Code Design Rationale Investigatorcursor/plugins | 10k | 9 repos | ~2.6k | Automated safety check: Pass | None | |
| Understand Diff AnalysisEgonex-AI/Understand-Anything | 85k | 1 repos | ~1.4k | Automated safety check: Pass | MIT |
obra/superpowers
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.
shareAI-lab/learn-claude-code
Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.
Egonex-AI/Understand-Anything
Answers questions about a codebase by searching a prebuilt knowledge graph of its files, functions, classes and dependencies, not by rereading every source file.
cursor/plugins
Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.
Egonex-AI/Understand-Anything
Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.
Egonex-AI/Understand-Anything
Gives an in-depth explanation of one file, function or module by reading the project's knowledge graph and checking that the graph is still fresh.
sd0xdev/sd0x-harness
Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…
sd0xdev/sd0x-harness
Load GitHub PR review comments into AI session — analyze, triage, plan.
sd0xdev/sd0x-harness
Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.
sd0xdev/sd0x-harness
Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.
sd0xdev/sd0x-harness
Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.
sd0xdev/sd0x-harness
Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.
Works with
Categories
Pre-merge analysis and preparation. An agent skill from sd0xdev/sd0x-harness. Merge Prep is an agent skill from sd0xdev/sd0x-harness. Pre-merge analysis and preparation.
Merge Prep fits situations like: : user says merge prep.
Run `npx skills add sd0xdev/sd0x-harness --skill merge-prep -a claude-code`. Or copy the skill folder (skills/merge-prep in sd0xdev/sd0x-harness) into .claude/skills/merge-prep in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sd0xdev/sd0x-harness --skill merge-prep -a codex`. Or copy the skill folder (skills/merge-prep in sd0xdev/sd0x-harness) into .agents/skills/merge-prep in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sd0xdev/sd0x-harness --skill merge-prep -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-prep, .gemini/skills/merge-prep, .github/skills/merge-prep and .opencode/skills/merge-prep in your project.
Going by SKILL.md and its folder, Merge Prep needs a shell for the scripts in its folder and the command-line tools its instructions call (git and bash). Our summary lists: A Bash shell. Its frontmatter pre-approves these tools: Bash(git:*), Read, Grep, Glob.
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.
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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Merge Prep is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Merge Prep: Finishing a Development Branch (obra/superpowers, 296k stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Codebase Knowledge Graph Q&A (Egonex-AI/Understand-Anything, 85k stars) and Code Design Rationale Investigator (cursor/plugins, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 6, 2026.
Source: sd0xdev/sd0x-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.