agentleFS
ShavakanShavakan/claude-marketplace/skills/git-commit/SKILL.md

git-commit

Skill2 starsChanged 13 months agoMITView on GitHub

Create git commits with succinct technical messages. Activates when user requests git commit creation.

194 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use git-pr, git-branch and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • klauswgSkill

    git-pr

    Prepare, review, publish, or update a complete GitHub pull request for the current repository, including local commit readiness, safe push strategy, semantic title validation, repository-native PR templates, issue linking, and checks verification. Use when the user asks to draft, create, submit, publish, open, or update a pull request. Always require the user to review and explicitly approve the exact final PR before any push or GitHub write.

    Also in 13 projects that use this

  • MicrosoftSkill

    git-branch

    Branch management for implementation. Use when you need to create a branch, switch branches, checkout, or verify branching strategy before implementing code. Do not use for commits (use git-commit), pull requests (use pull-request), or advanced git operations (rebase, merge).

    Also in 6 projects that use this

  • mjun0812Skill

    github-pr-create

    Pull Requestを作成するSkill。現在のbranchからpull requestを作成する。言語指定可能。 ユーザーが「PR作って」「pull request作成して」のように依頼したら使うこと。

    Also in 3 projects that use this

  • klauswgSkill

    git-issue

    Prepare, review, create, or update evidence-based GitHub issues for the current repository with duplicate detection, repository-native templates, valid labels, and post-publication verification. Use when the user asks to draft, file, submit, publish, edit, or refine a GitHub issue, bug report, feature request, performance issue, or technical proposal. Always require the user to review and explicitly approve the exact final issue before any GitHub write.

    Also in 3 projects that use this

  • mgiovaniSkill

    docs-adr

    Create a numbered Architecture Decision Record (ADR) documenting a technical

    Also in 3 projects that use this

  • gologo13Skill

    git-push

    Push current branch to origin and sync with remote updates; keywords: git, rebase. Use only on explicit request; before execution, review diffs and list impact scope.

    Also in 8 projects that use this

  • +1 more from klauswg

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 153 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create technical commit messages, one per logical unit.

    line 8
  2. Very specific:

    Branch check: Run git branch --show-current.

    line 12
  3. Very specific:

    Run scripts/group-changes.sh (default: working tree).

    line 13
  4. Distinctive:

    Split: if one group mixes intents (e.g., a fix and an unrelated refactor in the same dir)

    line 19
  5. Distinctive:

    Merge: if two adjacent groups belong together (e.g., type changes + the code consuming them, when tightly coupled and <3 files)

    line 20
  6. Distinctive:

    Couple tests with implementation: when implementation + its tests total <3 files.

    line 21
  7. Distinctive:

    Verify: every changed file is staged exactly once across the commit sequence.

    line 23
  8. Very specific:

    If $CLAUDE_PLUGIN_ROOT isn't set, the script lives at skills/git-commit/scripts/group-changes.sh relative to this skill's plugin root.

    line 38
  9. Distinctive:

    Circular deps: if fix A requires refactor B, commit B first (minimal scope), then A.

    line 52
  10. Distinctive:

    Never: use heredoc with attribution.

    line 73
  11. Distinctive:

    Default to multiple small commits over one large commit.

    line 74
  12. Distinctive:

    Every changed file staged exactly once across the sequence.

    line 75
  13. Distinctive:

    If >6 commit units, surface the plan and ask before executing.

    line 76

“Common” is measured: kept by at least 6 in 10 of the 153 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

Git Commit

Create technical commit messages, one per logical unit. Use the bundled grouping script for the deterministic part; spend tokens on Fix/Feature/Refactor refinement and message wording.

Process

  1. Branch check. Run git branch --show-current. If on main / master and the user did not explicitly request committing there, create a feature branch first (feat/<description> or fix/<description>) and switch to it.
  2. Run scripts/group-changes.sh (default: working tree). Output is JSON:
    • files[] — every changed path with {status, type, top} where type ∈ {types, config, code, test, doc}
    • groups[] — pre-bucketed by (type, top-level dir)
    • order[] — suggested commit sequence (types → config → code → test → doc)
  3. Refine code groups. The script can't tell Fix from Feature from Refactor. For each type=code group, read the diff (git diff -- <files>) and decide:
    • Fix vs Feature vs Refactor vs Types vs Config (re-classify if the script guessed wrong)
    • Split if one group mixes intents (e.g., a fix and an unrelated refactor in the same dir)
    • Merge if two adjacent groups belong together (e.g., type changes + the code consuming them, when tightly coupled and <3 files)
  4. Couple tests with implementation when implementation + its tests total <3 files. Otherwise commit tests separately, after implementation.
  5. Stage and commit per refined unit. Use git add -p if a single file straddles two units.
  6. Verify every changed file is staged exactly once across the commit sequence.

Script invocation

# Default: full working tree (staged + unstaged + untracked)
$CLAUDE_PLUGIN_ROOT/scripts/group-changes.sh

# Only what's already staged
$CLAUDE_PLUGIN_ROOT/scripts/group-changes.sh --staged-only

# Diff against a ref (PR-style: "everything since branch point")
$CLAUDE_PLUGIN_ROOT/scripts/group-changes.sh --vs=main

If $CLAUDE_PLUGIN_ROOT isn't set, the script lives at skills/git-commit/scripts/group-changes.sh relative to this skill's plugin root.

Refinement rules

Coupling boundaries (one commit):

  • Type changes + code that uses them
  • Renames + import updates that follow
  • Implementation + its tests when <3 files total

Independence (separate commits):

  • Different modules touched in unrelated ways
  • Bug fix + unrelated refactor
  • Docs always separate unless trivially coupled to one code change

Circular deps: if fix A requires refactor B, commit B first (minimal scope), then A.

Message guidelines

Describe what changed in the code, not progress:

  • "Add null checks to user validation"
  • "Extract database logic into separate module"
  • "Fix memory leak in event handler cleanup"

Avoid milestone language:

  • ❌ "Implement user authentication feature"
  • ❌ "Continue work on API endpoints"
  • ❌ "Add tests and improve code quality"

1-2 sentences. No body unless a non-obvious why.

Hard rules

  • Never commit directly to main / master unless the user explicitly requests it.
  • Never include Co-Authored-By: Claude or Generated with Claude Code footers.
  • Never use heredoc with attribution.
  • Default to multiple small commits over one large commit.
  • Every changed file staged exactly once across the sequence.
  • If >6 commit units, surface the plan and ask before executing.

Edge cases

  • All changes one logical unit → one commit; ignore the group split.
  • Mixed intents in a single file → git add -p to stage hunks separately.
  • Script reports code for a config-like file (rare, e.g., custom build script) → manually re-classify; the heuristic is path-based.
  • Renames → script picks the destination path; rename + edits in same file land in one commit.

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.