home / skills / atman36 / ai-vibe-prompts / git-workflow
This skill enforces professional Git workflows, ensuring clean commit history, proper branch naming, and effective collaboration through Conventional Commits
npx playbooks add skill atman36/ai-vibe-prompts --skill git-workflowReview the files below or copy the command above to add this skill to your agents.
---
name: git-workflow
description: Git best practices for commits, branches, pull requests, and collaboration workflows following Conventional Commits and GitFlow patterns
version: 1.0.0
author: AI-Vibe-Prompts
tags: [git, workflow, version-control, collaboration, conventional-commits]
auto_invoke: true
---
# Git Workflow Skill
## Objective
Implement professional Git workflows ensuring clean commit history, proper branch management, effective collaboration, and code review best practices.
## When to Use This Skill
Auto-invoke when:
- User mentions "commit", "push", "branch", "merge", "pull request", "PR"
- Before code changes need to be saved
- Preparing for deployment or release
- Resolving merge conflicts
## Commit Message Standards (Conventional Commits)
**Format**: `<type>(<scope>): <subject>`
**Types**: feat, fix, docs, style, refactor, perf, test, chore, ci
**Examples**:
```bash
feat(auth): add OAuth2 login support
fix(api): handle null response in user endpoint
docs(readme): update installation instructions
```
## Branch Naming: `<type>/<ticket-id>-<description>`
**Examples**:
```bash
feature/AUTH-123-oauth-integration
bugfix/CORE-456-fix-null-pointer
hotfix/PROD-789-critical-security-patch
```
## GitFlow Workflow
**Main**: production, **Develop**: integration
**Features**: branch from develop → merge to develop
**Releases**: branch from develop → merge to main+develop
**Hotfixes**: branch from main → merge to main+develop
## Pre-Commit Checklist
```bash
# No secrets
git diff --cached | grep -iE "api[_-]?key|secret|password"
# Run quality gates
npm run lint && npm run typecheck && npm run test
```
## Version History
- **1.0.0** (2025-01-03): Initial Git workflow skill
This skill encapsulates professional Git best practices for commits, branches, pull requests, and team collaboration. It enforces Conventional Commits and a GitFlow-style branching model to maintain a clear history and safe releases. The goal is predictable workflows that scale for teams and CI/CD pipelines.
The skill inspects commit messages, branch names, and workflow actions, validating them against Conventional Commits and a type-based branch naming scheme. It recommends branch creation, merge targets, and release/hotfix procedures, and runs a pre-commit checklist that checks for secrets and runs linters, type checks, and tests. When conflicts or policy violations are detected, it suggests concrete fixes and the correct sequence of git commands.
What commit types should I use?
Use Conventional Commit types like feat, fix, docs, style, refactor, perf, test, chore, and ci to express intent and support changelog generation.
Which branch should I base a feature branch on?
Base feature branches on develop. Hotfixes start from main and merge back into both main and develop.