switch
$
npx mdskill add liby/dotfiles/switchCreates a new git branch with proper naming conventions and prefixes
- Solves the task of generating and switching to a properly named git branch
- Relies on Bash and git commands for branch creation and analysis
- Analyzes git status and diff to determine branch prefix and context
- Executes a git switch command with the generated branch name
SKILL.md
.github/skills/switchView on GitHub ↗
--- name: switch description: Create a new git branch with proper prefix and naming conventions. Use when the user says "new branch", "/switch", or asks to create a branch. argument-hint: "[ticket-number] [additional context]" allowed-tools: - Bash(git:*) --- Create a new git branch based on: $ARGUMENTS ## Naming rules - Prefix: `feature/`, `bugfix/`, or `hotfix/` - If a ticket number is provided (e.g., PROJ-1234), include it after the prefix - Lowercase letters and numbers only (except uppercase ticket prefix) - Hyphens `-` to separate words, no other special characters - Period `.` only in version numbers - 3-8 words in the description, concise but descriptive, present tense - Use concrete action verbs (`add`, `fix`, `validate`, `reject`, `expose`, `migrate`). Skip vague verbs (`tighten`, `streamline`, `enhance`, `refine`, `polish`); they describe nothing. ### Examples - `feature/upgrade-react-to-version-18` - `bugfix/PROJ-3456-fix-login-redirect-issue` ## Steps 1. Analyze current changes with `git diff HEAD` and `git status --short` to determine the prefix. 2. Generate the branch name per the rules above. Include the ticket number after the prefix when available, sourced from `$ARGUMENTS` or from prior conversation context (e.g., Jira URLs, ticket IDs mentioned earlier). 3. `git switch -c <branch-name>`
More from liby/dotfiles
- deslopClosing-pass cleanup after AI edits. Removes generated code slop and catches type-driven refactors that broke runtime behavior. Closing step in the /review -> /simplify -> /deslop chain. Use when the user says "/deslop" or "deslop".
- glabAnalyze GitLab merge requests, issues, pipelines, and repos via `glab` CLI. Use when user mentions GitLab URLs, MR/issue numbers, or asks about GitLab content.
- idemcpUse IDE language server via MCP to fix diagnostics, rename symbols, find references, and organize imports. Use proactively when there are TypeScript/linting errors, or when IDE tools are more accurate than CLI equivalents.
- set-goalTurn a brief task description into an outcome-based, verifiable goal, then hand it off to `/goal`. Use when the user says "set goal", "/set-goal", "goal-driven", or asks to set up a goal for a long-running task. Replaces direct `/goal "fix the bug"` style invocations.