# Commit

> Stage changes and create a commit with a repo-matched message. Use when committing, saying /commit, or asking for a commit without pushing.

- Skill: `sanderkorf/commit` (Agent Skill)
- Install (CLI): `npx skillmds@latest add sanderkorf/commit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sanderkorf/commit/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: sanderkorf (https://skillmd.com/u/sanderkorf)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/sanderkorf/commit

---


# Commit Changes

## Workflow

1. Run `git status` (never `-uall`)
2. Review all staged and unstaged changes (`git diff` and `git diff --staged`)
3. Analyze recent commit style from `git log`
4. Stage relevant files by name (prefer explicit paths over `git add -A`)
5. Commit with HEREDOC format
6. Verify with `git status`

## Rules

- Match repo commit style from `git log`
- Do NOT push
- NEVER skip hooks (`--no-verify`, `--no-gpg-sign`)
- Do not commit secrets (`.env`, credentials, keys)
- If pre-commit hook fails: fix issues, re-stage, create a NEW commit (never `--amend` unless explicitly requested and safe)
- If there is nothing to commit, say so and stop — do not create an empty commit

