commit-message
Installation
SKILL.md
Git Commit Message
Instructions
When this skill is invoked, follow these steps:
- Check if there are staged changes: Run
git status - If the output of
git statuscontainsChanges not staged for commit, then:- Generate an interactive yes/no prompt artifact asking "You have unstaged changes. Would you like me to stage your changes?"
- Upon confirmation, proceed by adding the staged changes
- If the output of
git statuscontainsnothing to commit, working tree clean, then:- Display response to the user: "No changes found. Please make changes to your files before trying to commit."
- Stop and exit the skill.
- Only proceed if all changes have been staged, and there are no unstaged changes.
- Check current branch: Run
git branch --show-currentto determine the current branch.- If the current branch is
mainormasterordevordevelopment:- Inform the user they are committing directly to the mainline branch
- Generate an interactive yes/no prompt artifact asking "You're on the
<branch>branch. Would you like me to create the branch<branch-name>for this commit?" Mention the new branch name. - Upon confirmation:
- If the current branch is
Related skills