# Git Commit

> Generate semantic commit messages based on staged changes

- Skill: `chainlesschain/git-commit` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add chainlesschain/git-commit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/chainlesschain/git-commit/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: chainlesschain (https://skillmd.com/u/chainlesschain)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/chainlesschain/git-commit

---


# Git Commit Skill

Analyzes staged changes and generates appropriate semantic commit messages.

## Usage

```
/git-commit [options]
```

## Options

- `--scope <scope>` - Specify the scope (e.g., ui, api, db)
- `--type <type>` - Override commit type (feat, fix, docs, etc.)
- `--dry-run` - Preview without committing

## Commit Types

| Type     | Description                |
| -------- | -------------------------- |
| feat     | New feature                |
| fix      | Bug fix                    |
| docs     | Documentation only         |
| style    | Formatting, no code change |
| refactor | Code restructuring         |
| test     | Adding tests               |
| chore    | Maintenance tasks          |
| perf     | Performance improvements   |

## Process

1. Reads staged changes via `git diff --cached`
2. Analyzes the nature of changes
3. Identifies affected files and scope
4. Generates semantic commit message
5. Presents for user approval
6. Commits with message

## Examples

Basic usage:

```
/git-commit
```

With scope:

```
/git-commit --scope api
```

Preview only:

```
/git-commit --dry-run
```

## Output

```
Analyzing staged changes...

Detected changes:
- 3 files modified
- 1 file added
- Primary scope: api

Suggested commit:
feat(api): add user authentication endpoint

- Add /auth/login and /auth/logout endpoints
- Implement JWT token generation
- Add rate limiting middleware

Proceed with commit? [Y/n]
```

