Improve make-commit skill documentation
This commit is contained in:
@@ -2,4 +2,4 @@
|
|||||||
description: Make a git commit, asking if it was by the user or AI
|
description: Make a git commit, asking if it was by the user or AI
|
||||||
---
|
---
|
||||||
|
|
||||||
skill [name=make-commit] $1
|
skill [name=make-commit] message: $1
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Make a git commit, distinguishing between user and AI contributions.
|
|||||||
|
|
||||||
**Steps**
|
**Steps**
|
||||||
|
|
||||||
1. **Ask user if this commit is by them or by AI**
|
1. **[REQUIRED] Ask user if this commit is by them or by AI**
|
||||||
|
|
||||||
Use the **question tool** to ask:
|
Use the **question tool** to ask:
|
||||||
> "Was this commit made by you or by AI?"
|
> "Was this commit made by you or by AI?"
|
||||||
@@ -27,22 +27,23 @@ Make a git commit, distinguishing between user and AI contributions.
|
|||||||
|
|
||||||
2. **Check for commit message**
|
2. **Check for commit message**
|
||||||
|
|
||||||
|
**Capitalization rule**: Commit messages should start with a capital letter,
|
||||||
|
unless it refers to a tool or project that explicitly uses lowercase as its
|
||||||
|
name (e.g., "go", "npm", "rustc").
|
||||||
|
|
||||||
If the user did NOT provide a commit message, generate one from staged changes:
|
If the user did NOT provide a commit message, generate one from staged changes:
|
||||||
```bash
|
```bash
|
||||||
git diff --staged --stat
|
git diff --staged --stat
|
||||||
```
|
```
|
||||||
Create a reasonable commit message based on the changes.
|
Create a reasonable commit message based on the changes.
|
||||||
|
|
||||||
**Capitalization rule**: Commit message should start with a capital letter,
|
If thed user DID provide a message, format it into a proper commit message.
|
||||||
unless it refers to a tool or project that explicitly uses lowercase as its
|
|
||||||
name (e.g., "go", "npm", "rustc").
|
|
||||||
|
|
||||||
3. **Show commit message and confirm**
|
3. **Show commit message and confirm**
|
||||||
|
|
||||||
Display the commit message to the user.
|
|
||||||
|
|
||||||
Use the **question tool** to ask:
|
Use the **question tool** to ask:
|
||||||
> "Is this commit message okay, or would you like to make tweaks?"
|
> "Is this commit message okay, or would you like to make tweaks?"
|
||||||
|
> <message>
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
- "Looks good" - Proceed with this message
|
- "Looks good" - Proceed with this message
|
||||||
@@ -50,14 +51,7 @@ Make a git commit, distinguishing between user and AI contributions.
|
|||||||
|
|
||||||
**If user wants tweaks**: Ask them for the new commit message.
|
**If user wants tweaks**: Ask them for the new commit message.
|
||||||
|
|
||||||
4. **Get git user config**
|
4. **Make the commit**
|
||||||
|
|
||||||
```bash
|
|
||||||
git config user.name
|
|
||||||
git config user.email
|
|
||||||
```
|
|
||||||
|
|
||||||
5. **Make the commit**
|
|
||||||
|
|
||||||
Use the commit message provided by the user.
|
Use the commit message provided by the user.
|
||||||
|
|
||||||
@@ -69,7 +63,7 @@ Make a git commit, distinguishing between user and AI contributions.
|
|||||||
|
|
||||||
**If by AI:**
|
**If by AI:**
|
||||||
```bash
|
```bash
|
||||||
git -c user.name="<git-config-name>" -c user.email="<git-config-email>" commit -m "<message>" --author="AI Bot <ai@local>"
|
git commit -m "<message>" --author="AI Bot <ai@local>"
|
||||||
```
|
```
|
||||||
(Uses git config for committer, but sets author to AI Bot)
|
(Uses git config for committer, but sets author to AI Bot)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user