---
name: auto-commit
description: Use when you are making multiple edits or completing significant work in a git repository to automatically create commits
---

# Auto-Commit

## Overview

Create a git commit for each logical chunk of work completed. This keeps the commit history meaningful and gives you a safety net to undo if something goes wrong later.

## When to Use

- After completing a significant change (new feature, bug fix, refactor)
- After each logical step in a multi-step implementation
- Before switching context or getting interrupted
- When the diff is coherent and focused on one thing

## Do NOT commit for

- Trivial single-line fixes
- Changes that are still in progress / incomplete
- When the user explicitly says not to

## How

1. When you finish a piece of work, run `git status` and `git diff` to understand the changes
2. Use `git add` to stage relevant files
3. Create a commit with a message that explains WHAT changed and WHY (inspired by conventional commits but adapted to the project's style)
4. Run `git status` after to verify

## Commit Message Style

- First line: concise summary (max 72 chars)
  - Format: `type: short description`
  - Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `style`
- Body (optional): additional context if needed
- Reference issues or related commits if applicable
