branch

Switch Git branches safely by stashing or temporarily committing uncommitted changes.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/LarryHsiao/Skadi --skill branch-larryhsiao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: branch
Source: https://github.com/LarryHsiao/Skadi/tree/main/skills/branch
Command: npx skills add https://github.com/LarryHsiao/Skadi --skill branch-larryhsiao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Switches safely between git branches while preserving in-progress work and preventing accidental loss of changes.

Core Features & Use Cases

  • Safely handle uncommitted changes by either temporarily staging and committing ("temp") or stashing before checkout.
  • Resolve target branches interactively when not provided, with clear guidance for common branches like dev, demo, and release.
  • Enforce post-switch updates to keep local and remote branches aligned.

Quick Start

Switch to the target branch while safely handling uncommitted changes using the default temp strategy or the user-selected stash option.

Frequently Asked Questions about branch

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

FAQPage Schema
How do I switch git branches without losing uncommitted work?

To switch git branches without losing uncommitted work, you can automatically stash or temporarily commit changes before checkout. This Skill automates that safeguard by handling in-progress changes using a temp or stash strategy, ensuring a safe branch switch.

What is the best way to handle uncommitted changes before a git checkout?

The best way to handle uncommitted changes before a git checkout is using a stash or temp commit strategy. This Skill resolves the target branch and applies pre-switch handling to prevent accidental loss of changes during local version-control workflows.

Can I automatically stash changes when switching git branches?

Yes, you can automatically stash changes when switching git branches. This Skill implements argument parsing and target resolution to apply a user-selected stash option, safely setting aside uncommitted changes before executing the branch checkout.

Does safe branch switching enforce post-switch updates for local and remote branches?

Safe branch switching does enforce post-switch updates for local and remote branches. After handling uncommitted changes and completing the checkout, this Skill runs git commands to keep your local and remote branches aligned.

How do I interactively resolve a target git branch when none is specified?

To interactively resolve a target git branch when none is specified, this Skill provides clear guidance for common branches like dev, demo, and release. It automates target resolution before handling uncommitted changes and switching branches.