Agent SkillsAgent Skills
eyadsibai

Git Workflows

@eyadsibai/Git Workflows
eyadsibai
1
1 forks
Updated 3/31/2026
View on GitHub

This skill should be used when the user asks to "create a commit", "write commit message", "create a pull request", "generate changelog", "manage branches", "git workflow", "merge strategy", "PR description", or mentions git operations and version control workflows.

Installation

$npx agent-skills-cli install @eyadsibai/Git Workflows
Claude Code
Cursor
Copilot
Codex
Antigravity

Details

Repositoryeyadsibai/ltk
Pathplugins/ltk-github/skills/git-workflows/SKILL.md
Branchmaster
Scoped Name@eyadsibai/Git Workflows

Usage

After installing, this skill will be available to your AI coding assistant.

Verify installation:

npx agent-skills-cli list

Skill Instructions


name: Git Workflows description: This skill should be used when the user asks to "create a commit", "write commit message", "create a pull request", "generate changelog", "manage branches", "git workflow", "merge strategy", "PR description", or mentions git operations and version control workflows. version: 1.0.0

Git Workflows

Comprehensive git workflow skill for commits, pull requests, branching, and changelog generation.


Commit Message Format

Conventional Commits

PartPurposeExample
TypeCategory of changefeat, fix, docs
ScopeAffected component(auth), (api)
SubjectBrief descriptionadd OAuth2 login
BodyDetails (optional)Why + what changed
FooterReferencesCloses #123

Commit Types

TypeWhen to Use
featNew feature
fixBug fix
docsDocumentation only
styleFormatting (no code change)
refactorCode restructuring
testAdding/updating tests
choreMaintenance, deps
perfPerformance improvement

Commit Analysis Workflow

  1. Run git diff --staged to see changes
  2. Identify change type (feat, fix, etc.)
  3. Determine scope (affected component)
  4. Write concise subject (< 50 chars)
  5. Add body if context needed

Pull Request Structure

PR Template Elements

SectionContent
SummaryWhat this PR does (1-2 sentences)
ChangesBullet list of specific changes
TestingHow changes were tested
ScreenshotsIf UI changes
ChecklistTests pass, docs updated

PR Analysis Workflow

  1. List commits: git log main..HEAD --oneline
  2. Identify themes across commits
  3. Note any breaking changes
  4. Check test coverage
  5. Review documentation needs

Branch Strategies

Git Flow

BranchPurpose
mainProduction code
developIntegration branch
feature/New features
release/Release preparation
hotfix/Production fixes

GitHub Flow

BranchPurpose
mainAlways deployable
feature branchesShort-lived work

Trunk-Based

BranchPurpose
mainAll development
Short branches< 1 day
Feature flagsIncomplete work

Branch Naming

PatternExample
Featurefeature/ABC-123-add-user-auth
Bugfixbugfix/ABC-456-fix-login
Hotfixhotfix/critical-security-patch
Releaserelease/v1.2.0

Changelog Format

Keep a Changelog Structure

SectionContent
AddedNew features
ChangedChanges in existing functionality
DeprecatedSoon-to-be removed features
RemovedRemoved features
FixedBug fixes
SecuritySecurity fixes

Changelog Generation Workflow

  1. Get commits since last release tag
  2. Parse commit messages for type/scope
  3. Group by category (Added, Fixed, etc.)
  4. Format with links to issues/PRs

Best Practices

Commits

PracticeWhy
Atomic commitsOne logical change per commit
Clear messagesExplain why, not just what
Reference issuesLink to related tickets
Sign commitsGPG verification

Pull Requests

PracticeWhy
Small PRs< 400 lines ideal for review
Clear titleSummarize the change
Self-review firstCheck diff before requesting
Respond promptlyAddress feedback quickly

Branches

PracticeWhy
Short-livedMerge within days
Up to dateRebase regularly
Clean historySquash before merge
Delete after mergeKeep repo clean

Merge Strategies

StrategyWhen to UseResult
Merge commitPreserve historyMerge commit node
SquashClean up messy historySingle commit
RebaseLinear historyNo merge commit
Fast-forwardSimple, linearNo merge commit

Key concept: Squash for feature branches with messy commits. Rebase for clean linear history. Merge commit when branch history matters.


Common Git Commands

Pre-Commit

CommandPurpose
git statusSee staged/unstaged changes
git diff --stagedReview what will be committed
git add -pInteractive staging

Commit

CommandPurpose
git commit -m "msg"Commit with message
git commit --amendFix last commit (before push)

Branch Management

CommandPurpose
git branch -d nameDelete merged branch
git fetch --pruneRemove stale remotes
git rebase mainUpdate branch with main

PR Workflow

CommandPurpose
git push -u origin branchPush and set upstream
gh pr createCreate PR via CLI
gh pr mergeMerge PR via CLI

Resources