upstream-sync

Compares a git upstream remote against the last reviewed SHA and classifies changes for selective transfer.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/lfuuu/claude-rules --skill upstream-sync-lfuuu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upstream-sync
Source: https://github.com/lfuuu/claude-rules/tree/main/global-skills/upstream-sync
Command: npx skills add https://github.com/lfuuu/claude-rules --skill upstream-sync-lfuuu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Keeping a forked or derived configuration repository in sync with its upstream source is tedious and risky: blindly copying changes can overwrite protected local customizations or pull in stack-specific content that does not apply. This Skill monitors the upstream remote, computes the delta since the last reviewed commit, and classifies every change into transfer, manual review, or ignore buckets so nothing is copied silently. ## Core Features & Use Cases - Delta analysis: Fetches the upstream branch, diffs it against the last reviewed SHA stored in a ledger, and produces a dated audit report with ID-tagged items. - Three-basket classification: Sorts changed paths into "transfer" (stack-agnostic mechanics like hooks and tools), "manual review" (stack-flavored cores and config files), and "ignore" (upstream author's projects and audit reports). - Confirmed apply and dismiss: Transfers approved items via git checkout only on explicit confirmation, records every decision in a persistent ledger, and never touches protected blocks. - Use Case: A maintainer of a Claude Code configuration repository wants to adopt improvements from the original upstream repo without inheriting the author's project-specific files; the Skill reports what changed, recommends what to port, and applies only confirmed items. ## Quick Start Ask the agent to check the upstream for new changes and show what should be transferred, then confirm specific item IDs to apply.

Frequently Asked Questions about upstream-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync selected changes from an upstream git repository?

Fetch the upstream remote, diff it against the last reviewed commit, and classify each changed path before transferring. This Skill automates that flow: it generates a report with ID-tagged items and applies only the ones you confirm via git checkout.

How to track which upstream commits have already been reviewed?

Store the last reviewed upstream SHA in a ledger file and compute each new delta from that point. The Skill maintains this ledger automatically, recording transferred, dismissed, and deferred items so rejected changes never resurface.

Can I prevent certain files from being overwritten during upstream sync?

Yes. The Skill never touches protected rule blocks, project directories, or audit reports, even if an apply item references them. Stack-specific core files go to a manual review basket where diffs are shown instead of copied wholesale.

Why does git checkout fail when applying an upstream change?

If the upstream deleted a file in the delta, git checkout of that pathspec fails and aborts the whole multi-path checkout. Check the diff status first; deleted paths should be skipped rather than transferred.

What are the limitations of automatic upstream synchronization?

Path-based classification can misfire: a script in a generic-looking directory may be hardcoded to the upstream author's infrastructure. The Skill mitigates this with a manual review basket and findings log, but human confirmation is still required before any transfer.