feature-branch
Original:🇺🇸 English
Translated
Create a feature branch in a git worktree from a GitHub issue
2installs
Sourcesmartworkx/dev-context
Added on
NPX Install
npx skill4agent add smartworkx/dev-context feature-branchTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Create a feature branch in a new git worktree, as a sibling directory of the current project.
Steps
-
Determine the issue — the argument can be:
- A GitHub issue number or URL → fetch with
gh issue view - A description → search with to find the matching issue
gh issue list --search "<description>" - Nothing → ask the user what they're working on, then search
- A GitHub issue number or URL → fetch with
-
Generate a branch name:
- Format: (e.g.
<issue-number>-<kebab-case-summary>)42-add-user-export - Keep it under 50 characters where possible
- Format:
-
Ensureis up to date:
maingit fetch origin main
-
Create a worktree as a sibling of the current project directory:
git worktree add ../<branch-name> -b <branch-name> origin/main- This creates alongside the current project directory
../<branch-name>/
-
Confirm to the user:
- Show the branch name
- Show the worktree path
- Summarize what the issue is about
- Remind them to to start working
cd ../<branch-name>