agentleFS
Kuan-AI-comKuan-AI-com/agent-skills/skills/commit-message/SKILL.md

commit-message

Skill0 starsChanged 6 days agoMITView on GitHub

Write a git commit message for the current changes and optionally make the commit. Use when the user says "commit this", "write a commit message", "commit my changes", or asks to split work into commits.

  • Reads credentials

66 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use refactor, grilling and 6 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.
  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • GoogleSkill

    grilling

    Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

    Also in 3 projects that use this

  • OpenAISkill

    brainstorming

    You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

    Also in 3 projects that use this

  • GoogleSkill

    improve-codebase-architecture

    Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

    Also in 3 projects that use this

  • MicrosoftSkill

    grill-with-docs

    Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.

    Also in 3 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 4 projects that use this

  • +1 more from google

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 55 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    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. Very specific:

    Before staging, scan for things that must not be committed: .env*, keys, tokens, credentials, large binaries, build output, debug prints …

    line 11
  2. Very specific:

    Check for enforced rules: commitlint.config.*, .commitlintrc*, a commit-msg hook in .husky/ or .git/hooks/, a CONTRIBUTING file.

    line 16
  3. Distinctive:

    Never claim something you did not check ("add tests", "fix crash") unless the diff shows it.

    line 29
  4. Very specific:

    If the staged diff mixes unrelated changes (a refactor plus a bug fix, formatting plus logic), propose separate commits with a message for …

    line 33
  5. Very specific:

    If a hook fails, read the output, fix the cause (lint, format, tests) and commit again.

    line 45
  6. Very specific:

    Do not --amend a commit that is already pushed, and do not push unless asked.

    line 46
  7. Distinctive:

    After committing, show git log -1 --stat so the user sees the result.

    line 47

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

1. See what will be committed

  • git status and git diff --staged. If nothing is staged, show git diff --stat and ask what to include, or stage only the files that belong to one logical change by name. Never git add -A / git add . blindly.
  • Before staging, scan for things that must not be committed: .env*, keys, tokens, credentials, large binaries, build output, debug prints you added. Stop and tell the user if you see one.

2. Learn the repo's convention

  • git log --oneline -15 for style: Conventional Commits (feat(api): ...), ticket prefixes (PROJ-123), language, capitalization.
  • Check for enforced rules: commitlint.config.*, .commitlintrc*, a commit-msg hook in .husky/ or .git/hooks/, a CONTRIBUTING file. Enforced rules win over this skill.

3. Write the message

Subject line:

  • Imperative mood, at most 72 characters (50 if the repo keeps them short), no trailing period.
  • Says the effect, not the file: "Retry failed webhook deliveries with backoff", not "Update webhook.ts".

Body, only when the subject is not enough:

  • Blank line after the subject, wrap at 72.
  • Why the change was needed and any non-obvious decision or trade-off. The diff already shows what changed.
  • Footers: Closes #123, BREAKING CHANGE: <what callers must change>, co-author lines the user or repo requires.

Never claim something you did not check ("add tests", "fix crash") unless the diff shows it.

4. Split when needed

If the staged diff mixes unrelated changes (a refactor plus a bug fix, formatting plus logic), propose separate commits with a message for each and the file list. Stage them separately with git add <paths> or git add -p when the user agrees.

5. Commit (only if the user asked to commit)

Pass multi-line messages through a heredoc so newlines survive:

git commit -F - <<'EOF'
Subject line

Body text.
EOF
  • If a hook fails, read the output, fix the cause (lint, format, tests) and commit again. Do not use --no-verify unless the user explicitly says so.
  • Do not --amend a commit that is already pushed, and do not push unless asked.
  • After committing, show git log -1 --stat so the user sees the result.

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.