conflict-resolver
Resolves git conflicts in progress — for both rebases and merges. Invoke immediately whenever the user says "help with rebase", "rebase conflict", "merge conflict", "I have conflicts", "rebase is stuck", "resolve this conflict", "rebase went wrong", or is mid-rebase or mid-merge and needs guidance on what to keep. Don't wait for the user to ask explicitly — if git status shows conflict markers or a rebase/merge is active, invoke this skill. Analyzes the commit history of every branch involved via parallel sub-agents to understand each side's intent before touching any conflict marker.
What this skill does
# Conflict Resolver You are helping resolve git conflicts in progress — either a rebase or a merge. The goal is not to mechanically pick one side over the other: it is to produce a result that preserves the intent of changes from all branches while affecting none of them more than necessary. Understanding *why* each change was made is mandatory before touching any conflict marker. ## Step 1 — Detect the operation type and conflicting state ```bash git status ``` From the output, determine: - Which files have conflicts (`UU` status) - Whether a **rebase** or **merge** is active: - Rebase: presence of `.git/rebase-merge/` or `.git/rebase-apply/` - Merge: presence of `.git/MERGE_HEAD` - The branches involved: - **Rebase**: `ORIG_HEAD` (branch being replayed) and `HEAD` (target) - **Merge**: `HEAD` (current branch) and `MERGE_HEAD` (branch being merged in) For a rebase, also run: ```bash git rebase --show-current-patch # the commit currently being applied git log --oneline ORIG_HEAD..HEAD # commits already replayed successfully ``` ## Step 2 — Find the common ancestor and bound the analysis range ```bash git merge-base <branch-A> <branch-B> ``` This gives the commit where the branches diverged. The relevant history for each branch is `<merge-base>..<branch-tip>` — only the commits that diverged, nothing before. Save this range; agents in Step 3 will use it to stay focused on what actually matters for the conflict. ## Step 3 — Delegate history analysis to git-history-retriever agents Before touching any conflict marker, invoke one `git-history-retriever` agent **per branch involved**. Launch all agents in parallel. Each agent receives: - The branch it is analyzing - The commit range: `<merge-base>..<branch-tip>` - The list of conflicting files For a standard 2-branch conflict (rebase or merge), launch 2 agents in parallel. For an octopus merge (3+ branches), launch one agent per branch. Wait for all agents to complete before proceeding to Step 4. ## Step 4 — Analyze each conflict with the history reports in hand For each conflicting file, read the conflict markers in the working tree: - `<<<<<<< HEAD` (or `<<<<<<< ours`) — current branch state - `=======` — separator - `>>>>>>> <sha>` — incoming change Cross-reference with the agents' reports: - Are both sides adding independent things that should coexist? - Is one side a refactor of structure that the other side's change now needs to respect? - Is one side already a superset of the other (one change subsumed)? - Are they genuinely contradictory — two different answers to the same problem? ## Step 5 — Propose the resolution For each conflict, produce the resolved content explicitly. Do not say "keep the incoming side" — show the actual merged result. Explain reasoning in terms of intent, not code structure. | Situation | Resolution | |-----------|------------| | Both sides add independent things | Merge both; order by logical dependency | | One side refactors structure | Apply the functional change on top of the refactored structure | | One side is a subset of the other | Keep the superset; verify nothing was silently dropped | | Genuinely contradictory | Surface both intents clearly; let the user decide | ## Step 6 — Execute the resolution After the user approves each resolution: 1. Write the resolved content to the file — remove all conflict markers 2. Stage the file: `git add <file>` 3. Move to the next conflicting file 4. When all conflicts are resolved, continue the operation: **Rebase:** ```bash git rebase --continue ``` If `--continue` reveals new conflicts in a subsequent commit: - If the conflicting files were already analyzed in this session → skip to Step 4; the history reports are still valid for those files. - If new files appear that were not previously analyzed, or the context from the prior analysis is no longer available → restart from Step 1 for the new conflict set. **Merge:** ```bash git merge --continue # or: git commit (if --continue is unavailable in the installed git version) ``` ## Aborting If the conflicts are deeply intertwined and a different approach would be safer: ```bash git rebase --abort # rebase git merge --abort # merge ``` Both return to the exact state before the operation started. Mention this option when: - Conflict resolution would require wholesale rewrites - History analysis shows the branches diverged in fundamentally incompatible directions - A merge would preserve history better than the current rebase
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.