agentleFS
nledfordnledford/engineering-review-board/skills/git-commit/SKILL.md

git-commit

Skill11 starsChanged 9 days agoMITView on GitHub

Write high-quality git commits and commit messages. Use when the user asks to commit changes, split a working tree into logical commits, improve commit messages, prepare reviewer-friendly new commits, or apply Conventional Commits guidance in any plain git repository. Do not use for amend/fixup/autosquash, branch operations, integration, recovery, push, tags, or worktrees; use git-workflows.

174 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use git-pr, github-pr-create 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 11 projects that use this

  • mjun0812Skill

    github-pr-create

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

    Also in 3 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 4 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

  • 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 6 projects that use this

  • GoogleSkill

    github-pr-review

    Review a GitHub pull request and leave inline comments in a natural human reviewing voice, indistinguishable from comments typed by hand on the GitHub web UI. Deliberately bounded to defects a reader can settle by looking at the anchored line, rather than a deep audit, so every comment is cheap for the author to check. Scales to 2-20 comments by PR size, parallelises analysis across sub-agents, drafts for approval, then posts individually with human pacing. Use when the user says "review this PR", "review PR 123", pastes a github.com/.../pull/N link, or asks for comments on a pull request. Don't use for reviewing local uncommitted changes or a diff against a branch (use the `review` skill for that).

    Also in 4 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

31 rules. 0 are common, 24 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 134 edited versions we read keep these.

  • 24

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use this skill to produce clean, maintainable, reviewer-friendly git history.

    line 8
  2. Distinctive:

    Follow local repository conventions over generic advice when they are clear.

    line 21
  3. Distinctive:

    Do not create commits unless the user or active workflow authorizes commits.

    line 22
  4. Distinctive:

    Use this skill to construct new commits: inspect changes, choose logical groups, stage intentionally, validate, write messages, commit when …

    line 27
  5. Very specific:

    Use git-workflows for amend/fixup and autosquash, branch switching, merge or rebase, cherry-pick, revert or reset, conflict and reflog …

    line 31
  6. Distinctive:

    Check project docs such as contributing guides, commit templates, hook configuration, or release notes when present.

    line 47
  7. Distinctive:

    Check established commit-signing and signoff policy.

    line 49
  8. Distinctive:

    Prefer existing style, casing, type names, scopes, ticket references, and body/footer conventions.

    line 55
  9. Distinctive:

    Do not introduce a new convention into an established repository without a clear reason.

    line 57
  10. Distinctive:

    Never stage secrets, credentials, private keys, environment files with real values, generated junk, or unrelated artifacts.

    line 67
  11. Distinctive:

    If a secret may already be staged, committed, reflog-reachable, or pushed, stop without printing it.

    line 69
  12. Distinctive:

    Commit after a coherent unit of work is complete.

    line 75
  13. Distinctive:

    Avoid committing unrelated changes together.

    line 76
  14. Distinctive:

    Avoid committing broken code unless the repository explicitly uses checkpoint or WIP commits.

    line 77
  15. Distinctive:

    Use partial staging, such as git add -p, when a file contains unrelated edits that belong in different commits.

    line 85
  16. Very specific:

    Do not use reset, restore, checkout, clean, stash, amend, or rebase to make grouping easier unless that exact operation is separately …

    line 87
  17. Distinctive:

    Run the most relevant available formatter, linter, typecheck, build, or test command when practical.

    line 92
  18. Distinctive:

    If full validation is too expensive, run focused checks for the changed area and remember the limitation for the final summary.

    line 94
  19. Distinctive:

    Before every commit, check git diff --staged and confirm only intended files are staged.

    line 96
  20. Distinctive:

    Write the commit message.

    line 99
  21. Distinctive:

    Use a concise subject line.

    line 100
  22. Very specific:

    Use imperative mood where appropriate: Add, Fix, Refactor, Remove, Document, Update.

    line 102
  23. Distinctive:

    Add a body when context, rationale, tradeoffs, side effects, migration notes, or notable implementation details matter.

    line 105
  24. Very specific:

    Avoid vague subjects such as updates, misc, fix stuff, changes, wip, or temp in durable history.

    line 109
  25. Very specific:

    Use scopes to name the affected area when helpful and consistent with the project, for example fix(parser): handle empty input.

    line 134
  26. Very specific:

    Add ! after the type or scope, such as feat(api)!: require signed tokens.

    line 139
  27. Very specific:

    Add a BREAKING CHANGE: footer explaining what changed and how users should adapt.

    line 140
  28. Distinctive:

    Use either form when local convention allows it.

    line 142
  29. Distinctive:

    Commit grouping chosen and unrelated edits kept out.

    line 163
  30. Distinctive:

    Commit message explains what changed and why.

    line 170
  31. Distinctive:

    Ask for clarification only when the desired grouping is genuinely ambiguous or risky, for example:

    line 175

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

Use this skill to produce clean, maintainable, reviewer-friendly git history. Prefer several well-scoped commits over one large mixed-purpose commit when the working tree contains separable changes.

Core Principles

  • Make each commit atomic: one coherent change, one reason, one review unit.
  • Make commits logical: related files and tests belong together; unrelated work does not.
  • Make commits reviewable: a reviewer should understand the intent from the commit message and confirm it from the diff.
  • Make history useful later: future readers should understand what changed and why without reverse-engineering every line.
  • Follow local repository conventions over generic advice when they are clear.
  • Do not create commits unless the user or active workflow authorizes commits; otherwise propose grouping and draft messages.

Scope and Routing

Use this skill to construct new commits: inspect changes, choose logical groups, stage intentionally, validate, write messages, commit when authorized, and report the result.

