Agent skill

Upstream Fork Sync

by OpenHands in OpenHands/extensions

This skill should be used when the user asks to "keep a fork in sync", "rebase local changes on upstream", "sync my fork nightly", "long-lived fork", or "automate upstream rebases".

MITAuto-check passedProductivity & Automation

Install Upstream Fork Sync

skills CLI
$ npx skills add OpenHands/extensions --skill upstream-fork-sync -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenHands/extensions upstream-fork-sync --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenHands/extensions.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/upstream-fork-sync .claude/skills/upstream-fork-sync && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
upstream-fork-sync
GitHub stars
157
Token cost
~1.1k tokens
SKILL.md length
440 words
Files
6
Skills in repo
78
Repo updated
First seen
Licence
MIT

At a glance

This skill should be used when the user asks to "keep a fork in sync", "rebase local changes on upstream", "sync my fork nightly", "long-lived fork", or "automate upstream rebases".

  • Works in 3 steps: Verify GITHUB_PERSONAL_ACCESS_TOKEN → Collect configuration → Create the automation
  • Asks to keep a fork in sync
  • SKILL.md covers Prerequisites, Setup Workflow, Runtime behavior and Notes
  • Calls curl, make and python3; reaches api.github.com; needs GITHUB_PERSONAL_ACCESS_TOKEN and OPENHANDS_AUTOMATION_API_KEY

What it does

Upstream Fork Sync is an agent skill from OpenHands/extensions. This skill should be used when the user asks to "keep a fork in sync", "rebase local changes on upstream", "sync my fork nightly", "long-lived fork", or "automate upstream rebases". Guides the user through creating a cron automation that fetches upstream changes, rebases local customizations on top, verifies the software works, and replaces the running version when the rebase is clean.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files (for example `.plugin/plugin.json`, `README.md` and `commands/upstream-fork-sync-setup.md`).

It sits in Productivity & Automation, covering Scheduled and recurring tasks. It works with GitHub. The repository describes itself as: Public registry for OpenHands extensions. The licence is MIT.

When your agent uses it

  • Asks to keep a fork in sync
  • Rebase local changes on upstream
  • Sync my fork nightly
  • Long-lived fork

Example prompts

  • “keep a fork in sync”
  • “rebase local changes on upstream”
  • “sync my fork nightly”
  • “/upstream-fork-sync”

Requirements

  • Python 3
  • A credential in GITHUB_PERSONAL_ACCESS_TOKEN
  • A credential in OPENHANDS_AUTOMATION_API_KEY

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Verify GITHUB_PERSONAL_ACCESS_TOKEN
  2. Collect configuration
  3. Create the automation

What it can do on your machine

Read from SKILL.md and the folder at commit d008b81. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • make
    • python3
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GITHUB_PERSONAL_ACCESS_TOKEN
    • OPENHANDS_AUTOMATION_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Upstream Fork Sync loads about 1.1k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 440 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenHands/extensions at commit d008b81, republished under its MIT licence (© OpenHands). 440 words, ~1,149 tokens.

Download SKILL.mdSave it as .claude/skills/upstream-fork-sync/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
upstream-fork-sync
description
This skill should be used when the user asks to "keep a fork in sync", "rebase local changes on upstream", "sync my fork nightly", "long-lived fork", or "automate upstream rebases". Guides the user through creating a cron automation that fetches upstream changes, rebases local customizations on top, verifies the software works, and replaces the running version when the rebase is clean.
triggers
/upstream-fork-sync:setup

Upstream Fork Sync Automation

Create a cron automation that keeps a long-lived fork current with its upstream source. On every run it fetches the latest upstream changes, rebases the fork's local customizations on top, runs a verification check, and replaces the deployed version only when the software still works.

This implements the "long-lived fork" pattern: instead of repeatedly re-deriving a customization, the local changes are preserved across upstream releases and kept working automatically.

Windows PowerShell equivalents for the setup, packaging, upload, and API-check shell snippets are in references/windows.md.


Prerequisites

Required secret

Verify that the following secret is set in OpenHands Settings -> Secrets:

Secret nameToken typeMinimum permissions
GITHUB_PERSONAL_ACCESS_TOKENClassic PATrepo
GITHUB_PERSONAL_ACCESS_TOKENFine-grained PATContents: Read and Write, Metadata: Read

Check with:

bash
curl -s https://api.github.com/user \
  -H "Authorization: Bearer $GITHUB_PERSONAL_ACCESS_TOKEN" \
  | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('login') or d.get('message'))"

If the token is missing or invalid, inform the user and stop.


Setup Workflow

Follow these steps in order.

