agentleFS
c-w-zc-w-z/commit-decision-record/.agents/skills/commit/SKILL.md

commit

Skill1 starsChanged 5 days agoMITView on GitHub

Use for every commit in this repo (asked to commit, "/commit", or finishing a change).

  • Deletes or force-pushes
  • Commits and pushes

186 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use act-on-feedback, generate-run-commands 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.
  • 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 4 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 4 projects that use this

  • MindgamesSkill

    branch

    Use when a user asks to create a new local git branch and start issue work (for example, "create branch" or "start working on issue XYZ"). Use this for issue-based branch naming in the `type/scope-short-description` pattern and for always syncing local `main` from `origin/main` before creating the new branch, creating the local tracking `main` branch first when needed.

    Also in 9 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

  • thoughtbotSkill

    implement-with-tdd

    Implement a SPEC, plan, or feature outside-in, with TDD.

    Also in 3 projects that use this

  • thoughtbotSkill

    multi-lens-review

    Review a change for defects, then against its spec, its codebase's conventions, the domains trying to emerge from it, and whatever still depends on what it replaced.

    Also in 3 projects that use this

  • +1 more from thoughtbot

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 165 edited versions we read keep these.

  • 6

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Run git status -sb. The first line shows the branch.

    line 12
  2. Distinctive:

    Make sure that it is the branch of the current task.

    line 13
  3. Distinctive:

    Commit only the changes that you made for the current task.

    line 14
  4. Distinctive:

    Do the steps in "Before you finish" in AGENTS.md.

    line 15
  5. Very specific:

    Do not stage secrets, local settings (see .gitignore) or build output.

    line 20
  6. Very specific:

    Use the format in Message format in CONTRIBUTING.md.

    line 24
  7. Very specific:

    Check the complete draft commit message against Message format and "Text for outside readers" in CONTRIBUTING.md.

    line 25
  8. Very specific:

    Do not use --no-verify.

    line 30
  9. Distinctive:

    Do not force-push main. Do not rewrite the commits that are in main.

    line 31
  10. Distinctive:

    If a hook fails, fix the cause and make the commit again.

    line 34

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

The rules and the message format are in Commits in CONTRIBUTING.md. This skill gives the procedure.

Before you commit

  1. Run git status -sb. The first line shows the branch.
    • Make sure that it is the branch of the current task. A different person or session can change the branch in the same folder. If the branch is wrong, stop and ask the user.
    • Commit only the changes that you made for the current task. If you find changes that you did not make, stop and ask the user.
  2. Do the steps in "Before you finish" in AGENTS.md.

Stage the changes

  • Stage each path by name (git add <path>...). Do not use git add -A without a check of what it stages.
  • Do not stage secrets, local settings (see .gitignore) or build output.

Write the message

  • Use the format in Message format in CONTRIBUTING.md.
  • Check the complete draft commit message against Message format and "Text for outside readers" in CONTRIBUTING.md.
  • Give a multi-line message with a quoted heredoc: git commit -F - <<'EOF' ... EOF.

Safety

  • Do not use --no-verify.
  • Do not force-push main. Do not rewrite the commits that are in main.
  • You can amend or rebase unpushed commits that you made in this task.
  • To rewrite other commits of a PR branch that is not merged, for example pushed commits or commits that you did not make, ask the user first. Then push with git push --force-with-lease.
  • If a hook fails, fix the cause and make the commit again.

After you commit

Report the short hash and the branch.

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.