skills/git-workflow-guide/SKILL.md
Guide Git branching strategies, branch naming, and merge operations. Use when: creating branches, merging, pull requests, Git workflow questions. Keywords: branch, merge, PR, pull request, GitFlow, GitHub Flow.
npx skillsauth add asiaostrich/universal-dev-standards git-workflow-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Language: English | 繁體中文
Version: 1.0.0 Last Updated: 2025-12-24 Applicability: Claude Code Skills
Core Standard: This skill implements Git Workflow. For comprehensive methodology documentation, refer to the core standard.
This skill provides guidance on Git branching strategies, branch naming conventions, and merge operations.
| Deployment Frequency | Recommended Strategy | |---------------------|---------------------| | Multiple times/day | Trunk-Based Development | | Weekly to bi-weekly | GitHub Flow | | Monthly or longer | GitFlow |
<type>/<short-description>
| Type | Usage | Example |
|------|-------|---------|
| feature/ | New functionality | feature/oauth-login |
| fix/ or bugfix/ | Bug fixes | fix/memory-leak |
| hotfix/ | Urgent production fixes | hotfix/security-patch |
| refactor/ | Code refactoring | refactor/extract-service |
| docs/ | Documentation only | docs/api-reference |
| test/ | Test additions | test/integration-tests |
| chore/ | Maintenance tasks | chore/update-dependencies |
| release/ | Release preparation | release/v1.2.0 |
For complete standards, see:
For AI assistants, use the YAML format files for reduced token usage:
ai/standards/git-workflow.ai.yamlai/options/git-workflow/github-flow.ai.yamlai/options/git-workflow/gitflow.ai.yamlai/options/git-workflow/trunk-based.ai.yamlai/options/git-workflow/squash-merge.ai.yamlai/options/git-workflow/merge-commit.ai.yamlai/options/git-workflow/rebase-ff.ai.yamlBefore creating a new branch:
Check for unmerged branches
git branch --no-merged main
Sync latest code
git checkout main
git pull origin main
Verify tests pass
npm test # or your project's test command
Create branch with proper naming
git checkout -b feature/description
| Strategy | When to Use |
|----------|-------------|
| Merge Commit (--no-ff) | Long-lived features, GitFlow releases |
| Squash Merge | Feature branches, clean history |
| Rebase + FF | Trunk-Based, short-lived branches |
# Good
git checkout -b feature/user-authentication
git checkout -b fix/null-pointer-in-payment
git checkout -b hotfix/critical-data-loss
# Bad
git checkout -b 123 # Not descriptive
git checkout -b Fix-Bug # Not lowercase
git checkout -b myFeature # No type prefix
# 1. Create branch from main
git checkout main
git pull origin main
git checkout -b feature/user-profile
# 2. Make changes and commit
git add .
git commit -m "feat(profile): add avatar upload"
git push -u origin feature/user-profile
# 3. Create PR and merge via GitHub/GitLab UI
# 4. Delete branch after merge
git checkout main
git pull origin main
git branch -d feature/user-profile
# 1. Update your branch with main
git checkout feature/my-feature
git fetch origin
git merge origin/main
# 2. Resolve conflicts in files
# <<<<<<< HEAD
# Your changes
# =======
# Incoming changes
# >>>>>>> origin/main
# 3. Stage resolved files
git add resolved-file.js
# 4. Complete merge
git commit -m "chore: resolve merge conflicts with main"
# 5. Test and push
npm test
git push origin feature/my-feature
This skill supports project-specific workflow configuration.
CONTRIBUTING.md for "Git Workflow" or "Branching Strategy" sectionIf no configuration found:
CONTRIBUTING.md:## Git Workflow
### Branching Strategy
This project uses **[chosen option]**.
### Branch Naming
Format: `<type>/<description>`
Example: `feature/oauth-login`, `fix/memory-leak`
### Merge Strategy
- Feature branches: **[Squash / Merge commit / Rebase]**
After /git-flow completes, the AI assistant should suggest:
Git 工作流程已設定。建議下一步 / Git workflow configured. Suggested next steps:
- 執行
git checkout -b feature/<描述>建立功能分支開始開發 ⭐ Recommended / 推薦 — 立即套用所選的分支策略 / Apply the chosen branching strategy immediately- 執行
/commit學習提交訊息規範 — 確保提交訊息格式一致 / Ensure consistent commit message format- 執行
/checkin了解簽入品質門檻 — 在提交前確保程式碼品質 / Ensure code quality before commits
| Version | Date | Changes | |---------|------|---------| | 1.0.0 | 2025-12-24 | Added: Standard sections (Purpose, Related Standards, Version History, License) |
This skill is released under CC BY 4.0.
Source: universal-dev-standards
development
[UDS] 扫描代码库的调试残留与代码质量问题;可自动修正安全模式。 Use when: before committing, during PR review, or periodic codebase cleanup. Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality, 扫描, 清理.
tools
[UDS] 从规格衍生 BDD 场景、TDD 骨架或 ATDD 表格
development
[UDS] 识别重复流程并以正确的开发深度构建 Skill
tools
[UDS] AI 辅助 git push 安全层:质量门禁 + 协作护栏。 Use when: pushing commits, force pushing, pushing to protected branches, pushing feature branches. Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation, 推送, 保护分支, 质量门禁.