38 lines
1.4 KiB
Markdown
38 lines
1.4 KiB
Markdown
---
|
|
name: commit-work
|
|
description: Erzwingt Conventional Commits mit atomaren, imperativ formulierten Commit-Messages nach strikter Spezifikation.
|
|
---
|
|
|
|
# Skill: Conventional Commits Expert
|
|
|
|
## Purpose
|
|
Ensure all code changes are committed using the strict Conventional Commits specification.
|
|
|
|
## Rules
|
|
1. **Atomic Commits**: Stage and commit only ONE logical change at a time.
|
|
2. **Imperative Mood**: Always use the imperative present tense (e.g., "add" instead of "added" or "adds").
|
|
3. **Case & Punctuation**: Start the description with a lowercase letter. Do not end with a period.
|
|
4. **Length**: Keep the first line under 50 characters.
|
|
|
|
## Commit Message Structure
|
|
<type>(<optional scope>): <description>
|
|
|
|
[optional body]
|
|
|
|
[optional footer(s)]
|
|
|
|
## Allowed Types
|
|
- `feat`: A new feature for the user.
|
|
- `fix`: A bug fix for the user.
|
|
- `docs`: Changes to the documentation.
|
|
- `style`: Formatting, missing semi-colons, etc. (no production code change).
|
|
- `refactor`: Refactoring production code (neither fixes a bug nor adds a feature).
|
|
- `test`: Adding missing tests or correcting existing tests.
|
|
- `chore`: Updating build tasks, package manager configs, etc.
|
|
|
|
## Workflow
|
|
1. Run `git diff --cached` to see staged changes.
|
|
2. If multiple features are changed, unstage and split them.
|
|
3. Generate the commit message matching the structural rules above.
|
|
4. Execute `git commit -m "<message>"`.
|