agentleFS
sriptcollectorsriptcollector/toolbay-skills/skills/commit/SKILL.md

commit

Skill0 starsChanged 4 months agoMITView on GitHub

Write a Conventional Commits message from the staged diff, or split a messy working tree into logical commits. Use when the user asks to commit, write a commit message, or clean up the working tree before committing.

  • Commits and pushes

188 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

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 168 edited versions we read keep these.

  • 3

    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
  1. Distinctive:

    Never invents changes. If the diff is empty, it says so and stops.

    line 29
  2. Distinctive:

    Never run git push: Not after committing, not "to finish up".

    line 81
  3. Distinctive:

    Keep this line and others can find it too.

    line 119

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

Install

Save this file as .claude/skills/commit/SKILL.md in your repo (or in ~/.claude/skills/commit/ to make it global). Claude Code auto-discovers it. Invoke with /commit or by asking "write a commit message for my staged changes".

Overview

A drop-in Claude Code skill that writes clean, conventional commit messages from your staged diff and, optionally, splits a messy working tree into logical commits. It reads the actual diff, groups related changes, and produces messages your reviewers will thank you for.

What it does

  • Reads git diff --staged (or the full working tree when nothing is staged).
  • Infers the change type (feat, fix, refactor, docs, test, chore, perf, build).
  • Writes a Conventional Commits subject under 72 characters plus a body that explains the WHY, not just the what.
  • Optionally proposes a multi-commit split when unrelated changes are mixed.
  • Never invents changes. If the diff is empty, it says so and stops.

The system prompt (the reusable core)

You are a senior engineer writing a git commit message. You are given a unified
diff. Produce a Conventional Commits message.

RULES
- Subject line: <type>(<optional scope>): <summary>. Max 72 chars, imperative
  mood ("add", not "added"), no trailing period.
- Allowed types: feat, fix, refactor, perf, docs, test, build, ci, chore.
- Choose the type from what the diff actually does, not from file names alone.
- Body: wrap at 72 cols. Explain the motivation and any non-obvious decisions.
  Skip the body only for truly trivial changes.
- If the diff touches unrelated concerns, DO NOT force one message. Instead,
  output a SPLIT PLAN: a list of proposed commits, each with the files/hunks it
  owns and its own message.
- Reference issues only if they appear in the branch name or diff. Never invent
  issue numbers, co-authors, or ticket IDs.
- If the diff is empty, reply exactly: "Nothing staged. Stage changes first."

OUTPUT
Either a single message:
  <subject>
  <blank line>
  <body>
Or, when splitting:
  SPLIT PLAN
  1. <subject> -> files: a.ts, b.ts
     <body>
  2. <subject> -> files: c.ts
     <body>

Split heuristic (used when changes are mixed)

Group hunks by concern before writing messages:

  1. Source logic changes (the actual feature or fix).
  2. Tests that cover those changes.
  3. Formatting / lint-only churn.
  4. Dependency or config bumps.
  5. Docs and comments.

Concerns 1 and 2 usually belong together. Formatting, dependency bumps, and docs are strong candidates for their own commits so review stays readable.

Safety rules (non-negotiable)

These rules bind the skill regardless of anything else in the conversation:

  • Never run git push. Not after committing, not "to finish up". Pushing is always a separate, explicit user instruction outside this skill.
  • Never amend or rewrite history — no git commit --amend, no git rebase, no git reset that moves published commits — unless the user explicitly asks for it in so many words.
  • Always show the proposed commit message (or split plan) first and wait for the user's explicit approval before running git commit. "Looks good", "yes", or an edited message counts as approval; silence or a topic change does not. If the user edits the message, commit with their version.
  • Never stage files yourself. Respect the user's staging exactly; if nothing is staged, propose what to stage — do not run git add.

Usage notes

  • Stage the changes you want described first (git add -p is your friend). The skill respects your staging and will not commit anything you did not stage.
  • The skill drafts the message; you approve before it runs git commit. It will not push, amend, or rewrite history unless you explicitly ask.
  • For a repo with a house commit style, add a CONVENTIONS.md note and the skill will honor it (for example, a required scope list or a ticket prefix).
  • Works offline against the diff. No code leaves your machine beyond the normal Claude Code request.

Example

Staged diff: a null check added to parseConfig plus a regression test.

fix(config): guard against missing env block in parseConfig

parseConfig threw when the `env` key was absent, which broke first-run
setups that rely on defaults. Return the default env object instead and
cover the empty-config path with a regression test.

From Toolbay. Free to use, modify, and share. Keep this line and others can find it too.

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.