Skip to content
Back to skills

Create Branch

ASecurity

Use when creating a branch, starting work on an issue, checking out a new feature branch, or about to commit or open a PR while on main or the default branch. Validates branch naming and links to GitHub issues automatically.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 29, 2026
toolsgobashgit

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add tartinerlabs/skills --skill create-branch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Branch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Create Branch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tartinerlabs-create-branch/badge)](https://www.skillsdirectory.com/skills/tartinerlabs-create-branch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: create-branch
description: Use when creating a branch, starting work on an issue, checking out a new feature branch, or about to commit or open a PR while on main or the default branch. Validates branch naming and links to GitHub issues automatically.
license: MIT
allowed-tools: Read Bash(git remote get-url *) Bash(git branch --show-current) Bash(git branch --list *) Bash(git ls-remote *) Bash(git rev-parse *) Bash(git symbolic-ref *) Bash(git checkout -b *) Bash(gh issue list *) Bash(gh issue view *) Bash(gh issue develop *) Bash(gh pr list *) Bash(gh pr view *) Bash(glab issue list *) Bash(glab issue view *) Bash(glab mr list *)
compatibility: Requires git; issue-linking uses a GitHub (gh) or GitLab (glab) remote
metadata:
  short-description: Validated branch names linked to issues.
  title: Start work on an issue
  goal: ship-code-safely
  audience: developers
---

You create and checkout git branches with validation.

## Rules Overview

| Rule | Impact | File |
|------|--------|------|
| Branch naming | HIGH | [rules/branch-naming.md](rules/branch-naming.md) |
| Prefix detection | MEDIUM | [rules/prefix-detection.md](rules/prefix-detection.md) |

## Workflow

1. **Find the issue** so the branch is linked whenever one exists. Detect the forge from the remote (`git remote get-url origin`) and load **only** the matching guide: [references/github.md](references/github.md) for a `github.com` remote (the default), [references/gitlab.md](references/gitlab.md) for GitLab
   - Use an issue the user gave or the conversation names (`#123`, an issue URL, "fixes …")
   - Otherwise search open issues for the work's key terms, using the guide's search command. Link only a single clear match; ask when several fit; continue unlinked when none does
   - Skip the search when the user says there is no issue or the repo has issues disabled. Never create an issue here — that is the `github-issues` skill's job
2. Auto-detect prefix from user input (see [rules/prefix-detection.md](rules/prefix-detection.md)), validate name (see [rules/branch-naming.md](rules/branch-naming.md)), and check for duplicates locally and remotely. Follow the guide where the forge needs the issue number in the name to link it
3. Pick the base: `main` → `master` → current HEAD. **Exception**: when the current branch has an open unmerged PR and the new work builds on it (the user says "on top of this" / "next part", or the change depends on unmerged work), base on the current branch instead — the diff stays scoped to the new layer. **Moving work off a base branch** (called from `commit` or `create-pr` while on it): base on the current HEAD, so commits not yet pushed to the remote come along; uncommitted changes carry over on checkout either way
4. Create and checkout. When the branch has an issue and the guide gives a command that creates the branch linked to it, use that; otherwise `git checkout -b <name> <base>`
5. Offer remote push: `git push -u origin <name>`

Files in this skill

  • SKILL.md1.7 KB
  • rules/branch-naming.md598 B
  • rules/prefix-detection.md900 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.