agentleFS
igorkulmanigorkulman/pi-skills/skills/git-commit/SKILL.md

git-commit

Skill3 starsChanged 2 months agoMITView on GitHub

Create high-quality Git commits from local changes. Use when the user asks to commit, stage changes, split work into commits, or prepare commit messages.

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

18 rules. 0 are common, 15 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 134 edited versions we read keep these.

  • 15

    Distinctive

    This author's own choices. Worth a look.

  • 3

    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:

    Create clean, intentional commits directly in the current session.

    line 9
  2. Distinctive:

    Commit only changes that belong to the user's requested scope.

    line 14
  3. Distinctive:

    Keep each commit atomic and coherent.

    line 16
  4. Distinctive:

    Treat broad formatting mixed with logic, dependency updates mixed with unrelated fixes, refactors mixed with new behavior, and unrelated …

    line 17
  5. Distinctive:

    Do not mention AI assistance, agents, generated-by text, or co-authorship.

    line 19
  6. Very specific:

    Avoid prefixes such as feat:, fix:, chore:, Jira keys, ticket IDs, or bracketed labels unless explicitly requested.

    line 20
  7. Very specific:

    Never use vague messages such as Address review feedback, Fix comments, Update code, Misc changes, Cleanup, or WIP.

    line 21
  8. Distinctive:

    Do not run destructive history or worktree commands such as reset, checkout, switch, rebase, clean, amend, or squash unless the user …

    line 22
  9. Distinctive:

    Never stash changes automatically.

    line 23
  10. Distinctive:

    Use recent history to learn the repository's message tone and granularity.

    line 41
  11. Distinctive:

    Prefer path-specific or patch staging:

    line 51
  12. Distinctive:

    Avoid git add . and git add -A unless inspection confirms every changed path belongs to the same commit.

    line 58
  13. Distinctive:

    Before each commit, verify:

    line 60
  14. Distinctive:

    Do not commit a staged diff containing unrelated changes.

    line 68
  15. Distinctive:

    Use a concise, specific subject, normally imperative and under 72 characters, with no trailing period.

    line 72
  16. Distinctive:

    Add a body only when it provides useful rationale, constraints, or non-obvious behavior.

    line 80
  17. Very specific:

    When the user explicitly requests Conventional Commits or applicable repository instructions require them, use <type>(<optional-scope>): …

    line 82
  18. Distinctive:

    Create each commit with an interpolation-safe, single-quoted heredoc.

    line 86

“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

Create clean, intentional commits directly in the current session. Do not delegate the workflow to a subagent.

Core rules

  • Inspect the complete relevant staged and unstaged changes before staging anything.
  • Commit only changes that belong to the user's requested scope. If ownership is unclear, ask before staging.
  • Preserve existing staged intent unless the user asks to reorganize it.
  • Keep each commit atomic and coherent. Include tests with the production behavior they verify unless tests are independently meaningful or the user requests a separate commit.
  • Treat broad formatting mixed with logic, dependency updates mixed with unrelated fixes, refactors mixed with new behavior, and unrelated configuration changes as signals to split. Keep them together only when they serve the same indivisible purpose.
  • Split independent features, fixes, refactors, documentation, or build changes when that produces clearer commits; do not split merely by file type or file count.
  • Do not mention AI assistance, agents, generated-by text, or co-authorship.
  • Avoid prefixes such as feat:, fix:, chore:, Jira keys, ticket IDs, or bracketed labels unless explicitly requested.
  • Never use vague messages such as Address review feedback, Fix comments, Update code, Misc changes, Cleanup, or WIP.
  • Do not run destructive history or worktree commands such as reset, checkout, switch, rebase, clean, amend, or squash unless the user explicitly requests that action.
  • Never stash changes automatically. If unrelated or dirty worktree changes block the requested operation, report them and ask the user to handle them or explicitly request a stash.

Workflow

1. Inspect

Run read-only discovery:

git status --short
git branch --show-current
git diff --stat
git diff --cached --stat
git diff
git diff --cached
git log --oneline -n 20

Use recent history to learn the repository's message tone and granularity. Determine whether existing staged changes belong to the request.

2. Plan commits

Group changes by intent. If multiple reasonable groupings exist or unrelated changes are present, summarize the proposed groups and ask before staging.

A production change and its focused regression test normally belong together. Separate them only when one is useful and understandable without the other.

3. Stage precisely

Prefer path-specific or patch staging:

git add -- path/to/file
git add -p -- path/to/file

Avoid git add . and git add -A unless inspection confirms every changed path belongs to the same commit.

Before each commit, verify:

git diff --cached --name-status
git diff --cached --stat
git diff --cached

Do not commit a staged diff containing unrelated changes.

4. Write the message

Use a concise, specific subject, normally imperative and under 72 characters, with no trailing period. Describe the repository change rather than the process that prompted it.

Examples:

  • Guard notification tracking against missing payload data
  • Use injected analytics client for child-alone tracking
  • Add child-alone notification analytics coverage

Add a body only when it provides useful rationale, constraints, or non-obvious behavior.

When the user explicitly requests Conventional Commits or applicable repository instructions require them, use <type>(<optional-scope>): <description>. Keep the description imperative and lowercase after the colon. For a breaking change, add ! before the colon and explain the impact in the body, for example feat(api)!: change authentication response.

5. Commit and verify

Create each commit with an interpolation-safe, single-quoted heredoc. Use a delimiter that does not appear in the message:

git commit -F - <<'EOF'
Descriptive subject

Optional explanatory body.
EOF

This prevents $(), backticks, variables, and other message text from being evaluated by the shell without creating a shared temporary file. Do not add AI attribution or co-author trailers.

Then inspect the result:

git status --short
git log --oneline -n 5

Report each created short hash and subject, remaining uncommitted changes, and any verification that was or was not run.

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.