--- name: ape-commit description: > Defines how to write and format git commit messages. Use this skill whenever the user asks you to write, draft, suggest, or format a git commit message, summarize changes into a commit, or help stage and describe code changes. Trigger even for casual requests like "write me a commit for this" or "what should my commit say". --- # Commit Message Style ## Format ``` - - - ``` ## Rules ### Summary line (first line) - One line only - Short and crisp -- aim for under 72 characters - Use the imperative mood: "Add feature" not "Added feature" or "Adds feature" - No trailing period - Describe *what* the commit does, not *how* ### Blank lines - Always exactly one blank line between the summary line and the bullet list (never omit it) - No blank lines between bullet list items -- the list must be tight and contiguous (single newline after each item, never an empty/blank line) - No trailing blank lines at the end of the commit message ### Bullet points - Each bullet describes a single, specific change - Short and crisp -- one line per bullet - Keep bullet items contiguous with no blank lines between them - Start each bullet with a verb in the imperative mood (Add, Fix, Remove, Update, Rename, Move, Extract, etc.) - No trailing periods - No fluff or filler words ### Never include - Blank lines between bullet list items (loose lists) - Co-author lines (no `Co-authored-by:` trailer) - `Generated by Claude` or any AI attribution - Redundant context already obvious from the diff ## Examples **Good:** ``` Add user authentication middleware - Add JWT validation to protected routes - Return 401 on missing or expired token - Extract auth logic into separate middleware file - Add unit tests for token validation ``` ``` Fix null pointer crash on empty cart checkout - Guard against null items array before totalling - Add early return when cart has no items - Log warning when checkout attempted on empty cart ``` **Bad (do not do this):** ``` Updated some stuff and fixed a few things that were broken and also added some new features to the codebase - I made some changes to the auth file because it was crashing - Also fixed the cart thing - Co-authored-by: Claude ```