Git Commit Writer

Git Commit Writer

comcclelland Updated

File contents

Git Commit Writer

Writes conventional commit messages from staged changes.

When to Use

  • When the user asks to "commit", "write a commit message", or "stage and commit"
  • After completing a set of related changes

Process

  1. Run git diff --cached --stat to see what's staged
  2. If nothing is staged, inform the user and suggest what to stage
  3. Run git diff --cached to analyze the actual changes
  4. Write a commit message following this format:
<type>(<scope>): <short summary>

<body — what changed and why, not how>

Types

  • feat — new feature
  • fix — bug fix
  • refactor — code restructuring without behavior change
  • docs — documentation only
  • style — formatting, whitespace (no logic change)
  • test — adding or fixing tests
  • chore — build, CI, dependencies, tooling
  • perf — performance improvement

Rules

  • Summary line: imperative mood, lowercase, no period, max 72 chars
  • Body: wrap at 72 chars, explain what and why (not how)
  • If changes span multiple concerns, suggest splitting into multiple commits
  • Include Co-authored-by trailer when appropriate
  • Reference issue numbers if apparent from context (e.g., Fixes #42)

comcclelland/copilot-skills/tree/main/git-commit-writer commit 8823fd3deb

Frequently asked questions

npx skillmds@latest add comcclelland/git-commit-writer