# Commit

> Generate a conventional commit message based on staged changes. Use when committing code changes. Use when this capability is needed.

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

---


# Generate Commit Message

Analyze the staged changes and generate a commit message following the Conventional Commits specification.

> **Important:** Follow the Learning Mode guidelines in `_templates/learning-mode.md`

## Instructions

1. Run `git diff --staged` to see what changes are staged
2. Analyze the changes and determine:
   - The type of change (feat, fix, refactor, docs, style, test, chore, perf, ci, build)
   - The scope (optional - which part of codebase: auth, users, api, ui, etc.)
   - A concise description of what was changed

3. Generate a commit message in this format:
   ```
   <type>(<scope>): <short description>

   <optional body explaining WHY the change was made>

   <optional footer for breaking changes or issue references>
   ```

## Commit Types

| Type | When to use |
|------|-------------|
| `feat` | New feature for the user |
| `fix` | Bug fix for the user |
| `refactor` | Code restructuring without changing behavior |
| `docs` | Documentation only changes |
| `style` | Formatting, missing semicolons, etc. (no code change) |
| `test` | Adding or updating tests |
| `chore` | Build process, dependencies, configs |
| `perf` | Performance improvements |
| `ci` | CI/CD configuration changes |
| `build` | Build system or external dependencies |

## Examples

```
feat(auth): add OTP verification for email login

fix(api): handle null response from external service

refactor(users): extract validation logic to separate module

docs(readme): update installation instructions

chore(deps): upgrade prisma to v5.10
```

## Learning Mode

After generating the commit message:
1. EXPLAIN why you chose that commit type
2. EXPLAIN the scope selection
3. ASK if the user wants to modify anything before committing

## Output

Provide the commit message and ask user to confirm before executing:
```bash
git commit -m "<generated message>"
```

## After Completion

Remind user: "Nhớ update TRACKPAD.md nếu đây là milestone quan trọng!"

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

