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-body-context.md

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

Commit Body for Context

Use the commit body to explain the motivation behind changes and provide additional context that isn't obvious from the code.

Bad Example

# No body when context is needed
git commit -m "fix: change timeout from 30s to 120s"
# Why? Was 30s too short? For what operation?

# Body that just repeats the subject
git commit -m "fix: update user validation

Updated the user validation."

# Body describing obvious code changes
git commit -m "refactor: rename variable

Changed 'x' to 'count' on line 45.
Changed 'y' to 'total' on line 46.
Changed 'z' to 'average' on line 47."

# No blank line between subject and body
git commit -m "feat: add caching layer
This improves performance significantly."

Good Example

# Explain the WHY, not just the WHAT
git commit -m "fix: increase API timeout from 30s to 120s

Large file uploads were failing silently because the
default 30-second timeout was too short. Analysis showed
uploads over 10MB consistently need 60-90 seconds.

Setting timeout to 120s provides buffer for network variance.

Fixes #892"

# Provide context for non-obvious decisions
git commit -m "feat: implement custom retry logic instead of using library

The popular retry-lib package has a memory leak in v2.x
(see github.com/retry-lib/issues/234) that affects long-running
processes. Our custom implementation:

- Uses exponential backoff with jitter
- Respects Retry-After headers
- Has zero dependencies

Will revisit when retry-lib v3 is stable."

# Document trade-offs and alternatives considered
git commit -m "perf: use Redis for session storage

Benchmarks showed 40% latency reduction vs. PostgreSQL
for session lookups. Considered alternatives:

- Memcached: Faster but no persistence
- In-memory: Doesn't scale across instances

Redis provides good balance of speed and durability.

See: docs/adr/005-session-storage.md"

Why

A well-written commit body is invaluable:

  1. Future Context: Six months later, you'll forget why you made certain decisions
  2. Code Review Aid: Reviewers understand intent without asking questions
  3. Onboarding Help: New team members learn project history and reasoning
  4. Debugging Support: Understanding past decisions helps when investigating issues
  5. Documentation: Commit messages are searchable, permanent documentation

What to include in the body:

  • Motivation: Why was this change necessary?
  • Approach: Why this solution over alternatives?
  • Trade-offs: What compromises were made?
  • Side Effects: Any non-obvious impacts?
  • References: Links to issues, docs, or discussions

Format guidelines:

  • Blank line between subject and body
  • Wrap at 72 characters
  • Use bullet points for lists
  • Include relevant links

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