بنقرة واحدة
create-branch
Create and checkout a new git branch with smart validation and GitHub issue integration
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Create and checkout a new git branch with smart validation and GitHub issue integration
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Smart git commit with short, concise messages
Create a GitHub issue with title and description (auto-assigned)
Push branch and create GitHub pull request (auto-assigned)
Run security audit with GitLeaks pre-commit hook setup and code analysis
Update and maintain CLAUDE.md and README.md documentation
Audit and fix Tailwind CSS anti-patterns. Enforces spacing direction (bottom-only), size-* usage, gap preference, 8px grid, and other best practices.
استنادا إلى تصنيف SOC المهني
| name | create-branch |
| description | Create and checkout a new git branch with smart validation and GitHub issue integration |
| allowed-tools | Bash(git status) Bash(git branch) Bash(git checkout) Bash(git push) Bash(git rev-parse) Bash(git ls-remote) Bash(gh issue develop) Bash(gh issue list) Bash(gh issue view) |
| metadata | {"model":"sonnet"} |
Infer language style from the project:
This command creates and checks out a new git branch with intelligent validation and GitHub issue integration.
IMPORTANT: If the user provides an issue number (e.g., "#123", "123", or "issue 123"), ALWAYS prioritise using GitHub CLI's issue development workflow:
Check for GitHub CLI availability:
gh --version
If not available, inform the user and fall back to manual branch creation.
Verify the issue exists:
gh issue view <issue-number>
Display issue title and status to confirm.
Create branch linked to issue:
gh issue develop <issue-number> -c
-c flag automatically checks out the newly created branchSkip to remote push step (step 8 below)
If no issue number is provided, follow this workflow:
git status
Verify:
Ask the user for the desired branch name. Accept input in any format - the command will handle formatting and validation.
Analyse the branch name input for keywords and automatically add appropriate prefixes:
If the user's input already starts with a recognised prefix (feature/, bugfix/, etc.), keep it as-is.
Apply comprehensive validation:
prefix/kebab-case-nameReject branch names containing:
~, ^, :, ?, *, [, ], \, @{, ..Check both local and remote branches:
# Check local branches
git branch --list "<branch-name>"
# Check remote branches
git ls-remote --heads origin "<branch-name>"
If branch exists:
Use smart defaulting:
Check if main exists:
git rev-parse --verify main
If not, check if master exists:
git rev-parse --verify master
If neither exists, use current HEAD
Allow user to specify different base branch if needed (ask before creating)
git checkout -b <validated-branch-name> <base-branch>
Confirm successful creation with a message showing:
Ask the user: "Would you like to push this branch to remote and set up tracking?"
If yes:
git push -u origin <branch-name>
This enables:
Provide clear, actionable error messages:
git init or navigate to a repository."gh) is not installed. Install it from https://cli.github.com or use manual branch creation."feature/valid-branch-name"feature/existing already exists. Switch to it with git checkout feature/existing or choose a different name."User: "Create a branch for issue #456"
Command: gh issue view 456
Output: #456 - Add user authentication (open)
Command: gh issue develop 456 -c
Output: Created and checked out branch: feature/456-add-user-authentication
User: "Create branch: fix login bug"
Analysis: Contains "fix" → apply "bugfix/" prefix
Validated: "bugfix/login-bug"
Command: git checkout -b bugfix/login-bug main
User: "Create branch: docs/update readme"
Analysis: Already has "docs/" prefix → keep as-is
Validated: "docs/update-readme"
Command: git checkout -b docs/update-readme main