agentleFS
rohitgollarahallirohitgollarahalli/claude-skills/skills/commit-and-pr/SKILL.md

commit-and-pr

Skill0 starsChanged 5 months agoMITView on GitHub

Write clear commit messages and pull-request descriptions that explain what changed and why. Use this whenever the user asks to "write a commit message", "commit this", "write a PR description", "open a PR", "summarize my changes", or needs a changelog entry or release note from a diff — even if they just staged changes and ask "what should the message be?"

8 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

7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 6

    Distinctive

    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:

    Commit messages and PR descriptions are read far more often than they're written — by reviewers, by future debuggers running git blame, by …

    line 13
  2. Very specific:

    Follow the Conventional Commits convention by default (see references/conventional-commits.md for the full type list and rules):

    line 19
  3. Distinctive:

    One logical change per commit: If the summary needs "and", consider splitting.

    line 36
  4. Distinctive:

    Use this structure; trim sections that don't apply:

    line 42
  5. Distinctive:

    Never fabricate. Base the message strictly on the actual diff.

    line 66
  6. Distinctive:

    Do not attribute the work to anyone but the author, and don't add co-author or tool trailers unless the user asks.

    line 67
  7. Distinctive:

    Keep summaries tight; put detail in the body, not a 100-character title.

    line 68

“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 & PR

Commit messages and PR descriptions are read far more often than they're written — by reviewers, by future debuggers running git blame, by you in six months. Optimize for the reader who has no context.

Commit messages

Follow the Conventional Commits convention by default (see references/conventional-commits.md for the full type list and rules):

<type>(<optional scope>): <imperative summary, <=72 chars>

<body: what changed and WHY, wrapped ~72 cols. Explain the motivation and
context, not just the diff — the diff already shows what changed.>

<optional footer: BREAKING CHANGE:, issue refs like "Closes #123">

Rules that matter:

  • Summary in the imperative mood: "add retry logic", not "added" or "adds".
  • Explain why, not what. "Fix race condition in cache eviction" beats "change mutex to RWMutex" — the reader can see the code, but not your reasoning.
  • One logical change per commit. If the summary needs "and", consider splitting.
  • Reference issues in the footer (Closes #123).
  • Inspect the actual staged diff before writing — never guess at what changed.

Pull-request descriptions

Use this structure; trim sections that don't apply:

## What
<one or two sentences on the change>

## Why
<the problem or motivation — link the issue>

## How
<key implementation decisions a reviewer should know; call out anything subtle or risky>

## Testing
<how it was verified — tests added, manual steps, edge cases checked>

## Notes
<screenshots, follow-ups, breaking changes, deployment steps>

A reviewer should be able to read the description and know what to look for before reading a single line of the diff.

Guardrails

  • Never fabricate. Base the message strictly on the actual diff; if you can't see it, ask for it.
  • Do not attribute the work to anyone but the author, and don't add co-author or tool trailers unless the user asks.
  • Keep summaries tight; put detail in the body, not a 100-character title.
  • Match the repo's existing convention if it clearly differs from Conventional Commits.

Example

Staged diff: switched an image-classification data loader to parse a CSV column instead of the whole row, and balanced the classes.

fix(data): parse moment text from CSV and balance classes

The not-depressed corpus is HappyDB CSV; the loader was feeding entire rows
(IDs, timestamps, category tags) into the model, so it learned dataset
artifacts instead of language. Parse only the cleaned-text column and
down-sample the majority class so predictions aren't biased.

Accuracy on the held-out split rises from ~0.70 to ~0.87.

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.