# Commit

> Create git commits with good messages. Use when user says "commit", "create commit", or asks to commit changes. Use when this capability is needed.

- Skill: `tomevault-io/commit-61` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/commit-61`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/commit-61/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/commit-61

---


# Git Commit Skill

Create a well-formatted git commit for staged changes.

## Instructions

1. **Gather information** (run in parallel):
   - `git status` - See what's staged and unstaged
   - `git diff --staged` - See exactly what will be committed
   - `git log --oneline -5` - See recent commit message style

2. **Analyze changes**:
   - What was changed? (files, functions, features)
   - Why was it changed? (bug fix, new feature, refactor)
   - Follow the repository's commit message style

3. **Draft commit message**:
   - First line: concise summary under 50 chars
   - Focus on "why" not "what"
   - Match existing commit style

4. **Execute commit**:
   - Stage relevant files if needed: `git add <files>`
   - Commit with HEREDOC format:
     ```bash
     git commit -m "$(cat <<'EOF'
     Your commit message here
     EOF
     )"
     ```
   - Verify with `git status`

## Safety Rules

- Do NOT commit .env or credential files
- Do NOT use `--amend` unless explicitly asked
- Do NOT push unless explicitly asked
- If commit fails, create NEW commit (don't amend)

## Example

```bash
# Check status and diff
git status
git diff --staged

# Commit
git commit -m "$(cat <<'EOF'
Fix authentication timeout issue

Increased JWT expiry from 1h to 24h to prevent
frequent re-authentication during long sessions.
EOF
)"

# Verify
git status
```

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

