agentleFS
drosamdrosam/agents/skills/commit/SKILL.md

commit

Skill1 starsChanged 2 days agoMITView on GitHub

Create focused git commits from current working tree changes. Use when the user asks to commit changes, make a git commit, write a commit message, split changes into commits, organize commits, group changes into commits, or prepare local changes for commit.

187 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

Show its rules and text

We split this skill into the rules it gives an agent

29 rules. 0 are common, 24 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 167 edited versions we read keep these.

  • 24

    Distinctive

    This author's own choices. Worth a look.

  • 5

    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 minimal, cohesive commits from current changes.

    line 6
  2. Distinctive:

    Never commit without reviewing the diff and confirming the intended scope.

    line 11
  3. Distinctive:

    Stop on unresolved merge conflicts.

    line 12
  4. Distinctive:

    Never stage unrelated changes without user confirmation.

    line 13
  5. Distinctive:

    Never use git add -A or git add ..

    line 14
  6. Very specific:

    Never add Co-Authored-By trailers.

    line 17
  7. Very specific:

    Never amend an existing commit or create a fixup!/squash!

    line 18
  8. Distinctive:

    Read relevant diffs before deciding scope:

    line 29
  9. Distinctive:

    If all changes are one cohesive unit, commit them together.

    line 37
  10. Distinctive:

    If changes are unrelated, ask which files/hunks to include.

    line 38
  11. Distinctive:

    If generated or incidental files appear, call them out before staging.

    line 39
  12. Distinctive:

    Use one concise sentence for the title.

    line 48
  13. Distinctive:

    Do not include a ticket or issue number unless the user explicitly requests it.

    line 50
  14. Very specific:

    No trailers, including Co-Authored-By.

    line 51
  15. Distinctive:

    Default to a title only. Add a body only when omitting it would leave essential context unclear and a better title cannot convey that …

    line 52
  16. Distinctive:

    Read the entire staged diff (git diff --cached) and run git diff --cached --check.

    line 55
  17. Very specific:

    Only when a body meets step 5's strict necessity rule, append a second -m "Essential context" argument.

    line 61
  18. Distinctive:

    If tests/lint are relevant and not run, mention that clearly.

    line 67
  19. Distinctive:

    If git status --short shows unrelated changes, stop and ask for scope.

    line 68
  20. Distinctive:

    If commit or a hook fails, report the redacted error and inspect status/diff for hook changes.

    line 69
  21. Distinctive:

    Use this branch when the user asks to organize commits, split changes into commits, or group staged/unstaged changes.

    line 73
  22. Distinctive:

    Read diffs before grouping:

    line 83
  23. Very specific:

    Keep docs/config/chore changes separate when they are independent.

    line 92
  24. Distinctive:

    Keep refactors separate from behavior changes when possible.

    line 93
  25. Distinctive:

    Call out unrelated or ambiguous files.

    line 94
  26. Distinctive:

    Ask for confirmation when:

    line 96
  27. Distinctive:

    Create commits one group at a time:

    line 101
  28. Distinctive:

    Read git diff --cached and run git diff --cached --check before each commit.

    line 103
  29. Distinctive:

    Default to title-only messages.

    line 104

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

Create minimal, cohesive commits from current changes.

Preconditions

  • A message-only request authorizes drafting, not staging or committing.
  • Never commit without reviewing the diff and confirming the intended scope.
  • Stop on unresolved merge conflicts. Preserve existing staged work; ask if it conflicts with the requested commit.
  • Never stage unrelated changes without user confirmation.
  • Never use git add -A or git add ..
  • Work artifacts (specs, plans, domain context, ADRs) live outside the repository in <work-area> = ~/.agent-work/<repo-key>/, where <repo-key> is the name of the git rev-parse --path-format=absolute --git-common-dir directory, or its parent's name when that is .git/.bare, without a trailing .git. A legacy in-repo .agent-work/ is not automatic commit content: do not stage it unless explicitly requested; if already staged, stop and ask rather than silently committing or unstaging it.
  • When using work docs to establish commit intent, inspect <work-area>/work/<work-id>/spec.md and plan.md, follow reciprocal Spec/Plan links and Work-ID, and read acceptance criteria/non-goals. Use only an explicit user path, current-session confirmation, or validated reciprocal link. Otherwise shortlist titles/statuses/summaries and ask via question tool (even for one candidate), offering Other / None—standalone work; never guess from names, slugs, branch, or recency. If asking is unavailable, report the blocker. Missing docs need not be created. Selection does not authorize staging or commits.
  • Never add Co-Authored-By trailers.
  • Never amend an existing commit or create a fixup!/squash! commit unless the user explicitly asks. Never rebase, reset, stash, or push unless explicitly asked.

Workflow

  1. Inspect state:

    git status --short
    git diff --stat
  2. Read relevant diffs before deciding scope:

    git diff -- <path>
    git diff --cached -- <path>
  3. Decide commit scope:
    • If all changes are one cohesive unit, commit them together.
    • If changes are unrelated, ask which files/hunks to include.
    • If generated or incidental files appear, call them out before staging.
  4. Stage explicit files only. If a file mixes intended changes with unrelated hunks, ask before staging it; do not stage the whole file:

    git add -- path/to/file another/file
  5. Write commit message:
    • Use one concise sentence for the title.
    • Prefer imperative mood.
    • Do not include a ticket or issue number unless the user explicitly requests it.
    • No trailers, including Co-Authored-By.
    • Default to a title only. Add a body only when omitting it would leave essential context unclear and a better title cannot convey that context. If in doubt, omit it.
    • A necessary body must be one short paragraph of clear, simple English. Explain only the essential reason, constraint or consequence; do not repeat the title, list changes or add filler.
  6. Read the entire staged diff (git diff --cached) and run git diff --cached --check. A commit includes the whole index, not just the paths most recently staged. Confirm every hunk belongs to this commit; keep secrets and personal/customer data out of both diff and message. Then commit:

    git commit -m "Commit title"

    Only when a body meets step 5's strict necessity rule, append a second -m "Essential context" argument.

  7. Report commit hash and title.

Failure handling

  • If tests/lint are relevant and not run, mention that clearly.
  • If git status --short shows unrelated changes, stop and ask for scope.
  • If commit or a hook fails, report the redacted error and inspect status/diff for hook changes. Do not bypass hooks, blindly retry, or amend; propose the smallest fix.

Organize multiple commits

Use this branch when the user asks to organize commits, split changes into commits, or group staged/unstaged changes.

  1. Inspect all changes:

    git status --short
    git diff --stat
    git diff --cached --stat
  2. Read diffs before grouping:

    git diff
    git diff --cached
  3. Propose commit groups before staging:
    • Group feature code with matching tests.
    • Keep docs/config/chore changes separate when they are independent.
    • Keep refactors separate from behavior changes when possible.
    • Call out unrelated or ambiguous files.
  4. Ask for confirmation when:
    • More than one reasonable grouping exists.
    • Existing staged changes conflict with the proposed grouping.
    • Any file appears unrelated to the main work.
  5. Create commits one group at a time:
    • Stage explicit files or hunks only.
    • Read git diff --cached and run git diff --cached --check before each commit; verify the entire index belongs to that group.
    • Default to title-only messages. Apply the message rules in Workflow step 5 separately to each commit; a body on one commit does not justify bodies on the others.
    • Repeat until intended changes are committed.
  6. Finish with git status --short and list commit hashes/titles created.

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.