# Committing Staged With Message

> Generate commit message for staged changes, pause for approval, then commit. Stage files first with `git add`, then run this skill. Use when this capability is needed.

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

---


## Step 1: Analyze Staged Changes

Run these commands using the Bash tool to gather context:

- `git diff --staged --name-only` - List staged files
- `git diff --staged --stat` - Diff stats summary
- `git log --oneline -5` - Recent commit style
- `git diff --staged` - Review detailed staged changes. **Size guard**: if `--stat` shows >10 files or >500 lines changed, skip the full diff and rely on `--stat` + `--name-only` to generate the message.

## Step 2: Generate Commit Message

Use the Read tool to check `.gitmessage` for commit message format and syntax.

**The commit message body MUST include (concisely — no padding, no redundancy):**

1. **What changed**: bullet points per file or logical group
2. **Symbols added/removed** (when applicable): functions, classes, tests
3. **Diff stats**: lines added/removed (from `--stat` summary line) — MUST be the last line of the body
   - Format: `+ symbol_name`, `- symbol_name`
   - Omit for config/docs/formatting-only changes

Keep the message laser-focused. Do not repeat the subject line in the body.

## Step 3: Pause for Approval

**Please review the commit message.**

- **Approve**: "yes", "y", "commit", "go ahead"
- **Edit**: Provide your preferred message
- **Cancel**: "no", "cancel", "stop"

## Step 4: Commit

Once approved:

- `git commit --gpg-sign -m "[message]"` - Commit staged changes with approved message (GPG signature mandatory)
- `git status` - Verify success

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/qte77) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-14 -->

