agentleFS
whoaskedssselerywhoaskedssselery/claude-workspace/skills/core/commit-discipline/SKILL.md

commit-discipline

Skill0 starsChanged 3 months agoMITView on GitHub

Enforces clean, meaningful Git history in learning projects. Encourages atomic commits, logical grouping of changes, clear commit messages and disciplined staging while respecting learning-guard.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 16 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 16

    Distinctive

    This author's own choices. Worth a look.

  • 0

    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 a clean Git history that serves as project documentation and supports future review, debugging and learning.

    line 10
  2. Distinctive:

    Every commit should represent one meaningful step in the project's evolution.

    line 12
  3. Distinctive:

    Avoid mixing unrelated changes.

    line 29
  4. Distinctive:

    Prefer fewer high-quality commits over many small ones.

    line 48
  5. Distinctive:

    If the previous commit has not been shared and the new change clearly belongs with it, consider amending instead of creating another commit.

    line 73
  6. Distinctive:

    Prefer Conventional Commits when appropriate:

    line 79
  7. Distinctive:

    use the imperative mood ("add", "fix", "extract").

    line 91
  8. Distinctive:

    keep the title concise (ideally ≤72 characters).

    line 92
  9. Distinctive:

    Add a commit body only when additional context would help future readers.

    line 95
  10. Distinctive:

    Do not repeat the title.

    line 103
  11. Distinctive:

    Avoid git add . unless every modified file belongs to the same commit.

    line 111
  12. Distinctive:

    Create a commit when:

    line 117
  13. Distinctive:

    before switching to a substantially different task.

    line 121
  14. Distinctive:

    Prefer committing at stable checkpoints where:

    line 123
  15. Distinctive:

    If the user explicitly asks for a commit, do not ask for confirmation again.

    line 129
  16. Distinctive:

    If they do not, suggest that the work is ready to commit when appropriate.

    line 131

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

Purpose

Create a clean Git history that serves as project documentation and supports future review, debugging and learning.

Every commit should represent one meaningful step in the project's evolution.


Commit Philosophy

One Logical Change

Each commit should have one clear purpose.

Prefer:

  • one feature;
  • one bug fix;
  • one refactoring;
  • one styling improvement.

Avoid mixing unrelated changes.


Atomic Commits

Each commit should be:

  • atomic;
  • understandable;
  • reversible;
  • independently meaningful.

Someone reading the history should understand why the project changed.


Preserve Signal

Prefer fewer high-quality commits over many small ones.

Avoid micro-commits for:

  • formatting;
  • small renames;
  • isolated style tweaks;
  • trivial cleanup.

Unless those changes are the actual purpose of the commit.


Before Committing

Review the staged changes.

Check that they:

  • belong to the same logical change;
  • contain no accidental files;
  • contain no temporary debugging code;
  • contain no commented-out experiments;
  • contain no placeholder implementations.

If the previous commit has not been shared and the new change clearly belongs with it, consider amending instead of creating another commit.


Commit Messages

Prefer Conventional Commits when appropriate:

  • feat:
  • fix:
  • refactor:
  • style:
  • docs:
  • test:
  • chore:

Rules:

  • use the imperative mood ("add", "fix", "extract");
  • keep the title concise (ideally ≤72 characters);
  • prioritize clarity over strict convention.

Add a commit body only when additional context would help future readers.

The body should explain:

  • why the change was made;
  • important trade-offs;
  • migration notes (if relevant).

Do not repeat the title.


Staging

Stage only files related to the current logical change.

Avoid git add . unless every modified file belongs to the same commit.


When to Commit

Create a commit when:

  • the user explicitly requests it;
  • a logical unit of work is complete;
  • before switching to a substantially different task.

Prefer committing at stable checkpoints where:

  • the project builds;
  • the completed work is coherent;
  • the change can be reviewed independently.

If the user explicitly asks for a commit, do not ask for confirmation again.

If they do not, suggest that the work is ready to commit when appropriate.


Examples

Good:

  • feat: add product filtering by category
  • fix: correct mobile padding on checkout page
  • refactor: extract product search hook
  • style: improve ProductCard spacing and hover states

Avoid:

  • update
  • fix
  • small fix
  • wip
  • multiple commits that together represent one logical change

Collaboration

Respect learning-guard at all times.

Commits must never become a way to bypass the user's responsibility for writing production code.

Maintain a clean history so that health-review can better identify project evolution, regressions and learning progress.

Never add:

  • Co-authored-by
  • AI signatures
  • generated attribution

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.