github-sync

Sync a local Git repository with its remote safely. Use when an agent needs to update a repo before starting work, fast-forward a local branch from `origin`, confirm that local `main` or another branch matches the remote, or prepare an up-to-date base branch before creating a new branch.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "github-sync" with this command: npx skills add mindgames/skills/mindgames-skills-github-sync

GitHub Sync

Overview

Use scripts/sync-repo.sh instead of rewriting ad-hoc git fetch and git pull logic. The script resolves the sync target, creates a local tracking branch when needed, and only performs fast-forward updates.

Workflow

  1. Check whether the user wants the remote default branch, a specific branch, or the current branch.
  2. Prefer origin unless the user explicitly asks for another remote.
  3. Run the bundled script:
scripts/sync-repo.sh
scripts/sync-repo.sh --branch main
scripts/sync-repo.sh --current
  1. If the script reports that a branch switch would be unsafe because the worktree is dirty, stop and ask the user instead of stashing, resetting, or forcing the switch.
  2. After a successful sync, use git status -sb when the user wants explicit verification.

Branch Selection

  • No flags: sync the remote default branch from origin/HEAD.
  • --branch <name>: sync that branch from origin/<name>.
  • --current: sync the currently checked out branch without switching away first.

Hard Rules

  • Never auto-stash, reset, rebase, or create a merge commit as part of sync.
  • Use fast-forward-only updates.
  • Never delete local branches or remote branches as part of sync.
  • If origin/HEAD is unavailable and no explicit branch was provided, stop and ask which branch to sync.
  • If the requested remote branch does not exist, stop and report the missing branch clearly.
  • For branch-creation workflows that must branch from updated main, run scripts/sync-repo.sh --branch main first.

Script

  • scripts/sync-repo.sh: fetches from origin, resolves the target branch, creates a local tracking branch when needed, and fast-forwards it safely.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

Repository SourceNeeds Review
169.4K96Kanthropics
Coding

remotion-best-practices

Use this skills whenever you are dealing with Remotion code to obtain the domain-specific knowledge.

Repository SourceNeeds Review
153.5K2.2Kremotion-dev
Coding

azure-ai

Service Use When MCP Tools CLI

Repository SourceNeeds Review
139.1K157microsoft
Coding

azure-deploy

AUTHORITATIVE GUIDANCE — MANDATORY COMPLIANCE

Repository SourceNeeds Review
138.7K157microsoft