Use git-workflows for amend/fixup and autosquash, branch switching, merge or rebase, cherry-pick, revert or reset, conflict and reflog recovery, fetch/pull/push, remotes, tags, and worktrees. Authorization to commit never authorizes those operations or a push.

Load security-review and security-review-evidence when a commit surface includes secrets, credentialed URLs, signing trust, untrusted hooks or configuration, or other security boundaries. Use dependency-supply-chain-review for submodule, hook-tool, dependency, vendored-source, or provenance review.

Workflow

  1. Detect repository conventions.
    • Inspect recent history, for example git log --oneline -10.
    • Check project docs such as contributing guides, commit templates, hook configuration, or release notes when present.
    • Check established commit-signing and signoff policy. Follow it without changing key or trust configuration merely to complete the commit.
    • In an unfamiliar repository, inspect the effective hook source before the first commit. Treat hooks and core.hooksPath as executable configuration; stop when provenance is unclear and do not bypass trusted hooks merely to make a commit succeed.
    • Prefer existing style, casing, type names, scopes, ticket references, and body/footer conventions.
    • Do not introduce a new convention into an established repository without a clear reason.
  2. Inspect the working tree.
    • Review git status --short before staging.
    • Review unstaged changes with git diff and staged changes with git diff --staged.
    • Identify generated files, lockfiles, snapshots, vendored files, dependency updates, .gitmodules, submodule gitlinks, local machine files, editor state, and other artifacts that need extra care.
    • Never stage secrets, credentials, private keys, environment files with real values, generated junk, or unrelated artifacts.
    • If a secret may already be staged, committed, reflog-reachable, or pushed, stop without printing it. Determine the exposure class, rotate or revoke first, and coordinate any history rewrite or remote cleanup through the security skills.
  3. Choose commit groups.
    • Commit after a coherent unit of work is complete.
    • Avoid committing unrelated changes together.
    • Avoid committing broken code unless the repository explicitly uses checkpoint or WIP commits.
    • Separate formatting-only changes from behavior changes when practical.
    • Separate refactors from feature or bug-fix changes when practical.
    • Separate dependency updates from code changes when practical.
    • Separate tests from implementation when that improves reviewability; keep them together when the tests are the best evidence for the same behavior change.
    • Use partial staging, such as git add -p, when a file contains unrelated edits that belong in different commits.
    • Do not use reset, restore, checkout, clean, stash, amend, or rebase to make grouping easier unless that exact operation is separately requested and handled through git-workflows.
  4. Validate before committing.
    • Run the most relevant available formatter, linter, typecheck, build, or test command when practical.
    • If full validation is too expensive, run focused checks for the changed area and remember the limitation for the final summary.
    • Before every commit, check git diff --staged and confirm only intended files are staged.
  5. Write the commit message.
    • Use a concise subject line; aim for about 50 characters when practical and avoid exceeding 72 without a good reason.
    • Use imperative mood where appropriate: Add, Fix, Refactor, Remove, Document, Update.
    • Explain what changed and why. The diff shows how.
    • Add a body when context, rationale, tradeoffs, side effects, migration notes, or notable implementation details matter.
    • Separate subject, body, and footers with blank lines.
    • Wrap body text around 72 characters when practical.
    • Avoid vague subjects such as updates, misc, fix stuff, changes, wip, or temp in durable history.
  6. Report the result.
    • Summarize what was committed and why the grouping was chosen.
    • Include commit hashes when available.
    • State validation performed and any validation limitations.
    • Redact credentialed URLs, secrets, private keys, and sensitive hook output.

Conventional Commits

Conventional Commits is a recommended structured format when a repository uses it or when no local convention conflicts with it. It is not an unconditional requirement.

Format:

<type>[optional scope][!]: <description>

[optional body]

[optional footer(s)]

Use scopes to name the affected area when helpful and consistent with the project, for example fix(parser): handle empty input.

Breaking changes:

  • Add ! after the type or scope, such as feat(api)!: require signed tokens.
  • Add a BREAKING CHANGE: footer explaining what changed and how users should adapt.
  • Use either form when local convention allows it; use both when extra clarity helps.

Example:

fix(cache): prevent stale entries after rename

Renaming an item updated the primary record but left the old cache key in
place. Invalidate both keys so subsequent reads cannot return stale metadata.

Load references/commit-examples.md when the task needs type selection, breaking-change examples, message comparisons, or a worked mixed-tree grouping example.

Pre-Commit Checklist

  • Local convention checked.
  • Working tree inspected.
  • Signing/signoff policy and effective hooks checked when applicable.
  • Commit grouping chosen and unrelated edits kept out.
  • Secrets, local files, generated junk, and unintended artifacts excluded.
  • Lockfiles, generated files, snapshots, vendored files, and dependencies are included only when intentional and explained by the commit.
  • Submodule gitlinks and .gitmodules reviewed when present.
  • Relevant validation run, or limitation recorded.
  • Staged diff reviewed.
  • Commit message explains what changed and why.
  • Final response will summarize commits, hashes, validation, and limitations.

When to Ask the User

Ask for clarification only when the desired grouping is genuinely ambiguous or risky, for example:

  • The working tree contains unrelated user changes and it is unclear what may be committed.
  • A generated file, lockfile, snapshot, vendored file, or dependency update looks accidental.
  • The repository convention conflicts with the user's requested message style.
  • The user requested a single commit, but the changes are clearly separable and mixing them would make review or revert materially worse.
  • Hook provenance is unclear, signing policy cannot be satisfied safely, or a secret may already exist in Git history or a remote.

Otherwise, proceed with the safest coherent non-destructive grouping and explain the choice. Do not push or rewrite history as part of a commit request.

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.