with one click
Create new branches with naming conventions
npx skills add https://github.com/dtsong/my-claude-setup --skill git-branchCopy and paste this command into Claude Code to install the skill
Create new branches with naming conventions
npx skills add https://github.com/dtsong/my-claude-setup --skill git-branchCopy and paste this command into Claude Code to install the skill
Use to convert a Word .docx file to PDF and/or verify its page count. Triggers on: converting docx to pdf, rendering a document, checking how many pages a docx produces, or asserting a page-count constraint (e.g. a resume must stay 2 pages). Wraps LibreOffice headless conversion.
Use whenever Alan Yu is applying to a specific job and needs his resume or cover letter tailored to that opportunity. Triggers on: pasting a job description, asking 'how should I tailor this for [role]', requesting a cover letter for a specific company, asking for fit analysis between Alan's background and a posted role, or producing a .docx resume targeted at a specific employer. Do NOT use for unrelated resume work or for other people's resumes.
Use this skill when scoring or comparing a generated diagram against a human reference. Triggers on "score this diagram", "evaluate my diagram", "compare to reference", or "how accurate is this". Applies when both a generated diagram and a reference image exist and quality assessment is needed. Do NOT use for creating new diagrams (use generate-diagram) or plotting data (use generate-plot).
Use this skill when creating a methodology diagram from research text. Triggers on "make a diagram", "visualize this methodology", "diagram this process", or "generate a figure from this paper". Applies to methodology descriptions, process flows, and research paper sections. Do NOT use for scoring existing diagrams (use evaluate-diagram) or plotting data from CSV/JSON (use generate-plot).
Use this skill when creating a statistical plot or chart from a data file. Triggers on "plot this data", "make a chart", "graph this CSV", or "visualize these results". Applies to CSV, JSON, or tabular data needing bar charts, scatter plots, line graphs, or similar visualizations. Do NOT use for methodology diagrams from text (use generate-diagram) or diagram scoring (use evaluate-diagram).
Use when planning or reviewing Verilator-based simulation workflows for SystemVerilog designs. Covers lint analysis, simulation setup, trace/waveform debugging, coverage-driven verification, and C++ co-simulation. Do not use for commercial EDA tools (use verification-methodology) or RTL design flow (use chip-design-flow).
| name | Git Branch |
| description | Create new branches with 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 |