# Commit

> Create git commits following repository style. Use when user asks to "create a commit", "commit changes", "/commit", or requests committing code to git.

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

---


# Git Commit

## Context

Run in parallel:
- `git status` (never -uall)
- `git diff HEAD`
- `git log --oneline -10`

## Message Style

Match repo's existing commit patterns from log.
- Extreme concision, sacrifice grammar for brevity
- Focus on "why" not "what"
- Imperative mood

## Workflow

1. Review status and diff
2. Analyze recent commit style from log
3. Stage files explicitly (avoid `git add .` or `-A`)
4. Commit with HEREDOC format matching repo style
5. Run `git status` after to verify

## Rules

- NEVER amend unless requested
- NEVER skip hooks
- NEVER commit secrets
- Only commit when requested
- Match existing commit patterns

