# GIT Commit

Stage user-selected paths, confirm the exact staged set, and create one local...

- Repository: https://github.com/microsoft/hve-core (1591 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add microsoft/hve-core --skill git-commit -g -a claude-code -y`
Codex: `npx skills add microsoft/hve-core --skill git-commit -g -a codex -y`
Cursor: `npx skills add microsoft/hve-core --skill git-commit -g -a cursor -y`
Gemini CLI: `npx skills add microsoft/hve-core --skill git-commit -g -a gemini-cli -y`

## Description

Stage user-selected paths, confirm the exact staged set, and create one local Conventional Commit, or generate a commit message for staged changes without committing. Use when you want a guarded commit or a ready-to-paste message.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

<!-- cspell:ignore pathspecs unstages -->

# Git Commit

## Goal

Create one local Conventional Commit from whole paths the user selects and confirms, or generate a message for the currently staged changes without touching the index.

## Inputs

* `mode` (optional): `commit` (default) runs the select, stage, confirm, and commit protocol. `message-only` generates a message for the staged changes and never stages, unstages, or commits.

## Message Rules

Generate every message by following the `commit-message` instructions. They own types, scopes, description and body limits, and the footer line. Once generated, the message is authoritative for the commit.

## Message-Only Mode

1. Read the staged changes with `git --no-pager diff --staged`. Use the host's staged-changes tool instead when the user asks to avoid the terminal or no terminal is available.
2. When nothing is staged, output `No changes to commit.` and stop.
3. Generate the message from the complete staged diff.
4. Output the message in a fenced code block and tell the user to copy it as-is or edit it before committing.

## Commit Protocol

The rest: https://github.com/microsoft/hve-core/blob/HEAD/.github/skills/hve-core/git-commit/SKILL.md
