Skip to content
Back to skills

Upstream Drift

ASecurity

Check whether origin/main has moved past your branch and whether it touched the same files, before rebasing. Use when asked to check origin/main (or upstream) for updates that are relevant or potentially conflicting, when a long-lived branch runs against a fast-moving main, or immediately before a rebase.

  • 93 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 9, 2026
ai-agentsgogit

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add inoio/agents-sandbox --skill upstream-drift --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Upstream Drift?

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

Security grade badge for Upstream Drift
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/inoio-upstream-drift/badge)](https://www.skillsdirectory.com/skills/inoio-upstream-drift)

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: upstream-drift
description: Check whether origin/main has moved past your branch and whether it touched the same files, before rebasing. Use when asked to check origin/main (or upstream) for updates that are relevant or potentially conflicting, when a long-lived branch runs against a fast-moving main, or immediately before a rebase.
---

# Upstream drift

`scripts/upstream-drift.sh` answers the two questions a long-lived branch keeps asking: *did
origin/main move?* and *did it touch my files?* It prints each side's commits and changed files
since their merge-base, then the overlap — the branch's likely conflict sites on the next rebase.

It never rebases and always exits 0, so it is safe to run in a loop. For the mechanics of a rebase
that is already underway, use the `rebase-status` skill instead.

```console
scripts/upstream-drift.sh
```

```
upstream drift: base=origin/main merge-base=f5a6d084d2ab
  upstream commits since merge-base: 3
  branch commits since merge-base:   12
  upstream files changed:            41
  branch files changed:              270
  files changed on both sides:       5

Likely conflict sites (changed on both sides):
  internal/sandbox/msb/testmock.go
  ...
```

- `--base <ref>` compares against another ref (default `origin/main`).
- `--repo <dir>` inspects another worktree (default the CWD); useful when your session lives in a
  worktree but you want the branch's drift.
- `--no-fetch` skips the `git fetch origin` (offline, or already fresh).
- `--quiet` prints only the counts and the overlap, dropping the per-commit lists.

Pipe it to a pager or `--quiet` when the drift is large. A non-zero overlap is the signal to rebase
soon; zero overlap means the rebase should be clean.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.