mcpField
G
git-commit

git-commit

github.com/dhruvanbhalaraDevelopment30131 installsUpdated 10w ago
Repository

About git-commit

git-commit is a skill for structuring automated Git commits according to Conventional Commits. It outlines a workflow for grouping changes, staging selected files, writing commit messages, and checking history.

Key features

  1. 01Group changes by logical scope
  2. 02Follow Conventional Commits
  3. 03Stage files selectively
  4. 04Write commit bodies for complex changes
  5. 05Review recent commit history

Use cases

  1. 01Split commits by feature or module
  2. 02Create structured messages for code changes
  3. 03Ensure commits contain only intended files
  4. 04Review Git history after committing

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/dhruvanbhalara/skills --skill git-commit

After installing, type/git-commitin Claude Code to confirm it loaded.

Details

From the project README

Automated Git Commits

This skill provides instructions for performing atomic, well-structured Git commits following the Conventional Commits specification.

1. Analyze Changes

  • Identify Modified Files: Run git status --short to see all staged and unstaged changes.
  • Respect Ignore Rules: Do NOT include files that the user has explicitly requested to ignore or that match .gitignore patterns.
  • Group by Scope: Group modified files by their logical "scope" (e.g., a specific module, feature, or layer like data, domain, ui).

2. Branching

  • Feature Branches: ALWAYS create descriptive feature branches from main (e.g., feat/login-logic).
  • Merge Flow: Merge back into main only after passing all quality checks and PR approval.

3. Generate Commit Message

  • Conventional Commits: Each commit MUST follow the pattern: <type>(<scope>): <message>.
    • Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.
    • Scope: The module or area being changed (e.g., auth, api).
    • Message: A concise description in imperative mood.
  • Sub-messages (Commit Body):
    • ALWAYS include a detailed body if the change involves logic, breaking changes, or multiple steps.
    • Explain the "What", "Why", and "How" of the change.
    • Use blank lines to separate the subject from the body.

3. Atomic Commits

  • One Scope per Commit: Perform separate commits for different scopes.
  • Stage Selectively: Stage only the files belonging to the current scope.

4. Execution Flow

  • Step 1: Group files by scope.
  • Step 2: For each group:
    • Stage the files.
    • Generate the conventional commit message (subject + body).
    • Execute:
      git commit -m "<subject>" -m "<body>"
      
  • Step 3: Verify history (git log -n 5).

Comments

Markdown supported