create-branch

Creates a new git branch from the fresh remote default branch with validated naming.

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/sagittaras/agentic-workflow --skill create-branch-sagittaras
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-branch
Source: https://github.com/sagittaras/agentic-workflow/tree/main/skills/create-branch
Command: npx skills add https://github.com/sagittaras/agentic-workflow --skill create-branch-sagittaras

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Starting work on a new feature or fix often leads to branching off the current local branch, which silently inherits stale state and unrelated commits. This Skill creates a clean working branch from the freshly fetched default branch of the remote, with a validated, meaningful name. ## Core Features & Use Cases - Fresh-base branching: Fetches the remote default branch and creates the new branch from it, never from the current branch, unless a base is explicitly specified via --base. - Name validation and collision checks: Enforces the <type>/<kebab-case-description> format (Conventional Commits types like feat, fix, docs) and detects local or remote name collisions before creating anything. - Preflight repository inspection: Reports detached HEAD state, uncommitted changes, and default branch availability so problems surface before any mutation. - Use Case: You realize you have been editing files while on the main branch. Invoke the Skill, confirm the proposed name fix/login-redirect-loop, and it creates the branch from the fresh remote default branch, carrying your uncommitted changes along. ## Quick Start Ask the assistant to create a new branch for the work you are about to start, for example by saying "create a branch for fixing the login redirect bug".

Frequently Asked Questions about create-branch

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

FAQPage Schema
How do I create a git branch from the latest remote main branch?

Run the create-branch script with a name in <type>/<description> format. It fetches the remote default branch first, then creates and checks out the new branch from that fresh ref, so you never inherit stale local state.

What branch naming convention does this Skill enforce?

Branch names must follow <type>/<kebab-case-description>, where type comes from Conventional Commits: feat, fix, docs, refactor, test, chore, ci, build, perf, or style. The description should be two to four English words describing the work.

Can I create a branch from a base other than the default branch?

Yes, the --base <ref> option creates the branch from a specified ref, preferring the remote version over a local one. It is intended for explicitly requested bases such as milestone integration branches, not for casual use.

What happens to uncommitted changes when creating a new branch?

Uncommitted changes carry over to the new branch. If git detects a conflict between those changes and the difference to the fresh base, the script aborts with a checkout_failed error and leaves you on the original branch.

Why does the new branch have no upstream after creation?

The branch is created with --no-track by design. An empty branch on the remote carries no value, so publishing is deferred to the first commit, which the companion make-commit Skill pushes on its own.