Step 1 - Verify GITHUB_PERSONAL_ACCESS_TOKEN

Run the curl check above.

  • If absent: "GITHUB_PERSONAL_ACCESS_TOKEN is not set. Please add it in OpenHands Settings -> Secrets." Stop.
  • If the API returns {"message": "Bad credentials"}: tell the user the token is invalid and ask them to update it. Stop.
Step 2 - Collect configuration

Confirm with the user:

  • Repository — the long-lived fork to keep synchronized (owner/repo).
  • Upstream remote (optional) — the remote the fork tracks. Defaults to the repository's GitHub parent.
  • Local changes (optional) — a plain-language description of the customizations to preserve across rebase.
  • Verify command (optional) — the command that confirms the software works (e.g. make test). If blank, infer a sensible check from the repository's build system.
  • Sync schedule — how often to run the sync. Default: nightly (0 3 * * *).
Show full SKILL.md (175 more words)Show less
Step 3 - Create the automation

Create the automation via the prompt preset:

bash
curl -s -X POST "$AUTOMATION_API_URL/v1/preset/prompt" \
  -H "Authorization: Bearer $OPENHANDS_AUTOMATION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Upstream fork sync - '"$REPO"'",
    "prompt": "Fetch the latest upstream changes for the fork '"$REPO"' and rebase all local changes on top of upstream. Local changes to preserve: '"$LOCAL_CHANGES"'. Check that the software works as intended; if it does, replace the current version, otherwise leave the running version untouched and report what failed.",
    "repos": [{"url": "'"$REPO"'", "provider": "github"}],
    "trigger": {"type": "cron", "schedule": "'"$SCHEDULE"'", "timezone": "'"$TIMEZONE"'"}
  }'

Confirm the automation was created (HTTP 201) and report its ID to the user.


Runtime behavior

On each scheduled run the automation:

  1. Clones the fork and fetches the latest from its upstream remote.
  2. Rebases every local customization commit on top of the newest upstream HEAD, resolving conflicts in favor of the local changes where the description indicates intent.
  3. Runs the verification command. If none was supplied, infers one from the repo's build system (e.g. make test, npm test, pytest).
  4. On success, force-pushes the rebased branch and replaces the currently deployed version with the freshly built one.
  5. On failure, leaves the running version untouched and reports the conflict or failing check so a human can intervene.

Notes

  • The automation is idempotent: a clean upstream with no new commits is a no-op.
  • Force-push targets the fork's working branch only, never upstream.
  • If a rebase conflict cannot be resolved automatically, the run fails safe and the previously deployed version keeps running.

© OpenHands, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in skills/upstream-fork-sync of OpenHands/extensions.

  • SKILL.md
  • .claude-plugin
  • .codex-plugin
  • .plugin/plugin.json
  • README.md
  • commands/upstream-fork-sync-setup.md

Open the folder on GitHubat commit d008b81

Compare with similar skills

Upstream Fork Sync next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Upstream Fork Sync compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Upstream Fork Sync this skillOpenHands/extensions157—~1.1kAutomated safety check: PassMIT
Superset Automatesuperset-sh/superset15k—~1.4kAutomated safety check: PassCustom licence
Auto Promotexiaotonng/pikiloom295—~629Automated safety check: NotesMIT
Meeting Briefgooseworks-ai/goose-skills1.2k1 repos~2.3kAutomated safety check: PassMIT
Building LoopsPostHog/posthog-foss721—~3.6kAutomated safety check: PassMIT
OpenObserve PR Briefopenobserve/openobserve22k—~1.8kAutomated safety check: PassAGPL-3.0

Similar skills

  • Superset Automate

    superset-sh/superset

    Turns a recurring chore into a scheduled or event-triggered Superset agent, drafting its prompt, picking a target and trigger, and reviewing the first run.

    15k GitHub stars~1.4k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Auto Promote

    xiaotonng/pikiloom

    无人值守推广总入口。按 promo/orchestrate.md 跨所有启用渠道(GitHub / Twitter / Reddit)跑一轮:发现→去重→起草→自我批判→护栏→按 posture 发布→记录→度量。供每日 cron(schedule / loop)调用,也可手动运行。传 "post-approved" 只执行 batch 待发队列。

    295 GitHub stars~629 tokensUpdated 2 days ago
    Productivity & AutomationAuto-check: notes
  • Meeting Brief

    gooseworks-ai/goose-skills

    Daily meeting preparation system that checks your calendar each morning, deeply researches external attendees (LinkedIn, company info, GitHub, past notes), and sends you personalized briefs via…

    1.2k GitHub starsUsed in 1 repo~2.3k tokens
    Productivity & AutomationAuto-check passed
  • Building Loops

    PostHog/posthog-foss

    Official

    Build a Loop for PostHog Desktop: a workflow that creates an AI task each time its trigger fires, optionally followed by a Slack or email notification with the task's result.

    721 GitHub stars~3.6k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • OpenObserve PR Brief

    openobserve/openobserve

    Produces a read-only morning brief of your open pull requests across the openobserve GitHub org, with a next step for each and a reminder for idle ones.

    22k GitHub stars~1.8k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Sets up and manages an Aeon agent instance that runs skills on a schedule through GitHub Actions: starting, rescheduling, debugging, editing skills and mining chat history.

    767 GitHub stars~8.8k tokensUpdated yesterday
    Productivity & AutomationAuto-check: warnings

