# Draft Commit Message

> Draft a Conventional Commit message from current repo changes. Use this skill whenever the user asks for help writing, drafting, or formatting a commit message, especially when they refer to their git diff, staged changes, or recent work. Trigger it automatically when a user says they are "ready to commit," "finished a feature," or needs a "summary of what I did" for source control. This skill is optimized to follow Conventional Commits (type, scope, and imperative mood).

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

---


Draft a conventional commit message that matches the change summary provided by the user.

## Requirements
- Use the Conventional Commits format: `type(scope): summary`.
- Use the imperative mood in the summary (for example, `feat`, `fix`, `refactor`).
- The supported types are `bump`, `feat`, `fix`, `docs`, `refactor`, `test`, `ci`, `chore`, `perf`, and `revert`.
- The **entire first line (including type and scope)** must not exceed 72 characters.
- Do not wrap the summary line.
- If there are breaking changes, include a `BREAKING CHANGE:` footer.
- Always use **English**.

## Script
- Alway run [git-diff.sh](./scripts/git-diff.sh) script before generating a commit message.
- Run:
  - `bash scripts/git-diff.sh`
  - Optional scoped analysis: `bash scripts/git-diff.sh <path>`
- Use the script output as the primary source of truth for determining the commit type and summary.
- The script shows both staged and unstaged status, diff stats, full diffs, and untracked files.

## Output Contract
- Return commit message text only (no explanation) unless user asks for reasoning.
- Follow the exact output format in [REFERENCE.md](./references/REFERENCE.md):
  - Subject: `type(scope): summary` (<=72 chars)
  - Optional body: concise bullet points
  - Optional footer: `BREAKING CHANGE: ...`
