Merge Safe
Check for conflicts before merging branches safely
- Type
- Slash Command
- Repository
- jeremylongshore/tons-of-skills-marketplace
- GitHub stars
- 2.8k
- License
- MIT
- Repo last updated
- Sep 27, 2026
What Merge Safe is
Merge Safe is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”
A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.
Merge Safe gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.
How to install Merge Safe
Claude Code
- Download merge-safe.md from the repository.
- Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
- Run it by typing / followed by its name.
Claude Cowork
- Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
- In Customize → Skills, click +, then upload the ZIP.
- Run it from any task with / and the skill name.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/packages/devops-automation-pack/plugins/01-git-workflow/commands/merge-safe.md, shared under the repository's MIT license. Read the full file on GitHub.
Analyzes potential merge conflicts before actually merging, showing you exactly what will conflict and suggesting resolution strategies.
When to Use This
- Before merging feature branch into main
- Want to preview conflicts before committing to merge
- Need to plan conflict resolution strategy
- DON'T use if you're confident merge will be clean
How It Works
You are a Git merge expert who helps avoid merge disasters. When user runs /merge-safe or /gm:
- Identify current and target branches:
# Current branch
git branch --show-current
# Ask: "Which branch do you want to merge into current?"- Simulate the merge (don't actually merge):
# Test merge without committing
git merge --no-commit --no-ff [target-branch]
# Check for conflicts
git status- Analyze results:
If NO conflicts:
Merge will be clean!
Merging [target] into [current] will succeed without conflicts.If conflicts exist:
️ Conflicts detected in [N] files:
1. src/api/users.js (12 conflicts)
2. src/components/Header.jsx (3 conflicts)
3. package.json (1 conflict)- Abort test merge:
git merge --abort- Suggest resolution strategy:
- Show conflicting sections
- Recommend resolution approach
- Offer to proceed with actual merge
- Ask user's choice:
Options:
1. Proceed with merge (I'll help resolve conflicts)
2. Review conflicts first (show me details)
3. Abort (not ready to merge yet)Required Information
- Current branch: Where you are now
- Target branch: What you want to merge in
Output Format
Scenario 1: Clean merge
Checking merge safety: feature/add-login → main
SAFE TO MERGE
Analysis:
- 15 files will be changed
- 234 insertions, 12 deletions
- No conflicts detected
Proceed with merge? (yes/no)Scenario 2: Conflicts detected
Checking merge safety: feature/redesign → main
️ CONFLICTS DETECTED
Files with conflicts:
1. src/styles/main.css
- You changed: line 45-67 (new button styles)
- They changed: line 50-60 (different button colors)
- Conflict type: Overlapping changes
2. README.md
- You changed: Installation section
- They changed: Same section (different content)
- Conflict type: Same lines modified
Strategy suggestions:
- main.css: Keep your styles, they're more complete
- README.md: Merge both changes (complementary)
…Examples
Example 1: Clean merge
User: /gm
You: Which branch to merge into [current: feature/dashboard]?
User: main
You:
Checking merge safety: main → feature/dashboard
SAFE TO MERGE
Changes:
- 8 files changed
- 145 insertions(+), 23 deletions(-)
- No conflicts
Files to be merged:
- src/api/auth.js (updated)
- src/components/Login.jsx (new)
- package.json (dependencies updated)
- ... (5 more files)
Proceed with merge? (yes/no)User: yes
You:
git merge mainResult:
Merged successfully!
Updated feature/dashboard with latest from main.Example 2: Conflicts found
User: /gm
You: Which branch to merge?
User: develop
You:
Checking merge safety: develop → feature/api-redesign
️ 3 CONFLICTS DETECTED
Conflict #1: src/api/users.js
├─ Your changes (lines 45-60): New validation logic
├─ Their changes (lines 50-65): Different validation approach
└─ Resolution: Choose which validation to keep (likely yours is newer)
Conflict #2: package.json
├─ Your changes: Added "axios": "^1.4.0"
├─ Their changes: Added "axios": "^1.3.0"
└─ Resolution: Keep higher version (1.4.0)
Conflict #3: src/config/database.js
├─ Your changes: Connection pooling settings
├─ Their changes: Different pool size
└─ Resolution: Merge both (they're compatible)
…Error Handling
If on main/master branch:
️ You're on main branch
Merging INTO main is usually done via pull requests, not direct merge.
Better workflow:
1. Create feature branch: /branch-create
2. Make changes and commit
3. Create PR: /pr-create
4. Merge via GitHub/GitLab UI
Still want to merge? (yes/no)If no target branch specified:
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Merge Safe?
Merge Safe is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Check for conflicts before merging branches safely
How do I install Merge Safe in Claude Code?
Download merge-safe.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.
Can I use Merge Safe in Claude Cowork?
Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.
Is Merge Safe safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- File To Code Enhances file reading Skills by generating production-ready code from requirements documents Plugin · jeremylongshore/tons-of-skills-marketplace
- Find Arbitrage Find arbitrage opportunities across CEX/DEX with real-time detection Slash Command · jeremylongshore/tons-of-skills-marketplace
- Find Best Route Find optimal DEX routing for token swaps Slash Command · jeremylongshore/tons-of-skills-marketplace
- Figma Pack Claude Code skill pack for Figma (30 skills) Plugin · jeremylongshore/tons-of-skills-marketplace
- Metadata Generate SEO-optimized metadata for YouTube, blogs, and social platforms Slash Command · jeremylongshore/tons-of-skills-marketplace
- Memory Update Log a decision or pattern mid-session to MEMORY.md Slash Command · jeremylongshore/tons-of-skills-marketplace
- Metrics Review Review metrics and identify what needs attention Slash Command · jeremylongshore/tons-of-skills-marketplace
- Memory Share Sync MEMORY.md to git so teammates can restore context Slash Command · jeremylongshore/tons-of-skills-marketplace