agentleFS
bInference-LabbInference-Lab/bInference/.agents/skills/shape-commit/SKILL.md

shape-commit

Skill2 starsChanged 2 days agoMITView on GitHub

Checks that staged work is one commit's worth, proposes a split when it is not, and writes the commit subject and branch name. Use before every commit and when choosing a pull request title.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    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:

    Every pull request is squashed into one commit on master, and its title becomes the subject.

    line 8
  2. Distinctive:

    When a split is needed, name each commit and the files it holds.

    line 32
  3. Distinctive:

    When two fit, use the one the user notices.

    line 49
  4. Distinctive:

    No vague words, no dashes as punctuation, no emojis, no issue numbers, no task ids.

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 383,637 skill files we read have a rule of the same kind, not the same words. “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

Shape the commit

Every pull request is squashed into one commit on master, and its title becomes the subject. The release notes are written from those subjects.

1. Read what is staged

git diff --staged --stat
git diff --staged

Stage only the files the change needs.

2. One commit's worth

  • One reason to exist. If the subject needs "and" to join two unrelated changes, split it.
  • Complete: code, tests, TSDoc, English and Chinese messages, docs pages, the config migration and the ADR travel together.
  • Apart, each in its own commit: a refactor or rename the feature needs (first), formatting-only changes, one dependency update, an unrelated fix found on the way.
  • Together: a schema migration and the code that needs it; generated files and their cause.
  • Over about 400 changed lines, tests and generated files left out: propose a stack of pull requests (ports and types, then the adapter, then the wiring), each green and useful alone.
  • Nothing private: no secrets, .env files, keystores, local paths or internal notes.

When a split is needed, name each commit and the files it holds.

3. Type

TypeWhen
featA user or developer can do something new
fixBehavior was wrong and is now right
perfSame behavior, measurably faster or lighter
refactorSame behavior, better structure; existing tests pass unchanged
testTests only
docsDocumentation only
ciGitHub workflows and CI scripts
buildThe toolchain, packaging and dependencies
choreRepo upkeep that is none of the above
revertUndoes an earlier commit on master

When two fit, use the one the user notices.

4. Scope

One scope, never two: the package folder, the plugin folder, a feature folder of engine or runtime, or one of deps, skills, dev-skills, docs, release. Pick the most specific owner of the behavior. Leave the scope out only for a change across the repo.

5. Subject

type(scope): description, 72 characters at most.

  • The description starts lowercase, has no period and says exactly what changed.
  • A fix names the symptom the user saw, not the code that changed.
  • No vague words, no dashes as punctuation, no emojis, no issue numbers, no task ids.
  • A breaking change adds ! and a body paragraph that starts with Breaking:.
  • A revert reads revert: <original subject> with This reverts commit <hash>. in the body.
  • A body, when a reviewer needs one, is a few plain paragraphs wrapped at 72 characters, with no headings and no checklists. No AI attribution lines.

6. Branch

<type>/<short-name>, such as fix/trailing-stop-restart.

7. Verify

printf '%s\n' "<subject>" | pnpm exec commitlint
pnpm check:style --text "<subject>"

Give the subject, the body if any, and the branch name.

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.