Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .agent/skills/git-semantic-commits/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: git-semantic-commits
description: Expertise in generating semantic, context-aware, and highly organized git commits. Follows Conventional Commits 1.0.0.
---

# Git Semantic Commits Skill

Directives for analyzing changes and generating professional commit messages.

## 🔴 CORE PRINCIPLES

1. **Semantic Typing**: Use standard prefixes (`feat:`, `fix:`, `refactor:`, `style:`, `docs:`, `chore:`, `test:`, `perf:`, `ci:`).
2. **Context-Aware**: Analyze the *intent* beyond just file changes.
3. **Imperative Mood**: Use "add", "fix", "change", not "added", "fixed", "changed".
4. **Conciseness First**: Prefer a single-line `<type>(<scope>): <summary>` for simple changes.
5. **Impact Summary**: Group related changes into logical units only if a single line is insufficient.
6. **Body Only if Necessary**: Only include a body if the changes are complex and need more detail than a single line.
7. **Breaking Changes**: Use `!` (e.g., `feat!:`) and describe the breaking change in the footer.

## 🛠️ THE SEMANTIC MAP

| Type | When to Use |
|------|-------------|
| `feat` | New feature or functionality |
| `fix` | Bug fix |
| `refactor` | Code change that neither fixes a bug nor adds a feature |
| `style` | Formatting, missing semi-colons, etc. (no logic change) |
| `docs` | Documentation changes only |
| `test` | Adding missing tests or correcting existing tests |
| `perf` | Code change that improves performance |
| `chore` | Maintenance tasks, library updates, config changes |
| `ci` | Changes to CI/CD configuration files and scripts |

## 📋 WORKFLOW (FOR AGENT)

1. **Analyze Diff**: Run `git diff --cached` to see staged changes.
2. **Summarize Intent**: Determine the primary goal (e.g., "Standardizing buttons in dashboard").
3. **Draft Message**:
- **Subject**: `<type>(<scope>): <short description>` (max 50-72 chars)
- **Body**: (Optional) Bulleted list of specific changes if complex.
4. **Execute**: Propose or run `git commit -m "[message]"`.

## 🛑 BANS

- ❌ NO vague subjects like "update files" or "fix things".
- ❌ NO long subjects (keep under 72 characters).
- ❌ NO redundant descriptions in the body if the subject is clear enough.
- ❌ NO passive voice.
43 changes: 43 additions & 0 deletions .agent/workflows/git-commit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
description: Automated semantic git commit workflow
---

# /git-commit - Automated Semantic Commits

This workflow automates the process of staging changes and committing them with a context-aware semantic message.

## 🔴 PREREQUISITES

1. The `git-semantic-commits` skill must be loaded.
2. The agent must have permission to run `git` commands.

---

## 📋 STEPS

1. **Check Status**
Run `git status` to see what changes are available.

2. **Stage Changes**
// turbo
Run `git add -A` (or ask the user if they want to stage specific files).

3. **Analyze & Propose**
- Run `git diff --cached` to analyze the staged changes.
- Using the `git-semantic-commits` skill, formulate a **concise, single-line** semantic message by default.
- Present the message to the user for approval (mentioning they can ask for more detail if needed).

4. **Execute Commit**
// turbo
Once approved, run `git commit -m "[message]"`.

5. **Final Status**
Show the user the result: `[OK] Committed: [message]`.

---

## 🛠️ USAGE

```
/git-commit
```