git-branch
Use when creating a new git branch following the project's branch naming conventions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when creating a new git branch following the project's branch naming conventions.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Use when designing component interaction specs with visual states, transitions, and accessibility requirements. Covers state matrices, responsive behavior, ARIA compliance, and content constraints. Do not use for multi-step user journey mapping (use journey-mapping).
Use when mapping complete user journeys through multi-step flows, onboarding sequences, or feature workflows. Covers entry points, happy paths, alternate paths, error states, friction analysis, and delight opportunities. Do not use for individual component interaction specs (use interaction-design).
Use when analyzing an existing codebase for architecture, tech stack, conventions, and infrastructure. Covers project structure mapping, data model discovery, integration point cataloging, and constraint identification. Do not use for schema changes (use schema-design) or API contract definition (use api-design).
Use when designing documentation architecture for a project or team. Covers audience mapping, Diataxis framework classification, onboarding path design, format and location decisions, documentation testing, and maintenance scheduling. Do not use for recording individual architecture decisions (use adr-template) or creating versioned changelogs (use changelog-design).
Use when auditing codebase patterns or evaluating proposed changes for convention consistency. Covers file naming, component patterns, data fetching, state management, and type conventions. Do not use for test plan design or coverage targets (use testing-strategy).
Use when classifying data elements by sensitivity tier and defining per-tier handling requirements. Covers data inventory, sensitivity classification, PII flow mapping, encryption and masking specifications, and cross-boundary transfer documentation. Do not use for regulatory gap analysis (use compliance-review) or audit logging design (use audit-trail-design).
SOC 職業分類に基づく
| name | git-branch |
| description | Use when creating a new git branch following the project's branch naming conventions. |
| triggers | ["git branch","new branch","create branch","start feature","start bugfix"] |
| version | 1.0.0 |
| user_invocable | true |
.., shell metacharacters, or null bytes.--from): must be a valid existing ref. Reject shell metacharacters and .. traversal.Create a new branch with proper naming conventions, optionally from a specific base.
/git-branch feat/dark-mode # Create feature branch
/git-branch fix/login-bug # Create bugfix branch
/git-branch feat/api-v2 --from main # Create from specific base
/git-branch --suggest "add login" # Suggest branch name from description
| Prefix | Use For | Example |
|---|---|---|
feat/ | New features | feat/dark-mode |
fix/ | Bug fixes | fix/login-validation |
refactor/ | Code refactoring | refactor/auth-module |
docs/ | Documentation | docs/api-reference |
test/ | Test additions/fixes | test/auth-coverage |
chore/ | Maintenance tasks | chore/update-deps |
hotfix/ | Urgent production fixes | hotfix/security-patch |
BRANCH_NAME="$1"
# Check for valid prefix
if [[ ! "$BRANCH_NAME" =~ ^(feat|fix|refactor|docs|test|chore|hotfix)/ ]]; then
echo "Warning: Branch name doesn't follow conventions."
echo "Recommended prefixes: feat/, fix/, refactor/, docs/, test/, chore/, hotfix/"
fi
# Check for invalid characters
if [[ "$BRANCH_NAME" =~ [[:space:]] ]]; then
echo "Error: Branch name cannot contain spaces. Use hyphens instead."
exit 1
fi
# Check length
if [ ${#BRANCH_NAME} -gt 50 ]; then
echo "Warning: Branch name is quite long. Consider shortening."
fi
if ! git diff --quiet || ! git diff --cached --quiet; then
echo "You have uncommitted changes."
echo "Options:"
echo " /git-stash - Stash changes first"
echo " /commit - Commit changes first"
exit 1
fi
# Default to current branch, or use specified base
BASE_BRANCH="${FROM_BRANCH:-$(git branch --show-current)}"
# Fetch to ensure we have latest
git fetch origin "$BASE_BRANCH" 2>/dev/null || true
# Create branch from base
git checkout -b "$BRANCH_NAME" "$BASE_BRANCH"
# Set up tracking if base has remote
if git rev-parse --verify "origin/$BASE_BRANCH" >/dev/null 2>&1; then
echo "Created from origin/$BASE_BRANCH (latest)"
fi
Created branch: feat/dark-mode
Base: main (up to date with origin/main)
Current position: abc1234 Latest commit on main
Branch is local only. To publish:
/git-push -u
Next steps:
- Make your changes
- /commit to commit
- /git-push to publish
- /commit-push-pr to create PR
When using --suggest:
Suggested branch names for "add user login feature":
1. feat/user-login (Recommended)
2. feat/add-user-login
3. feat/login-feature
Enter your choice or provide custom name:
Branch 'feat/dark-mode' already exists.
Options:
/git-switch feat/dark-mode # Switch to existing branch
/git-branch feat/dark-mode-v2 # Create with different name
When --suggest is used, generate names based on description:
# Example: "fix the authentication bug in login form"
# Result: fix/auth-bug-login-form
-, /, _feat/JIRA-123-dark-mode--from main after pulling/git-switch to change between branches/git-branches to see all branches/commit-push-pr when ready to create PR| Path | Load Condition | Content Summary |
|---|---|---|
../../references/naming-conventions.md | Branch name validation | Branch naming convention rules and prefix definitions |