agentleFS
tkollehtkolleh/skills/git-commit-helper/SKILL.md

git-commit-helper

Skill1 starsChanged 3 months agoMITView on GitHub

Intelligent commit message generator that enforces Conventional Commits and links changes to Jira issues for traceability.

14 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. 0 are common, 9 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user asks to commit changes, "save my work," or needs help writing a commit message.

    line 14
  2. Distinctive:

    Before generating a message, you MUST read the actual changes.

    line 28
  3. Distinctive:

    Check for staged files: git diff --cached --name-only.

    line 29
  4. Distinctive:

    If nothing is staged, ask the user if they want to stage all changes (git add .) or specific files.

    line 30
  5. Distinctive:

    Read the diff content: git diff --cached.

    line 31
  6. Very specific:

    Check memory: Look for a JIRA_ISSUE related to the current session.

    line 37
  7. Distinctive:

    Ask User: If no link exists, explicitly ask: *"Is this work related to a specific Jira ticket?"*

    line 38
  8. Very specific:

    Verify: If the user provides a ticket reference, use the jira skill to validate the key (e.g., PROJ-1234).

    line 39
  9. Very specific:

    Scope Rule: If a Jira Ticket ID is identified in Step 2, the scope MUST be the Ticket ID (e.g., feat(PROJ-1234): ...).

    line 45
  10. Distinctive:

    Staging: If the user says "commit this" but nothing is staged, you may propose running git add .

    line 64
  11. Distinctive:

    Diff Reading: Do not guess based on file names alone.

    line 65
  12. Very specific:

    Validation: If the user says "It's for the login ticket", use the jira skill to search for the ID before committing.

    line 71
  13. Very specific:

    Check staged status. -> Result: src/api/client.ts modified.

    line 81
  14. Very specific:

    Check memory for Jira context.

    line 82
  15. Very specific:

    Check staged status. -> styles.css modified.

    line 104
  16. Distinctive:

    Check memory. -> Result: No active Jira ticket found.

    line 105
  17. Very specific:

    Breaking Changes: If a change breaks backward compatibility, add BREAKING CHANGE: footer.

    line 138

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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)
  • Validation: If the user says "It's for the login ticket", use the jira skill 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.