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-meaningful-subject.md

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

Meaningful Commit Subject Lines

Write clear, descriptive subject lines that explain WHAT changed and WHY it matters.

Bad Example

# Too vague
git commit -m "fix bug"
git commit -m "update code"
git commit -m "changes"
git commit -m "WIP"

# Too long (hard to scan in logs)
git commit -m "fix the bug where users could not log in when they had special characters in their password because the validation regex was incorrect"

# Implementation details instead of purpose
git commit -m "change line 42 in auth.js"
git commit -m "add if statement to check null"

# Meaningless references
git commit -m "fix issue"
git commit -m "address review comments"
git commit -m "final fix"
git commit -m "fix fix"

Good Example

# Clear, specific, and concise (50 chars or less ideal)
git commit -m "fix: allow special characters in passwords"

# Explains the what and implies the why
git commit -m "feat: add rate limiting to prevent API abuse"

# Specific about the affected area
git commit -m "fix(auth): handle expired JWT tokens gracefully"

# Descriptive but concise
git commit -m "perf: lazy load dashboard widgets"

# When more context needed, use body
git commit -m "fix: prevent duplicate form submissions

Users reported seeing duplicate orders when clicking
the submit button multiple times. Add debounce and
disable button after first click.

Fixes #567"

Why

Good subject lines are crucial for maintainability:

  1. Scannable History: git log --oneline becomes a useful changelog
  2. Quick Understanding: Team members can understand changes without reading code
  3. Efficient Debugging: When using git bisect, meaningful messages help identify problematic commits
  4. Documentation: Commit history serves as documentation of the project's evolution
  5. Better Tooling: GitHub, GitLab, and other tools display subject lines in many places

Guidelines for great subject lines:

  • Keep under 50 characters when possible (hard limit: 72)
  • Capitalize the first letter (after type prefix if using conventional commits)
  • No period at the end
  • Focus on "what" and "why", not "how"
  • Be specific enough to distinguish from similar 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