From 5031fdc1f8e4c31097ddec188dcf131611b1af2f Mon Sep 17 00:00:00 2001 From: Riyyi Date: Wed, 15 Apr 2026 20:24:45 +0200 Subject: [PATCH] Improve make-commit skill documentation --- .opencode/commands/commit.md | 2 +- .opencode/skills/make-commit/SKILL.md | 24 +++++++++--------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.opencode/commands/commit.md b/.opencode/commands/commit.md index 2ffc560..c8f18d8 100644 --- a/.opencode/commands/commit.md +++ b/.opencode/commands/commit.md @@ -2,4 +2,4 @@ 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 diff --git a/.opencode/skills/make-commit/SKILL.md b/.opencode/skills/make-commit/SKILL.md index 0fb0c1d..5d80888 100644 --- a/.opencode/skills/make-commit/SKILL.md +++ b/.opencode/skills/make-commit/SKILL.md @@ -16,7 +16,7 @@ Make a git commit, distinguishing between user and AI contributions. **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: > "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** + **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: ```bash git diff --staged --stat ``` Create a reasonable commit message based on the changes. - **Capitalization rule**: Commit message 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 thed user DID provide a message, format it into a proper commit message. 3. **Show commit message and confirm** - Display the commit message to the user. - Use the **question tool** to ask: > "Is this commit message okay, or would you like to make tweaks?" + > Options: - "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. -4. **Get git user config** - - ```bash - git config user.name - git config user.email - ``` - -5. **Make the commit** +4. **Make the commit** 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:** ```bash - git -c user.name="" -c user.email="" commit -m "" --author="AI Bot " + git commit -m "" --author="AI Bot " ``` (Uses git config for committer, but sets author to AI Bot)