All skills
asyrafhussin avatar

/git-workflow

@b02a263

Git best practices, branching strategies, commit conventions, and PR workflows. Use when reviewing git history, writing commits, setting up branching strategy, or improving git practices. Triggers on "git best practices", "commit message", "branching strategy", or "PR workflow".

Use this Skill: https://skilld.dev/gh/asyrafhussin/agent-skills/git-workflow

This session only. Nothing lands on disk.

rulescommit-atomic-changes.md

≈539 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Atomic Commits

Each commit should represent a single, complete, logical change that can be understood and reverted independently.

Bad Example

# Multiple unrelated changes in one commit
git add .
git commit -m "fix login bug, add new dashboard feature, update styles, fix typos"

# Partial implementation that breaks the build
git commit -m "start working on user profile"
# (code doesn't compile or tests fail)

# Mixing refactoring with feature changes
git commit -m "add payment processing and refactor entire codebase"

Good Example

# Single focused change
git commit -m "fix: prevent null pointer in login validation"

# Complete feature in one commit (if small enough)
git commit -m "feat: add password strength indicator to signup form"

# Separate commits for separate concerns
git commit -m "refactor: extract validation logic to separate module"
git commit -m "feat: add email format validation"
git commit -m "test: add unit tests for email validation"

# Each commit leaves the codebase in a working state
git commit -m "feat: add user profile API endpoint"
git commit -m "feat: add user profile UI component"
git commit -m "feat: connect profile UI to API"

Why

Atomic commits provide critical benefits:

  1. Easy Reversion: If a change introduces a bug, you can revert just that commit without losing other work
  2. Clear History: Each commit tells a complete story about what changed and why
  3. Simplified Code Review: Reviewers can understand changes one logical unit at a time
  4. Bisect Friendly: git bisect works effectively when each commit is a complete, working state
  5. Cherry-Pick Ready: Individual changes can be applied to other branches without bringing unrelated code
  6. Reduced Conflicts: Smaller, focused changes are less likely to conflict with others' work

Rule of thumb: If you need "and" in your commit message to describe what you did, consider splitting it into multiple commits.

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill provides a comprehensive and secure set of guidelines for managing Git workflows, including commit message standards, branching strategies, and pull request best practices. It promotes industry-standard tools and safety measures, such as protected branches and automated linting, with no malicious patterns detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    19/32 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at b02a263. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 7 months ago
metadata
{
  "author": "AsyrafHussin",
  "version": "1.2.0"
}

README badge

README badge for asyrafhussin/agent-skills/git-workflow