About create-conventional-branch
A repository workflow skill for managing a single local acceptance branch during authorized implementation or cleanup. It defines branch naming, recovery, and close-out rules while preserving remote refs.
Key features
- 01Authorize branch operations
- 02Inspect repository state and claims
- 03Create or resume one acceptance branch
- 04Recover parked or interrupted work
- 05Close accepted or cancelled branches
Use cases
- 01Open a branch for an implementation task
- 02Resume work on its existing acceptance branch
- 03Preserve interrupted work during cleanup
- 04Remove a branch after acceptance or cancellation
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ beeltec/ skills --skill create-conventional-branchAfter installing, type/create-conventional-branchin Claude Code to confirm it loaded.
Bundled filesagents/openai.yaml
Details
From the project READMECreate Conventional Branch
Create, resume, recover, and remove the sole local acceptance branch.
Authorization
Create or switch branches only when $implement or $implement-with-subagents executes implementation, $to-product performs its autonomous cleanup, or the user explicitly requests a branch or pull/merge-request workflow.
Never for $setup-project, $backlog, $discuss, $wiki, or $research — those stay on the user's selected branch, even off the primary branch. Documentation or repository writes alone never justify a new branch.
Invariant
Allow only the primary branch plus one local acceptance branch. Remote refs do not count; never create, push, or delete one here. One standalone item or Epic owns the acceptance branch.
Open Or Resume
- Confirm authorization; otherwise change nothing and return control to the calling workflow.
- Read repository instructions; inspect
git status --short --branch, remotes, claims, andgit for-each-ref --format='%(refname:short)' refs/heads/. - Identify any branch whose claim matches this acceptance unit. If other non-primary branches exist, stop and list them. Under
$to-product, instead:- in each dirty checkout run
git stash push --include-untracked -m "to-product recovery <branch> <YYYYMMDDTHHMMSSZ>"; - use the matching branch as
<baseline>, otherwise primary; delete directly whengit merge-base --is-ancestor <branch> <baseline>passes orgit rev-parse <branch>^{tree}equalsgit rev-parse <baseline>^{tree}; otherwise preserve the tip withgit update-ref refs/recovery/to-product/<YYYYMMDDTHHMMSSZ>/<branch> <branch>; - record every recovery ref/stash; run
git -C <checkout> switch --detach <primary>where needed, thengit branch -D <branch>; - never alter remote refs.
- in each dirty checkout run
- After cleanup, resume only when the sole non-primary branch and claim identify this unit. Repair an interruption-expired claim under existing authority.
- Otherwise derive the task-specific name. Choose the narrowest repository-supported prefix:
feature/feat,bugfix/fix,hotfix,release, orchore. - If that name exists remotely, do not overwrite it; choose a more specific local name. Run
git switch -c <branch-name>and report it.
Close
- Accepted: switch to primary, then
git branch -d <branch-name>. Verify only primary remains before another acceptance unit starts. - Parked or cancelled: stash with
--include-untracked, preserve the tip withgit update-ref refs/recovery/<YYYYMMDDTHHMMSSZ>/<branch> <branch>, record both, release claims on primary, thengit branch -D <branch>. Resume the next sole acceptance branch from that state. - Never leave a completed or parked acceptance branch.
Naming Rules
Structure: <type>/<description>
- Only lowercase ASCII letters, numbers, and hyphens in descriptions; dots only for version numbers in release descriptions (
release/v1.2.0). - No spaces, underscores, uppercase, or other special characters; no consecutive, leading, or trailing hyphens or dots; no hyphen adjacent to a dot.
- Include a ticket identifier when applicable:
feature/issue-123-add-login. main,master, anddevelopare unprefixed trunk branches — never create them for task work.- Follow a repository's documented custom branch types when present; otherwise only the standard prefixes above.
Examples: feature/add-login-page, feat/issue-123-add-login, fix/header-overflow, hotfix/security-patch, release/v1.2.0, chore/update-dependencies.