agentleFS
rpraharajrpraharaj/ai-engineer/skills/commit/SKILL.md

commit

Skill1 starsChanged 15 days agoMITView on GitHub

Create a git commit from the real working tree diff. Match this repository's commit-message style. Use when the user wants to commit, check in changes, or asks for a commit message. Do not push unless asked. Do not commit secrets or unrelated files.

188 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use validate-plan, act-on-feedback 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.
  • shawn-dumasSkill

    validate-plan

    Validate an orchestration plan after pre-flight certification. Runs adversarial review, deep review (verify prompt data against codebase), and PoC gate for risky approaches. Auto-invoked by orchestrate-* skills at Step 8.

    Also in 5 projects that use this

  • MicrosoftSkill

    act-on-feedback

    Act on user feedback attached to the current session. Use when the user submits feedback on the session's changes via the Submit Feedback button.

    Also in 3 projects that use this

  • decocmsSkill

    add-mcp-tools

    Guide for adding new MCP tools with consistent patterns for schemas, tool definitions, registry updates, and Better Auth integration

    Also in 3 projects that use this

  • MicrosoftSkill

    generate-run-commands

    Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.

    Also in 3 projects that use this

  • mitsuhikoSkill

    oebb-scotty

    Austrian rail travel planner (ÖBB Scotty). Use when planning train journeys in Austria, checking departures/arrivals at stations, or looking for service disruptions. Covers ÖBB trains, S-Bahn, regional trains, and connections to neighboring countries.

    Also in 3 projects that use this

  • mitsuhikoSkill

    pi-share

    Load and parse session transcripts from shittycodingagent.ai/buildwithpi.ai/buildwithpi.com/pi.dev (pi-share) URLs. Fetches gists, decodes embedded session data, and extracts conversation history.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 7

    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:

    If git is missing or this is not a repository, stop.

    line 15
  2. Distinctive:

    If there is no diff and nothing untracked that belongs in the commit, stop: nothing to commit.

    line 29
  3. Distinctive:

    If the working tree mixes two unrelated changes and the user did not say "commit everything," make one commit for the requested change only.

    line 39
  4. Distinctive:

    Do not use git add . unless the user asked to commit all remaining changes and the secret check passed.

    line 40
  5. Very specific:

    If recent commits use type(scope): subject or type: subject, use that.

    line 50
  6. Distinctive:

    If they are plain sentences, write a plain sentence.

    line 51
  7. Distinctive:

    Use a non-interactive commit.

    line 59
  8. Very specific:

    If hooks fail, fix the cause (format, lint, test).

    line 70
  9. Distinctive:

    Commit hash and subject

    line 77
  10. Very specific:

    If they also asked to open a PR, continue with open-pr.

    line 82

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

Commit

A request for a commit message authorizes a draft only: inspect the diff, write the message, and stop without staging or committing. When the user asks to commit, create one honest commit from what is actually in the tree. Do not push unless the user asked. Do not amend unless the user asked and the commit is yours and not on a shared remote.

If git is missing or this is not a repository, stop.

Inspect

Run:

git status --short
git diff
git diff --cached
git log -8 --oneline
git rev-parse --abbrev-ref HEAD

If there is no diff and nothing untracked that belongs in the commit, stop: nothing to commit.

Refuse secrets

Load engineering-bar (paths in that skill) and apply Secret files. If any match, stop and tell the user. If AGENTS.md exists, honor it too.

Stage

  • Stage only files that belong to the request the user is committing.
  • Preserve unrelated working files and pre-existing staging, including partial staging. Record the initial staged paths and patches before changing the index.
  • If the working tree mixes two unrelated changes and the user did not say "commit everything," make one commit for the requested change only. Do not silently bundle the rest.
  • Do not use git add . unless the user asked to commit all remaining changes and the secret check passed.

Immediately before committing, inspect the exact proposed commit diff, including newly added files, and repeat the secret check on that content. A plain git commit includes every staged path, even paths staged before this task.

If unrelated changes are already staged and the request covers whole files, use a path-limited commit (git commit --only -F <message-file> -- <requested-paths>) after reviewing those files' complete working-tree changes. This includes all working-tree changes in the selected files; do not use it for selected hunks or mixed-purpose files. For those, use an isolated temporary index only if you can preserve and restore the original staging exactly; otherwise stop and explain the overlap. Do not unstage the user's work merely to simplify the commit. Afterward verify both the commit contents and preserved unrelated staging.

Message

Match git log:

  • If recent commits use type(scope): subject or type: subject, use that.
  • If they are plain sentences, write a plain sentence.
  • Subject = what changed and why, from the diff, in the repo's language. No invented files.
  • Body only if the "why" does not fit the subject (migration, follow-up, risk).

Omit attribution boilerplate such as "generated by." Mention agents or models when they are the subject of the actual change.

Create the commit

Use a non-interactive commit. The plain commit below is only for an index containing exactly the authorized change. Otherwise use the path-limited or isolated-index procedure above. Prefer a here-doc so quoting stays correct:

git commit -m "$(cat <<'EOF'
subject line

optional body
EOF
)"

If hooks fail, fix the cause (format, lint, test). Do not --no-verify unless the user explicitly asked.

Done

Report:

  • Branch
  • Commit hash and subject
  • Files included
  • Files left unstaged
  • That you did not push (unless they asked and you did)

If they also asked to open a PR, continue with open-pr.

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.

Reviews can't be read right now.

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.