More from OpenHands/extensions

All 78 skills in this repo
  • Agent Readiness Report

    OpenHands/extensions

    Evaluate how well a codebase supports autonomous AI-assisted development.

    157 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Discord

    OpenHands/extensions

    Build and automate Discord integrations (bots, webhooks, slash commands, and REST API workflows).

    157 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • GitHub

    OpenHands/extensions

    Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUBTOKEN environment variable and GitHub CLI.

    157 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • GitHub Issue To PR

    OpenHands/extensions

    Create an automation that implements GitHub issues when a configurable trigger label is applied.

    157 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • GitHub Repo Monitor

    OpenHands/extensions

    This skill should be used when the user asks to "monitor a GitHub repository", "watch GitHub for issues or PRs", "respond to @OpenHands mentions on GitHub", "set up an OpenHands GitHub integration"…

    157 GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • GitLab Issue To Mr

    OpenHands/extensions

    Create an automation that implements GitLab issues when a configurable trigger label is applied.

    157 GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Upstream Fork Sync

What does Upstream Fork Sync do?

This skill should be used when the user asks to "keep a fork in sync", "rebase local changes on upstream", "sync my fork nightly", "long-lived fork", or "automate upstream rebases". Upstream Fork Sync is an agent skill from OpenHands/extensions. This skill should be used when the user asks to "keep a fork in sync", "rebase local changes on upstream", "sync my fork nightly", "long-lived fork", or "automate upstream rebases".

When should I use Upstream Fork Sync?

Upstream Fork Sync fits situations like: asks to keep a fork in sync; rebase local changes on upstream; sync my fork nightly; long-lived fork.

How do I install Upstream Fork Sync in Claude Code?

Run `npx skills add OpenHands/extensions --skill upstream-fork-sync -a claude-code`. Or copy the skill folder (skills/upstream-fork-sync in OpenHands/extensions) into .claude/skills/upstream-fork-sync in your project. Claude Code loads it when a task matches its description.

How do I install Upstream Fork Sync in Codex?

Run `npx skills add OpenHands/extensions --skill upstream-fork-sync -a codex`. Or copy the skill folder (skills/upstream-fork-sync in OpenHands/extensions) into .agents/skills/upstream-fork-sync in your project. Codex loads it when a task matches its description.

Can I use Upstream Fork Sync in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenHands/extensions --skill upstream-fork-sync -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/upstream-fork-sync, .gemini/skills/upstream-fork-sync, .github/skills/upstream-fork-sync and .opencode/skills/upstream-fork-sync in your project.

What does Upstream Fork Sync need to run?

Going by SKILL.md and its folder, Upstream Fork Sync needs the command-line tools its instructions call (curl, make, python3 and npm) and credentials named GITHUB_PERSONAL_ACCESS_TOKEN and OPENHANDS_AUTOMATION_API_KEY. Our summary lists: Python 3; A credential in GITHUB_PERSONAL_ACCESS_TOKEN; A credential in OPENHANDS_AUTOMATION_API_KEY.

Does Upstream Fork Sync access the network?

SKILL.md names 1 domain. In commands or code: api.github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Upstream Fork Sync safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Upstream Fork Sync use?

Upstream Fork Sync is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Upstream Fork Sync use?

About 1.1k tokens (SKILL.md is roughly 4.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Upstream Fork Sync?

Skills that share tags, products or a category with Upstream Fork Sync: Superset Automate (superset-sh/superset, 15k stars), Auto Promote (xiaotonng/pikiloom, 295 stars), Meeting Brief (gooseworks-ai/goose-skills, 1.2k stars) and Building Loops (PostHog/posthog-foss, 721 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Upstream Fork Sync?

OpenHands (a GitHub organization) maintains it in OpenHands/extensions, which has 157 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 6, 2026.

Source: OpenHands/extensions on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.