Skip to content
DevBuildKit
AgentsSkillsCommandsPacksPricingDocsBlogTools
Log inGet DevBuildKit

/branch

Create or manage a well-named working branch from an up-to-date base, following the repository's branching convention. Handles uncommitted changes safely, suggests names from the task, and never deletes branches or force-pushes without explicit approval.

CommandFreev1.0.0
  1. Commands
  2. /branch

What it does

Create or manage a well-named working branch from an up-to-date base, following the repository's branching convention. Handles uncommitted changes safely, suggests names from the task, and never deletes branches or force-pushes without explicit approval.

Category
gitworkflowversion-control
Platforms
generic
Capabilities
version-controlbranch-management

Example tasks

  • /branch add rate limiting to the public API
  • /branch hotfix for the broken password reset email
  • /branch list which local branches are already merged

Works with

Related skills

  • Git Workflow· skill

Recommended alongside

  • Code Reviewer· agent

Permissions summary

  • Files

    Reads files only

  • Shell

    Runs a limited set of commands

  • Network

    No network

Permissions are declared in the component manifest and compiled into each client's tool list. Components are built for least privilege.

Supported environments

ClientSupportInstalled as
Claude CodeNative.claude/commands/<id>.md
OpenAI CodexAdapter.codex/prompts/<id>.md
CursorNative.cursor/commands/<id>.md
VS Code (Copilot)Native.github/prompts/<id>.prompt.md
Generic markdownAdapterdocs/forgekit/commands/<id>.md

Claude Code is the native reference. Other clients use adapters, so behaviour is close but not identical. See the compatibility matrix.

Included in packs

  • engineering

Full command (free preview)

This is a free component, so its complete content is public. It is exactly what gets installed (before client-specific formatting).

Create or manage a git branch for: $ARGUMENTS

Allowed git commands: status, branch (list, create, and delete only with approval), switch, checkout -b, fetch, log, diff, merge-base, stash (only with the user's consent), rev-parse, config --get. Never run push --force, reset --hard, branch -D, rebase on shared branches, or delete remote branches unless the user explicitly asks for that exact action.

  1. Detect the convention. Read CONTRIBUTING, docs/, CI branch filters, and git branch -a plus recent merged branch names to learn the prefix scheme (feat/, fix/, chore/, user/name/, ticket ids like ABC-123-) and the trunk (main, master, develop, release branches). Follow it; if there is none, use <type>/<short-kebab-description> with types matching Conventional Commits.
  2. Check current state. git status --short and git branch --show-current. If there are uncommitted changes, tell the user and offer: carry them onto the new branch (the default for switch -c, safe), commit them first with /commit, or stash. Do not discard anything.
  3. Pick the base. Identify the correct base (trunk, develop, or a release branch for hotfixes). Run git fetch and compare the local base with its upstream (git rev-list --left-right --count base...origin/base). If the local base is behind, branch from the up-to-date upstream ref or ask before fast-forwarding; never create a branch from a stale base silently.
  4. Name it. Derive a lowercase kebab-case name of at most about 50 characters from the task, include a ticket id only if the user gave one (never invent it), avoid spaces, uppercase, trailing slashes, and names that already exist locally or on the remote.
  5. Create and verify. git switch -c <name> <base>; confirm with git branch --show-current and git log --oneline -1.
  6. Other actions. For list/cleanup requests, show local branches that are merged into the trunk (git branch --merged <trunk>) and stale ones, and propose deletions as a list with the exact commands; do not run deletion without confirmation, and never touch the trunk, the current branch, or unmerged branches with unpushed work without a warning.

Constraints: do not push, set upstream, or open pull requests; mention /pr for that.

Output: the branch created (name, base commit, upstream state), how uncommitted changes were handled, the convention you followed and where you found it, and any suggested next step.

Version and changelog

Latest version 1.0.0. Requires DevBuildKit CLI 1.0.0 or newer.

Changelog — /branch

1.0.0

  • Initial release.

Build with this command

Create Demo Project

Install in CLI

$ devbuild add command branch

Dependencies are resolved automatically.

Free. Needs a free account: run devbuild login once.

IDbranch
Version1.0.0
TierFree
Arguments<task description, or an action like list or cleanup>
DevBuildKit

Your entire AI development team. One install.

DevBuildKit never uploads your source code. Telemetry is opt-in and anonymous.

Product

  • Agents
  • Skills
  • Commands
  • Packs
  • Features
  • Live demo
  • Pricing

Learn

  • Documentation
  • Getting started
  • CLI reference
  • Blog
  • Changelog
  • Compare

Free tools

  • All tools
  • Agent generator
  • Config converter
  • Stack detector
  • Context analyzer

Use cases

  • Android development
  • iOS development
  • SaaS development
  • Backend development
  • App Factory
  • Game development

Company

  • Terms
  • Privacy
  • Refunds
  • Log in
  • Sign up

© 2026 DevBuildKit. All rights reserved.

DevBuildKit is an independent product. Claude, Claude Code, Anthropic, OpenAI, Codex, ChatGPT, Cursor, Visual Studio Code, GitHub Copilot, Microsoft and all other product names are trademarks of their respective owners. DevBuildKit is not affiliated with, endorsed by or sponsored by any of them; names are used only to describe compatibility.