gitlab-create-branch
Create a GitLab feature branch for a story. Use when the user says 'create a branch', 'start a branch for story X', or 'create feature branch' in a GitLab project.
- License 许可
- MIT
- 最近更新
- 2026-05-12
- Stars
- ★ 8
- Forks
- 1
01 前言 Front Matter
- name
- gitlab-create-branch
- description
- Create a GitLab feature branch for a story. Use when the user says 'create a branch', 'start a branch for story X', or 'create feature branch' in a GitLab project.
03 SKILL.md 正文
GitLab — Create Feature Branch
Goal
Create a feature branch for a story using the configured naming pattern. Always checks if a branch already exists first before creating.
Prerequisite Check
Check integrations.gitlab in _superml/config.yml. If missing: "Run gitlab-connect first."
Step 1: Identify Story
Ask: "Which story is this branch for?" (accept S-ID, title, or GitLab issue number)
Load the story and extract:
- Issue or ticket reference:
{ref} - Story title slug: lowercase, hyphens, max 40 chars
Step 2: Compute Branch Name
Apply the configured branch pattern:
branch_name = "feature/{ref}-{slug}"
e.g., "feature/42-add-user-authentication"
Step 3: Conflict Check
git fetch --all --quiet
git branch -a | grep -i "{branch_name}"
Or via CLI:
glab api "projects/:fullpath/repository/branches/{branch_name}" 2>/dev/null | jq '.name'
If found:
"⚠️ Branch
{branch_name}already exists. Confirm before proceeding."
⏸️ STOP — ask for confirmation.
Step 4: Create Branch
Ensure default branch is up to date:
git checkout {default_branch}
git pull origin {default_branch}
Create and push:
git checkout -b {branch_name}
git push -u origin {branch_name}
Or via CLI:
glab api -X POST "projects/:fullpath/repository/branches" \
-F "branch={branch_name}" \
-F "ref={default_branch}"
Step 5: Update Story File
Add branch reference to story frontmatter:
gitlab_branch: "{branch_name}"
branch_created: "{date}"
Done
✅ Branch
{branch_name}created and pushed to GitLab.
04 同仓库更多 Skills
jira-sync
Bulk sync all epics and stories from the local backlog to JIRA. Use when the user says 'sync to JIRA', 'push everything to JIRA', or 'create all JIRA tickets'.
jira-create-story
Create a single story ticket in JIRA from a local story file. Use when the user says 'create this story in JIRA' or 'push story to JIRA'.
jira-create-epic
Create an epic in JIRA from a planning artifact. Use when the user says 'create this epic in JIRA' or 'push epic to JIRA'.
jira-connect
Set up and verify JIRA integration. Use when the user says 'connect to JIRA', 'set up JIRA', or 'configure JIRA'.
jira-conflict-detect
Check if a story is already being worked on by another team member. Use before starting any story implementation.
gitlab-create-mr
Create a GitLab Merge Request for the current story branch. Use when the user says 'create an MR', 'open a merge request', or 'ready for review' in a GitLab project.