Skip to content
Back to skills

Collection

ASecurity

Resolve git merge conflicts in dependency files, source code, and configuration. Use when merge conflicts are detected.

  • 24 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
documentationpythonrustgobashgitdocumentation

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-672c5f42/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-672c5f42)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fix-merge-conflicts
description: Resolve git merge conflicts in dependency files, source code, and configuration. Use when merge conflicts are detected.
allowed-tools: Read, Edit, Bash, Glob, Grep
---

# Fix Merge Conflicts

You are the AI Engineering Maintenance Bot resolving merge conflicts in a Vector Institute repository.

## Context
Read `.pr-context.json` for PR details. Check `git status` for conflicting files.

## ⚠️ CRITICAL: Do Not Commit Bot Files

**NEVER commit these temporary bot files:**
- `.claude/` directory (bot skills)
- `.pr-context.json` (bot metadata)
- `.failure-logs.txt` (bot logs)

These files are automatically excluded from git, but **do not explicitly `git add` them**.

When committing fixes, only add the actual fix files:
```bash
# ✅ CORRECT: Add only fix-related files
git add src/conflicted-file.ts package.json

# ❌ WRONG: Never do this
git add .  # This might include bot files if exclusion fails
git add .claude/
git add .pr-context.json
```

## Process

### 1. Identify Conflicts
```bash
git status
git diff --name-only --diff-filter=U
```

### 2. Resolution Strategy by File Type

**Dependency Files (package.json, requirements.txt)**
- Prefer newer versions
- Keep additions from both sides
- Maintain consistent formatting

Example:
```
<<<<<<< HEAD
"dep-a": "^2.0.0",
"dep-b": "^1.5.0"
=======
"dep-a": "^1.9.0",
"dep-c": "^3.0.0"
>>>>>>> PR

RESOLVE TO:
"dep-a": "^2.0.0",  // Newer version
"dep-b": "^1.5.0",  // From base
"dep-c": "^3.0.0"   // From PR
```

**Lock Files (package-lock.json, poetry.lock)**
- DON'T manually edit
- Delete and regenerate:
```bash
npm install      # npm
poetry lock      # Python
cargo update     # Rust
```

**Source Code**
- Preserve functionality from both sides when possible
- Base branch wins for different implementations (more recent)
- Combine both additions if compatible
- Follow base formatting

**Configuration Files**
- Merge both sets of changes logically
- Preserve workflow improvements
- Maintain proper syntax

**Documentation**
- Combine both updates
- Keep chronological order for changelogs
- Preserve both feature descriptions

### 3. Resolution Steps
For each file:
1. Read entire file for context
2. Locate conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`)
3. Analyze both versions
4. Make decision using strategy above
5. Edit file to remove markers
6. Verify syntax is valid

### 4. Finalize
```bash
git add <resolved-files>
git diff --check  # Verify no markers remain
```

### 5. Push to Correct Branch

**CRITICAL**: Push changes to the correct PR branch!

```bash
# Get branch name from .pr-context.json
HEAD_REF=$(jq -r '.head_ref' .pr-context.json)

# Push to the PR branch (NOT a new branch!)
git push origin HEAD:refs/heads/$HEAD_REF
```

**DO NOT**:
- ❌ Create a new branch name
- ❌ Push to a different branch
- ❌ Use `git push origin HEAD` without specifying target

The branch name MUST match `head_ref` from `.pr-context.json`.

## Safety Checklist
- [ ] All conflict markers removed
- [ ] File syntax is valid
- [ ] Dependencies at compatible versions
- [ ] No functionality lost
- [ ] Lock files regenerated (not manually edited)

## Important Rules
- Never leave conflict markers in files
- Prefer newer over older versions
- Keep both additions when non-conflicting
- Regenerate lock files (don't manually resolve)
- Preserve intent from both sides

## Commit Format
```
Resolve merge conflicts

- [File 1]: [Resolution description]
- [File 2]: [Resolution description]

Co-authored-by: AI Engineering Maintenance Bot <aieng-bot@vectorinstitute.ai>
```

## Safety Rules
- ❌ Don't leave conflict markers
- ❌ Don't choose older versions
- ❌ Don't manually edit lock files
- ❌ Don't discard additions
- ✅ Verify syntax after resolution
- ✅ Regenerate lock files properly

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…