rebase-main
Rebases the current branch on the latest default branch (main, master, etc.), resolving any merge conflicts automatically. Detects the default branch and remote, fetches latest, performs rebase, and handles conflicts file-by-file.
What this skill does
# Rebase on Default Branch
Rebases the current branch onto the latest default branch, resolving conflicts along the way.
## Process
### 1. Pre-flight Checks
- Run `git status` to confirm there are no uncommitted changes. If there are, stop and ask the user to commit or stash first.
- Detect the default branch and remote:
```bash
git remote show origin | grep 'HEAD branch' | sed 's/.*: //'
```
This gives you the default branch name (e.g., `main`, `master`, `develop`). If the remote is not `origin`, detect it with `git remote`. Use whatever remote and branch name you find throughout the rest of this process — don't assume `origin/main`.
- Confirm the current branch is NOT the default branch. If it is, stop — there's nothing to rebase.
### 2. Fetch Latest Default Branch
```bash
git fetch <remote> <default-branch>
```
### 3. Start Rebase
```bash
git rebase <remote>/<default-branch>
```
If the rebase completes without conflicts, report success with the number of commits replayed and exit.
### 4. Resolve Conflicts (loop until rebase completes)
When conflicts occur, for each conflicted file:
1. Run `git diff --name-only --diff-filter=U` to list all conflicted files.
2. For each conflicted file:
a. Read the file to see the conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`).
b. Understand both sides:
- **ours** (during rebase) = the commit being replayed (your branch's changes)
- **theirs** (during rebase) = the default branch (the new base)
c. Resolve the conflict following the rules below.
d. Stage the resolved file with `git add <file>`.
3. After all files in the current step are resolved, continue the rebase:
```bash
git rebase --continue
```
4. If new conflicts arise on subsequent commits, repeat from step 1.
### 5. Post-rebase Verification
After the rebase completes:
- Run `git log --oneline <remote>/<default-branch>..HEAD` to show the replayed commits.
- Report the result to the user.
## Conflict Resolution Rules
### General Rule
Default to the default branch (theirs during rebase) as the source of truth, then re-apply local branch changes on top only when they can be preserved cleanly.
- Preserve the default branch's implementation, architecture, and public behavior.
- Re-apply local changes only when they are additive and don't conflict with the intent of the default branch's changes.
- If both sides made meaningful but incompatible changes, stop and ask the user.
### Auto-generated Files
For files that are auto-generated (e.g., `schema.graphql`, Prisma client, Apollo codegen output):
- Accept the default branch version entirely.
- After the rebase completes, re-run the relevant codegen commands to incorporate local changes.
### Lock Files & Dependencies
For `bun.lock`, `package-lock.json`, `yarn.lock`, or similar:
- Accept the default branch version.
- After the rebase, re-run the package manager install to regenerate the lock file if local changes added/changed dependencies.
## When to Stop and Ask
- Conflicting business logic where both sides made intentional, incompatible changes.
- Deleted vs. modified conflicts where the intent is unclear.
- More than 20 conflicted files in a single rebase step (likely a sign of divergence that needs human judgment).
## Output
When complete, report:
- Total commits replayed
- Files that had conflicts and how they were resolved
- Any codegen or install commands that were re-run
- Any conflicts that required user input
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.