Best for
- A merge or rebase produces conflicts
- The user asks to "resolve conflicts", "fix merge", or "update branch"
- CI fails because the branch is behind main
event4u-app/agent-config/src/skills/merge-conflicts/SKILL.md
Use when the user has merge conflicts or says "resolve conflicts". Understands conflict markers, resolution strategies, and verification workflow.
Decision brief
Understands conflict markers, resolution strategies, and verification workflow.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/merge-conflicts"Inspect the Agent Skill "merge-conflicts" from https://github.com/event4u-app/agent-config/blob/0adf49a8ae84b0ff6e2de8759eea43257e020eff/src/skills/merge-conflicts/SKILL.md at commit 0adf49a8ae84b0ff6e2de8759eea43257e020eff. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Before touching any conflict:
Use this skill when: - A merge or rebase produces conflicts - The user asks to "resolve conflicts", "fix merge", or "update branch" - CI fails because the branch is behind main - The prepare-for-review command encounters conflicts
Before touching any conflict:
git diff --name-only --diff-filter=U
git log --oneline -1 HEAD git log --oneline -1 MERGEHEAD or REBASEHEAD for rebase
Permission review
The documentation asks the agent to run terminal commands or scripts.
git diff --name-only --diff-filter=UThe documentation asks the agent to run terminal commands or scripts.
git log --oneline -1 HEADEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 85/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Use this skill when:
prepare-for-review command encounters conflictsBefore touching any conflict:
# What files have conflicts?
git diff --name-only --diff-filter=U
# What branch are we merging from/into?
git log --oneline -1 HEAD
git log --oneline -1 MERGE_HEAD # or REBASE_HEAD for rebase
For each conflicted file:
After reading both sides, write the plan; under autonomous-execution the
approval gate applies (a standing mandate states the plan and proceeds; an
interactive session surfaces it and waits):
## Merge Resolution Plan
- Conflicts: {N files / M hunks}
- Execution order: {dependency leaves first — a file nothing else imports
resolves before the files that import it}
| file | strategy | rationale |
|---|---|---|
- Decisions needed from the user: {semantic/deleted-modified items, or none}
- Validation: {targeted checks to run after resolution}
Backup before resolution: every deleted-modified file is copied to a
temp path ($TMPDIR/merge-backup-<ts>/<file>) and the path noted in the
plan BEFORE any resolution touches it.
| Situation | Strategy |
|---|---|
| Both sides changed the same line differently | Ask the user — this is a semantic conflict |
| Both sides added different code in the same area | Keep both — combine the additions in logical order |
| One side deleted, other side modified | Ask the user — deletion intent vs modification intent |
Lock file conflicts (composer.lock, package-lock.json) | Regenerate — accept theirs, then run composer install / npm install |
| Migration conflicts (same timestamp) | Rename — adjust timestamp to avoid collision |
| Auto-generated files (OpenAPI spec, baselines) | Regenerate — resolve source, then regenerate the output |
| Formatting-only conflicts | Accept either — then run quality tools to normalize |
| Import-block conflicts (both sides added imports) | Keep both — union the imports, drop duplicates, let the linter order them |
| Binary files (images, archives, compiled assets) | Pick one side whole — never splice; regenerate from source if generated, else ask which side wins |
use, JS/TS import, Python import, Go import, Rust use.php -l filename.php then vendor/bin/phpstan analyse path/to/file.phptsc --noEmit (full project) or eslint path/to/file.tspython -m py_compile path/to/file.py then mypy path/to/file.pygo vet ./path/to/pkg/...cargo checkphp artisan migrate --env=testingphp bin/console doctrine:migrations:migrate --env=test --no-interactionpnpm prisma migrate dev --schema=...pnpm knex migrate:latest --env testalembic upgrade head (against a test DB URL)migrate -path ./migrations -database "$TEST_DATABASE_URL" upcomposer.json — resolve, then run composer update --lock to regenerate composer.lock.package.json — resolve, then run npm install to regenerate package-lock.json..env.example — keep all new entries from both sides.Always ask when:
Resolve without asking when:
Every resolved conflict gets a one-line explanation ("kept both — additive imports"; "took theirs — lockfile regenerated") collected into the final summary: the auditable log the reviewer reads instead of re-deriving each hunk decision.
After resolving ALL conflicts:
# 1. Check no conflict markers remain (stack-agnostic — no --include filter)
grep -rn "<<<<<<< \|======= \|>>>>>>> " . \
--exclude-dir=node_modules --exclude-dir=vendor --exclude-dir=.git
# 2. Syntax-check changed files (stack-dependent — pick the row that matches the project)
# PHP: find . -name "*.php" -newer .git/MERGE_HEAD -exec php -l {} \;
# TS: tsc --noEmit
# Python: python -m compileall -q .
# Go: go build ./...
# Rust: cargo check
# 3. Run the project's quality tools — resolve via the quality-tools skill, Taskfile,
# package.json scripts, composer.json scripts, or Makefile. Examples per stack:
# PHP: vendor/bin/phpstan analyse
# TS: pnpm lint
# Python: ruff check && mypy
# Go: golangci-lint run
# Rust: cargo clippy
# 4. Run tests — full suite, not just the touched files
# PHP: php artisan test (or vendor/bin/pest)
# TS: pnpm test
# Python: pytest
# Go: go test ./...
# Rust: cargo test
# 5. Complete the merge/rebase
git add .
# Don't commit — let the user decide when to commit
| Pitfall | Prevention |
|---|---|
| Accepting "ours" blindly | Always read both sides first |
| Missing a conflict marker | Run grep -rn "<<<<<<< " after resolving |
| Breaking imports | Check use statements after merge |
| Losing new code | Compare the resolved file with both original versions |
| Forgetting to regenerate lock files | Always run package manager after resolving *.json |
| Approach | When to use |
|---|---|
git merge main | Default — preserves history, safer for shared branches |
git rebase main | Only when explicitly asked — rewrites history, cleaner log |
Never rebase without explicit permission (per no-commit rule).
<<<<<<<) in any file.Alternatives
K-Dense-AI/scientific-agent-skills
Build, inspect, test, and analyze bounded process-based discrete-event simulations with SimPy, including events, resources, interrupts, monitoring, replications, warm-up, and reproducible output analysis.
github/awesome-copilot
Improve AI application with evaluation-driven development. Define eval criteria, instrument the application, build golden datasets, observe and evaluate application runs, analyze results, and produce a concrete action plan for improvements. ALWAYS USE THIS SKILL when the user asks to set up QA, add tests, add evals, evaluate, benchmark, fix wrong behaviors, improve quality, or do quality assurance for any Python project that calls an LLM model.
K-Dense-AI/scientific-agent-skills
Statistical models library for Python. Use when you need specific model classes (OLS, GLM, mixed models, ARIMA) with detailed diagnostics, residuals, and inference. Best for econometrics, time series, rigorous inference with coefficient tables. For guided statistical test selection with APA reporting use statistical-analysis.
affaan-m/ECC
Use it for testing and engineering tasks; the detail page covers purpose, installation, and practical steps.