create-branch

create-branch is a command for Claude Code from KaelSensei/MagicAIBuilder. It costs 0 tokens per session (1,878 once invoked), scanned A, original, MIT.

An interactive command for creating a Git feature branch, which is a separate line of development for a change, using the project's naming and workflow rules.

In plain words
What is it for?
Use /create-branch when starting a feature from the main branch and you need the command to verify the repository state and guide the branch setup.
Why use it?
It checks the current branch, uncommitted changes, project progress, and required rules before branching, so existing work is not accidentally mixed into the new branch.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: installed under .agents/ (shared by several agents); mentions Cursor.

Good fit Use /create-branch when starting a feature from the main branch and you need the command to verify the repository state and guide the branch setup.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kaelsensei/magicaibuilder/create-branch
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/KaelSensei/MagicAIBuilder

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for create-branch

README.md
[![agentmods](https://agentmods.dev/badge/commands/kaelsensei/magicaibuilder/create-branch.svg)](https://agentmods.dev/commands/kaelsensei/magicaibuilder/create-branch)
Your own site
<a href="https://agentmods.dev/commands/kaelsensei/magicaibuilder/create-branch"><img src="https://agentmods.dev/badge/commands/kaelsensei/magicaibuilder/create-branch.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,878 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01878
Opus 5 $0.00000 $0.00939
Sonnet 5 $0.00000 $0.00376
Haiku 4.5 $0.00000 $0.00188

Measured 7d ago against content hash fc2cc3ee6966, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

create-branch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/commands/create-branch.md · 293 lines

How it starts

The opening of the file, as written. The whole thing — 293 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create Branch Command – Interactive Branch Creation

When /create-branch is invoked, immediately execute the following steps to interactively create a new feature branch with proper naming conventions.


Step 1: Load Project Context & Follow All Rules

  1. Assume the project root as the working directory
  2. Load and strictly follow ALL Cursor rules from .cursor/rules/*.mdc:
    • security.mdc - Security requirements
    • technical-stack.mdc - React Native/SQLite patterns
    • documentation.mdc - Documentation update requirements
    • version-management.mdc - Git commit/push workflow
    • general-principles.mdc - Project philosophy
  3. Check current git status and branch
  4. Read PROGRESS.md to understand current project state

Step 2: Check Current State

  1. Check current branch:

    git branch --show-current
    
  2. Check for uncommitted changes:

    git status
    
  3. If uncommitted changes exist:

    • Stop and ask user to commit or stash first
    • Never create branch with uncommitted changes
    • Provide options: commit now, stash, or cancel
  4. If on main/master:

    • Proceed (this is expected for creating new branches)
    • Will switch to main/master before creating branch

Step 3: Ask for Branch Name

  1. Prompt user for branch name:

    • Ask: "What would you like to name the new branch?"
    • Provide examples of good branch names
    • Explain naming conventions
  2. Wait for user input:

    • User will provide the branch name
    • Validate the name before proceeding

Step 4: Validate and Normalize Branch Name

  1. Validate branch name:

    • Must not be empty
    • Must not contain spaces (replace with hyphens)
    • Must not start with special characters
    • Must not be main, master, or protected branch names
    • Should be lowercase (convert if needed)
  2. Apply naming conventions:

    • If name doesn't start with feature/, fix/, refactor/, or docs/:
      • Ask user which type: feature, fix, refactor, or docs
      • Prepend appropriate prefix: feature/, fix/, refactor/, or docs/
    • If name already has prefix, use it as-is
    • Convert to lowercase
    • Replace spaces and underscores with hyphens
    • Remove special characters (keep only alphanumeric and hyphens)

Read the full file on GitHub · 293 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 293 lines · 0 tokens per session scan A fc2cc3ee6966

Subscribe to this mod's changes

create-branch is a command published in the GitHub repository KaelSensei/MagicAIBuilder (2 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,878 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.