agentleFS
DeadlymindDeadlymind/nanolama/skills/commit-message/SKILL.md

commit-message

Skill1 starsChanged 5 months agoMITView on GitHub

Writes a Conventional Commits message from the staged git diff — type(scope) subject in the imperative under 72 chars, a body explaining WHY, and footers for BREAKING CHANGE and issue refs. Use when asked to write a commit message, "commit this", "conventionalize", or when deriving the type (feat, fix, chore, refactor, docs, test, perf, build, ci) and scope from what the diff actually changed. Not for the release-facing CHANGELOG rollup across many commits (see changelog) or judging whether the diff is correct (see code-review).

34 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use error-handling and brainstorming.

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.
  • MicrosoftSkill

    error-handling

    统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。

    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

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 27 edited versions we read keep these.

  • 1

    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:

    Don't restate the diff line by line in the body.

    line 58

“Common” is measured: kept by at least 6 in 10 of the 27 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 message (Conventional Commits)

When to use

Turning a staged diff into one well-formed commit message. Read the staged changes first — the type and scope are derived from what the diff does, not from what you meant to do.

Pattern

Subject line, a blank line, a body explaining WHY, then footers. The subject is type(scope): description in the imperative, lowercase start, no trailing period, kept short (the git convention is ~50 chars for the subject, wrap the body near 72). The body explains the problem, not the mechanics the diff already shows. A breaking API change on a tenant-scoped endpoint, for example:

feat(invoices)!: scope list endpoint to the caller's entreprise

The list view returned every tenant's invoices. Filter by the
authenticated user's entreprise so cross-tenant rows never leak.

BREAKING CHANGE: /api/invoices/ now returns only the current
tenant's rows; clients relying on the global list must paginate
per entreprise.
Refs: #482
  • type — derive from the diff's dominant effect: feat (new capability), fix (bug), refactor (behavior-preserving), perf, docs, test, build (deps/bundler), ci (pipeline), chore (rest).
  • scope — the touched area (module, app, or package), e.g. invoices, auth.
  • subject — imperative mood ("add", not "added"/"adds"), lowercase start, no period.
  • body — optional but expected for non-trivial changes; explains the why.
  • footer — BREAKING CHANGE: (a ! after the type/scope also flags it) and issue refs (Refs: #123, Closes #123).

Adapt to your repo

Inspect the staged diff, not the working tree — run git diff --cached --stat to see the area (scope) and git diff --cached to see what actually changed (type + why). Pick the single dominant type: if a diff both adds a feature and reformats, the feature wins — split unrelated changes into separate commits. Rename the example scope (invoices, entreprise) to your own modules and tenant term. If your repo uses a different taxonomy — a fixed scope list, or gitmoji (:sparkles: = feat, :bug: = fix) — follow that instead of these types, and match existing git log history. Confirm the subject-line length your linter enforces (commitlint's default header-max-length is 100).

Gotchas

  • The type describes the diff's effect, not your intent — a "quick fix" that adds a new endpoint is feat, not fix.
  • Subject is imperative and unpunctuated; the body is where prose lives.
  • BREAKING CHANGE: must be spelled exactly (uppercase, in the footer) for tools to detect it — a bare ! in the header is a hint, the footer is authoritative.
  • Don't restate the diff line by line in the body; Git already shows what. Say why.

See also

  • changelog
  • code-review

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.