# Git Commit Writer

> Git Commit Writer

- Skill: `comcclelland/git-commit-writer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add comcclelland/git-commit-writer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/comcclelland/git-commit-writer/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: comcclelland (https://skillmd.com/u/comcclelland)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/comcclelland/git-commit-writer

---

# 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`)

