Skip to content
Skills Library
Programming · Automation

create-branch

/create-branch

Use when the user asks to create a new branch or start work on one. Not for remote, credential, publish, deploy, or irreversible changes.

Licence
Apache-2.0
Last repository change
28.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.09.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when the user asks to create a new branch or start work on one. Not for remote, credential, publish, deploy, or irreversible changes.

Original author description

Use when the user asks to create a new branch or start work on one. Not for remote, credential, publish, deploy, or irreversible changes.

How it works

  1. Contract
  2. Inputs
  3. Procedure
  4. Failure and recovery
  5. Output
Original SKILL.md headings · 36 lines, 601 words
SKILL.md preview
---
name: create-branch
description: 'Use when the user asks to create a new branch or start work on one. Not for remote, credential, publish, deploy, or irreversible changes.'
---

# Create branch

## Contract

| Field | Bound contract |
|---|---|
| Trigger | User asks to create a new branch or start work on a new branch. |
| Authority | Reversible local: writes only one local git branch and checks it out; rollback is version control. No remote mutation. No force or history mutation. |
| Side effect | Creates a local git branch and moves HEAD onto it; rollback is `git switch -` plus `git branch -d <branch>` when the branch has no commits beyond its base. |
| Done | A branch named `<type>/<short-description>` exists on the correct base with no collisions and HEAD points at it. |

## Inputs

- Take the branch type and short description from the user request. The type follows the team convention (commonly `feature`, `fix`, `chore`, `docs`, `refactor`, `test`). The short description is lowercase and hyphen-separated, with no spaces.
- Base commit, optional. Defaults to the current branch HEAD. The user may name a branch, tag, or commit SHA.

## Procedure

1. Derive `<type>` and `<short-description>` from the user request. If either is missing or ambiguous, stop and ask the user to supply both before any mutation. Done when: both type and short-description are derived from the request or the user is asked to supply them.
2. Compose the branch name as `<type>/<short-description>`. Done when: the branch name is composed in the `<type>/<short-description>` format.
3. Resolve the base. If the user named a base, confirm it resolves with `git rev-parse --verify <base>`; if it does not resolve, stop. If no base was named, use the current branch HEAD. Done when: the base commit is resolved and verified, or an unresolvable base is reported.
4. Verify the name does not already exist: `git rev-parse --verify <branch>` must fail. If it succeeds, stop and report the collision rather than overwriting or suffixing. Done when: the branch name is confirmed not to exist, or a collision is reported.
5. Inspect the working tree with `git status --porcelain`. If uncommitted changes are present and the user has not accounted for them, stop and report the changed files so the user can stash, commit, or abort before branching. Done when: the working tree is clean or uncommitted changes are reported for user decision.
6. Create and switch in one step: `git checkout -b <type>/<short-description> <base>`. Done when: `git rev-parse --abbrev-ref HEAD` equals the new branch name and `git rev-parse HEAD` equals the resolved base commit.

## Failure and recovery
- Name collision: the branch already exists. Do not create or overwrite. Report the existing branch and its base; suggest a different name or `git switch <branch>` to reuse it.
- Invalid base: the named base does not resolve. Stop before mutation; report the unresolved ref and ask for a valid base.
- Dirty working tree: uncommitted changes would carry onto the new branch. Stop before `checkout -b`; list the changed files and let the user decide to stash, commit, or abort.
- Partial creation: if `checkout -b` created the branch but the switch failed, delete the half-created branch with `git branch -d <branch>` only when it has no commits beyond the base, then report the failure. Never force-delete a branch with divergent commits.
- Non-mutation rule: every validation in steps 3-5 runs before the mutation in step 6, so a blocked attempt leaves the repository unchanged.

## Output
On success, report the new branch name, its base commit SHA, and confirmation that HEAD points to it. If the attempt was blocked, report the failure class and exact blocker, and confirm that no branch was created.
Files in this package (2)
  • SKILL.md 4 KB
  • agents/openai.yaml 1 KB

Versions

RepositoryScoreLicence
This page · OutlineDriven/outline-driven-development90Apache-2.0
FrancoStino/opencode-skills-collection100MIT
sickn33/agentic-awesome-skills100MIT
getsentry/skills100Apache-2.0
tmj-90/gaffer100Apache-2.0
pinkpixel-dev/skills-collection-1100Apache-2.0
zte-aicloud/co-omnispec100MIT
tartinerlabs/skills90MIT

Database snapshot: 13.11.2026 · package version c358eec5d680 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 4 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100diff-scoped-browser-qa
    Use when asked to run branch-diff browser QA against a PR or branch. Not for live-URL visual audit: use web-design-review. No remote, credential, publish, deploy, or irreversible changes.
  • 100prepare-repository-for-public-release
    Use when asked to prepare a repository for public launch or open source it. Not for remote, credential, publish, deploy, or irreversible changes.
  • 100branch
    Create a working branch from what you are about to work on. Use for /branch, or any request to start a new branch before making changes.
  • 100git-branch-create
    Create a new git branch using a conventional naming scheme. Use when the user asks to create a branch, start a new branch, /git-branch-create, or signals they are beginning a discrete piece of work - "start work on X", "spin up a branch for Y", "let's start Z". Boundary: a…
  • 100branch
    Creates new git branch with corresponding spec directory structure. Triggers on keywords: create branch, new branch, branch with spec
  • 100compile-3d-workflow
    Use when the user asks for direction and a compilable 3D workflow from an interview. Not for remote, credential, publish, deploy, or irreversible changes.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.