Skip to content
Back to skills

Fork Sync Rebase

ASecurity

Safely review and selectively integrate upstream changes into a long-lived personal, team, or client fork. Use when the user wants to check what changed upstream, sync, merge, or rebase a fork onto upstream, or recover from a messy upstream integration while keeping fork-only features isolated. For classifying new feature work or preparing upstream PRs, use fork-product-development instead.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 27, 2026
ai-agentsgogitsecurity

Works with

  • cli

Security analysis

A100/100

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

Scanned November 27, 2026

npx -y skills add Laksh-star/agent-skills --skill fork-sync-rebase --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fork Sync Rebase?

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

Security grade badge for Fork Sync Rebase
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/laksh-star-fork-sync-rebase/badge)](https://www.skillsdirectory.com/skills/laksh-star-fork-sync-rebase)

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: fork-sync-rebase
description: Safely review and selectively integrate upstream changes into a long-lived personal, team, or client fork. Use when the user wants to check what changed upstream, sync, merge, or rebase a fork onto upstream, or recover from a messy upstream integration while keeping fork-only features isolated. For classifying new feature work or preparing upstream PRs, use fork-product-development instead.
---

# Fork Sync Rebase

Use this skill for repositories with a distinct upstream remote and fork remote. The goal is to keep the fork maintainable without treating upstream changes as automatically safe or desirable.

## Invocation

Use one of these requests:

- `Run fork sync review for <repo>.`
- `Review upstream changes for <repo>; do not alter branches.`
- `Integrate upstream into <fork branch> using the fork sync workflow.`

Default to **review mode** unless the user explicitly asks to integrate or rebase.

## Safety Invariants

- Identify the actual repository root before running Git commands.
- Confirm which remote is the upstream source and which remote is the user's fork. Do not infer this from remote names alone.
- Never push to upstream. An upstream pull request requires a separate explicit user request.
- Never rebase the active development branch in place as the first action.
- Never force-push a shared or user-facing branch unless the user explicitly asks and understands the consequence.
- Preserve fork-specific identity, signing, storage, privacy, billing, updater, and local integration changes unless the user asks to remove them.
- Do not stage, delete, or reset unrelated tracked or untracked work.

## Review Mode

1. Inspect worktree status, remotes, current branch, tracking branch, recent commits, and existing integration/reference branches.
2. Fetch upstream. Fetching is allowed in review mode; it must not merge or rebase anything.
3. Compare the active fork branch to the refreshed upstream default branch:
   - commit divergence and tags/releases
   - changed subsystems and likely conflict areas
   - upstream changes worth integrating now, deferring, or intentionally excluding
4. Report a recommendation with a concise integration plan. Include whether an integration is low, medium, or high risk.
5. Stop before rebasing, merging, changing branches, installing dependencies, building, or pushing unless the user explicitly requested integration.

## Integration Mode

Use this only after explicit user authorization.

1. Require no tracked worktree edits. List untracked files, but leave them untouched unless they directly block the operation.
2. Fetch upstream and create a dated, read-only reference branch pointing at the refreshed upstream default branch, for example `agent/upstream-YYYY-MM-DD`.
3. Create a disposable integration branch from the active fork branch, for example `agent/rebase-YYYY-MM-DD`.
4. Rebase the disposable integration branch onto the dated upstream reference.
5. Resolve conflicts by first preserving the fork's explicit local boundaries, then adapting feature code to upstream architecture. Avoid broad refactors unrelated to integration.
6. Run the repository's focused build/test/install path. For desktop apps, distinguish compilation from runtime/manual validation.
7. Review the resulting diff and summarize preserved local changes, adopted upstream changes, and deferred conflicts or exclusions.
8. Only after successful validation, update the active fork branch from the verified integration branch. Push to the verified fork remote, never upstream.

## Decision Criteria

Prefer integration when upstream includes security, data integrity, recording/capture, dependency, platform compatibility, or provider/runtime fixes that affect the fork.

Defer large upstream subsystems when they introduce architecture the fork does not yet need, carry unresolved privacy or product implications, or would make local feature maintenance materially harder. Record deferred items in the repository's existing project log when one exists.

## Completion Report

State:

- upstream revision and dated reference branch
- active fork branch and verified fork remote
- integration branch, if used
- adopted, deferred, and excluded upstream areas
- build/test/install evidence and remaining manual checks
- exact push destination

Files in this skill

  • SKILL.md4.2 KB
  • agents/openai.yaml245 B

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.