mcpField
C
commit

commit

github.com/goofansuDevelopment048 installsUpdated 2w ago
Repository

About commit

A skill for reviewing repository changes and creating a Conventional Commits commit from the intended files. It emphasizes limiting scope, checking staged changes, and reporting the result.

Key features

  1. 01Inspect Git status and diffs
  2. 02Limit work to specified paths
  3. 03Stage only intended changes
  4. 04Write a Conventional Commits message
  5. 05Report commit hash and message

Use cases

  1. 01Commit selected files from a larger working tree
  2. 02Check for unrelated changes before committing
  3. 03Create a commit based on staged changes

Install

Copy the command and run it in a terminal.

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

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

Details

From the project README
  1. Infer from the prompt whether the user provided file paths, globs, or additional instructions.
  2. Review git status --short and git diff to understand the current changes. Limit inspection to the provided file paths or globs when present.
  3. Optionally run git log -n 50 --pretty=format:%s | grep -E '^[a-z]+\([^)]+\):' to identify commonly used commit scopes.
  4. Determine the intended changes:
    • If the user provided file paths or globs, use only those paths.
    • If the user did not provide file paths or globs, use all current changes.
    • If there are no intended changes to commit, do not create a commit. Report that there is nothing to commit.
    • If there are unrelated, ambiguous, generated, or risky changes, ask for clarification before committing.
  5. Stage only the intended changes.
  6. Review git diff --staged and create a Conventional Commits message based only on the staged diff.
  7. Run git commit -m "<subject>" and include -m "<body>" only when a body is useful.
  8. Run git status --short and git log -1 --oneline after committing, then report the commit hash and message.

Comments

Markdown supported