commit

sergio-bershadsky's avatarfrom sergio-bershadsky

Create a git commit after completing a task. Use this skill after finishing a logical unit of work to commit changes with a detailed conventional commit message. Always confirms with user before applying the commit. Never pushes to remote.

⭐1stars🔀0forks📁View on GitHub🕐Updated Dec 22, 2025

When & Why to Use This Skill

This Claude skill streamlines version control workflows by automating the creation of standardized Git commits. It intelligently analyzes code changes to draft detailed messages following the Conventional Commits specification, ensuring a professional and searchable project history. By requiring explicit user confirmation and restricting actions to local commits only, it provides a secure and efficient way to manage code increments within an AI-driven development environment.

Use Cases

  • Feature Completion: Automatically generating a 'feat' type commit with a detailed breakdown of new components after finishing a development task.
  • Standardizing Commit History: Ensuring all project contributors maintain a consistent Git log format, which facilitates easier debugging and automated changelog generation.
  • Documentation Updates: Quickly saving changes to README files or technical documentation using the 'docs' convention without manual drafting.
  • Bug Fix Documentation: Summarizing complex code fixes into concise 'fix' messages that clearly identify the scope and impact of the change.
  • Safe Local Staging: Providing a 'human-in-the-loop' verification step to review diffs and commit messages before they are finalized in the local repository.
namecommit
description|
This skill should be used when the user asks to commit changes, wants help writing commit messages, or has finished a task and needs to save their work. Triggers include"commit this", "commit changes", "save my changes", "write a commit", "help me commit", "create a commit", "conventional commit", "/commit". Always confirms with user before committing. Never pushes to remote.

Commit Skill

Create conventional commits after task completion with user confirmation.

When to Use

  • After completing a task or logical unit of work
  • When the user requests a commit
  • After significant documentation updates
  • After implementing a feature or fix

Procedure

Step 1: Gather Changes

git status
git diff --stat

Step 2: Analyze Changes

Identify:

  • Files modified, added, or deleted
  • Type of change (feat, fix, docs, refactor, style, test, chore)
  • Scope (which module/area affected)
  • Breaking changes (if any)

Step 3: Draft Commit Message

Use conventional commits format:

<type>(<scope>): <short description>

<body with details>

<footer>

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation only
  • refactor: Code change that neither fixes a bug nor adds a feature
  • style: Formatting, missing semicolons, etc.
  • test: Adding or updating tests
  • chore: Maintenance tasks, dependencies

Example:

feat(auth): add password reset flow

- Add forgot password endpoint
- Implement email verification token
- Add password reset form component

Closes #123

Step 4: Show Diff and Confirm

Before committing, ALWAYS:

  1. Show the user what will be committed:
git diff --staged  # or git diff if not staged
  1. Show the proposed commit message

  2. Ask: "Ready to commit these changes? (yes/no)"

  3. Wait for explicit user approval

Step 5: Execute Commit (only after approval)

git add -A  # or specific files
git commit -m "<message>"

Step 6: Verify

git log -1 --stat

Rules

  1. NEVER push — Only commit locally, never run git push
  2. ALWAYS confirm — Never commit without explicit user approval
  3. Show diff first — User must see changes before approving
  4. One logical unit — Each commit should represent one complete change
  5. Conventional format — Always use type(scope): description format

Output Format

## Proposed Commit

**Type:** feat
**Scope:** auth
**Files:**
- src/auth/reset.ts (new)
- src/components/ResetForm.tsx (new)
- src/api/routes.ts (modified)

**Message:**

feat(auth): add password reset flow

  • Add forgot password endpoint
  • Implement email verification token
  • Add password reset form component

Closes #123


**Diff summary:**
3 files changed, 245 insertions(+)

---
Ready to commit these changes?