Create, switch, and verify Git branches before starting implementation work.
This is an open-source, prompt-only Git branch management skill with no stated secrets or external endpoints, so the overall risk is low. Its instructions reference local git commands and reading a repo-local config file, which are normal development-assistance behaviors and mainly require using it only in the intended repository context.
The material explicitly states that no keys or environment variables are required, and the README does not ask for tokens, accounts, or other sensitive credentials. No clear credential leakage or abuse path is evident.
No remote endpoints are declared. The documentation mentions `git fetch origin` and checking `origin/<branch>`, but that is standard synchronization with the repository's existing Git remote rather than an extra unknown service. There is no sign of sending data to unrelated third-party endpoints.
The system flags it as prompt-only, meaning it is not itself an executable tool. The `git` and `cat` commands in the README are operational guidance for the model or user, not built-in local code-execution capability provided by the skill itself.
The material only involves reading the current repository state and a repo-local `.memory/git-config.md`, plus branch switching/creation as Git metadata operations. It does not show broad system file access, cross-project data access, or excessive permissions.
The source is an open GitHub repository associated with Microsoft, and the code is auditable, which are positive signals. However, the license is undeclared, stars are 0, and maintenance status is unknown, so community validation and ongoing support signals are weak; review the repository contents before adoption.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "git-branch" skill from askskill: 1. Download https://raw.githubusercontent.com/microsoft/devsquad-copilot/main/.github/plugins/devsquad/skills/git-branch/SKILL.md 2. Save it as ~/.claude/skills/git-branch/SKILL.md 3. Reload skills and tell me it's ready
Create a new branch named feature/login-page from main and switch to it.
Provides the Git command or steps to create and switch to the branch.
Show me how to check the current branch and list all local branches.
Provides commands to see the current branch and list local branches.
I need to fix a production hotfix bug. Help me confirm which branch to branch from and explain why.
Suggests the correct base branch, branch naming, and a brief strategy explanation.
cat .memory/git-config.md 2>/dev/null
If Branching Strategy is filled in, use the configured strategy. The detect-branching-strategy.sh hook automatically seeds on sessionStart.
If the config has Confidence: medium, confirm with the dev before using (see Detect Branching Strategy section).
Before starting implementation:
git branch --show-current
git status
git fetch origin
If on main/master/develop, check synchronization:
git rev-list HEAD..origin/<branch> --count
| Situation | Action |
|---|---|
| Branch behind (commits behind remote) | Alert and suggest pull |
| Branch with uncommitted local changes | Alert about pending changes |
| Branch up to date and clean | Proceed normally |
If the main branch is behind:
Your branch [main] is [N] commits behind the remote.
I recommend updating before creating a new branch:
[P] Pull and continue
[I] Ignore and continue anyway (not recommended)
[A] Abort implementation
| Situation | Action |
|---|---|
| Already on a feature branch (not main/master/develop) | Use current branch |
| On main/master/develop without changes with work item | Create branch automatically (see below) |
| On main/master/develop without changes without work item | Ask if they want to create a branch |
| On main/master/develop with changes | Alert and ask how to proceed |
When the source of work is a GitHub issue or Azure DevOps work item, create the branch automatically.
Naming convention:
feature/<id>-<short-description>
Rules for <short-description>:
Examples:
| Work Item | Branch |
|---|---|
| #42 "Implement user authentication" | feature/42-user-authentication |
| #108 "Add rate limiting to API endpoints" | feature/108-rate-limiting-api |
| WI 5678 "Create financial reports endpoint" | feature/5678-financial-reports-endpoint |
Action: Create branch and inform the user:
Branch created: feature/<id>-<short-description>
[C] Continue with this branch
[R] Rename branch: _
The user can rename, but the flow does not block waiting for confirmation to create.
When the source is tasks.md (without issue/work item), ask the user:
You are on the main branch. Do you want me to create a branch for this implementation?
Suggestion: feature/<short-description>
[S] Yes, create suggested branch
[N] No, continue on current branch
[C] Create with another name: _
If the user is already on a feature branch, use the current branch without additional questions.
When .memory/git-config.md does not exist or does not have Branching Strategy, detect automatically:
# 1. Default branch
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
# 2. Does develop branch exist?
HAS_DEVELOP=$(git ls-remote --heads origin develop 2>/dev/null | grep -q develop && echo "yes" || echo "no")
# 3. Do release/* or hotfix/* branches exist? (GitFlow pattern)
HAS_GITFLOW_BRANCHES=$(git branch -r 2>/dev/null | grep -qE '(release|hotfix)/' && echo "yes" || echo "no")
develop | release/* or hotfix/* | Strategy | Confidence | Action |
|---|---|---|---|---|
| Yes | Yes | GitFlow | High | Save and inform |
| Yes | No | GitFlow | Medium | Ask to confirm |
| No | No | Trunk-Based | High | Save and inform |
High confidence — save automatically and inform:
…
Systematically triage failures and fix broken builds or unexpected runtime issues.
Design and review software architecture diagrams for clearer, documentation-friendly visuals.
Initialize projects or verify and generate up-to-date SDD documentation templates.
Verify and create standard community and governance files for new projects.
Verify assignee, dependencies, priority, and capacity before starting a work item.
Standardize formatting and writing style for project Markdown documentation.
Finalize completed work by committing, pushing, and opening reviewed pull requests.
Search Branch official API docs inside AI clients for faster integration guidance.
Helps decide merge, PR, or cleanup steps after branch work is complete.
Helps developers finish a branch with merge, PR, or cleanup workflows.
Generate standardized Git commits from diffs with logical grouping support.
Sync your current branch with upstream by pulling, rebasing, pushing, or publishing.