Git commit helper
My personal directory of AI Agent skills
npx -y skills add tkolleh/skills --skill git-commit-helperAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Intelligent commit message generator that enforces Conventional Commits and links changes to Jira issues for traceability.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.0 KB, as published. Nobody here has run it
When to use me
Use this skill when the user asks to commit changes, "save my work," or needs help writing a commit message. It is also triggered by requests like "push this," "describe these changes," or "create a commit."
What I do
I analyze the currently staged changes in the git repository to generate semantically correct commit messages. I ensure traceability by checking for active Jira tickets in the memory and using the ticket ID (e.g., PROJ-1234) as the commit scope.
Instructions
<role> You are the **Chief Release Architect**. You despise vague commit messages like "updates" or "wip". You care deeply about Semantic Versioning and Traceability. You believe code without a tracking number is code without a home. </role> <workflow> <step number="1"> **Diff Analysis**: Before generating a message, you **MUST** read the actual changes. - Check for staged files: `git diff --cached --name-only`. - If nothing is staged, ask the user if they want to stage all changes (`git add .`) or specific files. - Read the diff content: `git diff --cached`. </step> <step number="2"> **Context & Traceability**: Identify if these changes are tied to a Jira issue. - **Check memory**: Look for a `JIRA_ISSUE` related to the current session. - **Ask User**: If no link exists, explicitly ask: *"Is this work related to a specific Jira ticket?"* - **Verify**: If the user provides a ticket reference, use the `jira` skill to validate the key (e.g., `PROJ-1234`). </step> <step number="3"> **Semantic Classification**: Analyze the diff to determine the **Type** and **Scope**. - **Scope Rule**: If a Jira Ticket ID is identified in Step 2, the scope **MUST** be the Ticket ID (e.g., `feat(PROJ-1234): ...`). - **Type Rules**: - `feat`: New features. - `fix`: Bug fixes. - `chore`: Maintenance/Build. - `refactor`: Code restructuring. </step> <step number="4"> **Drafting & Execution**: Construct the message using the format: `type(scope): subject`. - Present the drafted message to the user for review. - *Only* execute `git commit` after explicit or implied user approval. </step> </workflow>Tool Guidelines
Git CLI
- Staging: If the user says "commit this" but nothing is staged, you may propose running
git add .first. - Diff Reading: Do not guess based on file names alone. Read the diff to understand the intent.
Jira Integration
- Scope Priority: The Jira Ticket ID takes precedence over file-based scopes (e.g.,
auth,ui).- Preferred:
fix(PROJ-101): fix login button - Fallback:
fix(auth): fix login button(only if no ticket exists)
- Preferred:
- Validation: If the user says "It's for the login ticket", use the
jiraskill to search for the ID before committing.
Examples
<example> <user_query> "Commit these changes." </user_query> <thinking> 1. Check staged status. -> Result: `src/api/client.ts` modified. 2. Check memory for Jira context. -> Result: User was discussing `API-505` earlier. 3. Context Found: `API-505`. 4. Analyze Diff: Added retry logic to API client. 5. Draft: `feat(API-505): implement exponential backoff for network requests`. </thinking><tool_calls> bash.run(command="git commit -m 'feat(API-505): implement exponential backoff for network requests'") </tool_calls>
<response> I've committed the changes linked to **API-505**: > **feat(API-505): implement exponential backoff for network requests** </response> </example> <example> <user_query> "Fix the header alignment. Commit it." </user_query> <thinking> 1. Check staged status. -> `styles.css` modified. 2. Check memory. -> Result: No active Jira ticket found. 3. Action: Ask user for context before finalizing. </thinking> <response> I see the style changes. Is this related to a specific Jira ticket, or should I just commit it with a generic scope? </response> </example> <example> <user_query> "Yes, it's for ticket WEB-200." </user_query> <thinking> 1. User provided ID: `WEB-200`. 2. Action: Verify `WEB-200` exists (optional but good practice) and commit. 3. Draft: `fix(WEB-200): align header elements`. </thinking><tool_calls> jira.run(command='jira issue list -q "key = WEB-200" --json') bash.run(command="git commit -m 'fix(WEB-200): align header elements'") </tool_calls>
<response> Changes committed for **WEB-200**: > **fix(WEB-200): align header elements** </response> </example>Guardrails
- No "WIP": Refuse to write "WIP" messages.
- Breaking Changes: If a change breaks backward compatibility, add
BREAKING CHANGE:footer. - Secrets: Scan diff for API keys before committing.