agentleFS
anorthanorth/agent-skills/skills/prepare-commit/SKILL.md

prepare-commit

Skill1 starsChanged 9 days agoMITView on GitHub

Checklist before making a commit: check and update the originating ticket or task, run tests and lint, and commit if asked. Use when the user asks to prepare a commit, get ready to commit, or commit changes.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run in this order.

    line 17
  2. Distinctive:

    If there is no written starting point, say so and continue.

    line 30
  3. Distinctive:

    Prefer the project's documented lint and test entrypoints.

    line 34
  4. Distinctive:

    If asked to commit and a check fails, don't commit.

    line 36
  5. Distinctive:

    Don't run a full production build unless the project documents that as the check to use.

    line 38
  6. Distinctive:

    If the working tree has unrelated changes, stop and ask before committing.

    line 43
  7. Distinctive:

    Follow the project's commit and branch conventions.

    line 44
  8. Distinctive:

    Write a message saying what changed and why, and reference the ticket, if there is one.

    line 45
  9. Very specific:

    Don't bypass hooks (--no-verify).

    line 46
  10. Distinctive:

    If you committed on main itself and the change completes the ticket, close the ticket.

    line 48
  11. Distinctive:

    Do not amend, rewrite history, or push unless explicitly asked.

    line 53

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Prepare commit

Checklist before a commit. Proceed to commit if explicitly asked, else stop when the checklist is done and wait.

Workflow

Run in this order.

1. Originating artifacts

Re-read the ticket, task, or any other artifacts that were the starting point for this conversation, and the code diff.

  • Is everything in the ticket addressed?
  • Summarise the ticket and what changes have been made.
  • Note whether this change completes the ticket.

Where we have made decisions that contradict the ticket, keep the original brief and append a note saying what changed and why.

If there is no written starting point, say so and continue.

2. Tests and lint

Prefer the project's documented lint and test entrypoints. Run lint, then tests. Fail-stop on either — do not present the work as ready to commit if either fails. If asked to commit and a check fails, don't commit; report.

Don't run a full production build unless the project documents that as the check to use.

3. Commit (only if asked)

  • Stage only the files that belong to this change. If the working tree has unrelated changes, stop and ask before committing; don't sweep them in.
  • Follow the project's commit and branch conventions.
  • Write a message saying what changed and why, and reference the ticket, if there is one.
  • Don't bypass hooks (--no-verify). If a hook fails or changes files, stop and report.
  • Afterwards, check git status, and report the branch status and anything left uncommitted.
  • If you committed on main itself and the change completes the ticket, close the ticket. Otherwise leave it open.

Hard rules

  • Do not amend, rewrite history, or push unless explicitly asked.

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.