# Git Commit Standard

> Generates conventional commits based on file changes. Analyzes diffs and creates properly formatted commit messages.

- Skill: `majiayu000/git-commit-standard` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/git-commit-standard`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/git-commit-standard/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- 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/git-commit-standard

---


# Git Commit Standard Skill

Generate Conventional Commits based on staged changes.

## Procedure

1. Check current status:

   ```bash
   git status
   ```

2. View staged changes:

   ```bash
   git diff --staged
   ```

3. If nothing staged, view all changes:

   ```bash
   git diff
   ```

4. Analyze changes and determine commit type:

   - `feat`: New feature
   - `fix`: Bug fix
   - `docs`: Documentation only
   - `style`: Formatting, no code change
   - `refactor`: Code change that neither fixes nor adds feature
   - `perf`: Performance improvement
   - `test`: Adding or correcting tests
   - `chore`: Build process, tooling, etc.

5. Generate commit message format:

   ```
   type(scope): subject

   [optional body]

   [optional footer]
   ```

## Rules

- Subject line max 72 characters
- Use imperative mood ("add" not "added")
- No period at end of subject
- Separate subject from body with blank line
- Body should explain WHAT and WHY

## Example Output

```bash
git commit -m "feat(auth): add OAuth2 support for Google login

- Implemented Google OAuth2 flow
- Added token refresh mechanism
- Updated login page UI

Closes #123"
```

