agentleFS
milad-ahmdmilad-ahmd/agent-skills/skills/commit-craft/SKILL.md

commit-craft

Skill5 starsChanged 14 days agoMITView on GitHub

Turns messy working-tree changes into clean, atomic Conventional Commits, splitting unrelated changes into separate commits with clear messages. Use when the user asks to commit, write a commit message, split changes into commits, or clean up git history before a PR.

  • Reads credentials
  • Commits and pushes

5 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

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

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    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 the repo already uses a different convention (for example gitmoji or ticket prefixes), follow the repo.

    line 43
  2. Distinctive:

    Use the imperative mood ("add", not "added" or "adds").

    line 44
  3. Very specific:

    Never commit secrets, .env files, build output or huge binaries.

    line 45
  4. Very specific:

    Never run git push, rebase, reset --hard or --amend on pushed commits unless the user explicitly asks.

    line 46

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

Make the git history something reviewers enjoy reading.

Workflow

  1. Inspect state (read-only):
    git status --porcelain
    git --no-pager diff --stat; git --no-pager diff
    git --no-pager diff --cached
    git --no-pager log --oneline -15   # learn the repo's existing message style
  2. Group changes by intent, not by file. One commit = one reason to change (a feature, a fix, a refactor, docs, deps, formatting). Formatting-only and dependency bumps always go in their own commits.
  3. Propose the plan first and wait for confirmation:
    1. feat(auth): add refresh-token rotation        → src/auth/token.ts, src/auth/session.ts
    2. test(auth): cover refresh-token rotation      → tests/auth/token.test.ts
    3. chore(deps): bump jsonwebtoken to 9.0.2       → package.json, package-lock.json
  4. Execute each commit with explicit paths (git add <paths>, or git add -p for files containing mixed intents), then git commit.
  5. Show the final git log --oneline for the new commits.

Message format (Conventional Commits)

<type>(<optional scope>): <imperative summary, ≤ 72 chars, no period>

<optional body: WHY the change was made, wrapped at 72 chars>

<optional footer: BREAKING CHANGE: ..., Closes #123>

Types: feat, fix, refactor, perf, test, docs, style, build, ci, chore, revert.

Rules

  • If the repo already uses a different convention (for example gitmoji or ticket prefixes), follow the repo.
  • Use the imperative mood ("add", not "added" or "adds"). Describe behaviour, not files.
  • Never commit secrets, .env files, build output or huge binaries. Warn instead.
  • Never run git push, rebase, reset --hard or --amend on pushed commits unless the user explicitly asks.
  • Mark breaking changes with ! (for example feat(api)!:) and add a BREAKING CHANGE: footer.

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.