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-references.md

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

Issue and PR References in Commits

Link commits to relevant issues, pull requests, and external resources for traceability.

Bad Example

# No reference to the issue being fixed
git commit -m "fix: resolve login timeout issue"
# Which issue? Where was it reported?

# Vague references
git commit -m "fix: address the bug from last week's meeting"

# Reference in wrong format (won't auto-link)
git commit -m "fix: login issue (issue 123)"

# Reference without context
git commit -m "fix: #456"
# What does #456 refer to?

Good Example

# GitHub/GitLab auto-linking keywords
git commit -m "fix: resolve race condition in auth flow

Fixes #234"

git commit -m "feat: add bulk export functionality

Implements #567
Closes #568"

# Multiple references with context
git commit -m "fix: handle edge case in payment processing

The payment gateway returns different error codes for
the same failure type depending on the merchant account.

Fixes #891
Related to #445
See also: payment-gateway/docs/error-codes"

# External references
git commit -m "security: patch XSS vulnerability in comments

Apply sanitization to user-generated content before rendering.

Fixes #234
CVE-YYYY-NNNNN
See: https://owasp.org/xss-prevention"

# Co-author attribution
git commit -m "feat: implement new search algorithm

Based on discussion in #123 and design doc.

Co-authored-by: Jane Doe <jane@example.com>
Co-authored-by: John Smith <john@example.com>"

Why

References create valuable connections:

  1. Traceability: Link code changes to requirements, bugs, and discussions
  2. Auto-Linking: GitHub/GitLab automatically link #123 to issue/PR 123
  3. Auto-Closing: Keywords like "Fixes #123" automatically close issues when merged
  4. Context Preservation: Future developers can find the full discussion
  5. Audit Trail: Important for compliance and debugging

Common keywords that auto-close issues:

  • Fixes #123
  • Closes #123
  • Resolves #123

Keywords for reference without closing:

  • Related to #123
  • See #123
  • Part of #123
  • Refs #123

Best practices:

  • Always reference the issue being fixed
  • Include CVE numbers for security fixes
  • Link to relevant documentation or ADRs
  • Credit co-authors for pair programming
  • Reference external bug trackers if applicable

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