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-imperative-mood.md

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

Imperative Mood in Commit Messages

Write commit messages in the imperative mood, as if giving a command or instruction.

Bad Example

# Past tense
git commit -m "fixed the login bug"
git commit -m "added user authentication"
git commit -m "updated the README"

# Present participle (-ing form)
git commit -m "fixing memory leak in cache"
git commit -m "adding support for dark mode"

# Third person present
git commit -m "fixes issue with form validation"
git commit -m "adds new API endpoint"

# Descriptive statement
git commit -m "this commit adds a new feature"
git commit -m "changes to the database schema"

Good Example

# Imperative mood - like giving a command
git commit -m "fix the login bug"
git commit -m "add user authentication"
git commit -m "update the README"

# Think: "This commit will..."
git commit -m "fix memory leak in cache"
git commit -m "add support for dark mode"

# Matches git's own conventions
git commit -m "merge branch 'feature' into main"
git commit -m "revert 'add broken feature'"

# Complete examples
git commit -m "refactor database connection handling"
git commit -m "remove deprecated API endpoints"
git commit -m "implement retry logic for failed requests"

Why

Using imperative mood provides consistency and clarity:

  1. Git's Convention: Git itself uses imperative mood ("Merge branch...", "Revert...", "Initial commit")
  2. Completes the Sentence: The message completes "If applied, this commit will..."
    • "If applied, this commit will fix the login bug" (correct)
    • "If applied, this commit will fixed the login bug" (incorrect)
  3. Conciseness: Imperative mood is typically shorter and more direct
  4. Action-Oriented: Focuses on what the commit does, not what was done
  5. Industry Standard: Most open source projects and style guides recommend this convention

Quick test: Read your commit message after "This commit will..." - if it sounds grammatically correct, you've used imperative mood.

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