agentsclimarketplace

Git checkout branch

Skill MarcoAntolini/cursor-sync/cursor-skills/git-checkout-branch

Just a repo to sync my cursor skills, rules and commands.

Install
npx -y skills add MarcoAntolini/cursor-sync --skill git-checkout-branch

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Switches to a named branch; creates a new local branch only after explicit confirmation.

SKILL.md

1.3 KB, 312 tokens by cl100k_base, as published. Nobody here has run it

Git checkout / switch branch

branch = name from this message (trimmed). If missing, ask once and stop.

Steps

  1. git status --short. If the working tree is dirty and git switch would fail, report and stop — commit/stash/discard only if the user says so in this message.
  2. git fetch --all when network is allowed (skip and say so if forbidden).
  3. Resolve and switch:
    • Local branch existsgit switch branch
    • Only on remotegit switch branch if Git tracks it unambiguously; else git switch -c branch --track origin/branch
    • Neither local nor origin/branch → authorization gate (next section)
  4. Done when: HEAD is on branch, or you stopped at a hard stop / unanswered create gate.

Authorization gate (missing branch)

  1. State that neither local nor origin/<branch> was found.
  2. Ask whether to create local branch from current HEAD (or from a base the user named).
  3. Create only on a clear yes (yes / proceed / create it). Otherwise stop.
  4. On confirm: git switch -c branch (or git switch -c branch <base> if they named a base).

Guardrails

  • No branch delete, force checkout of unrelated SHAs, or inventing names.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.