agentleFS
vale-clivale-cli/agent-tools/skills/commits/SKILL.md

commits

Skill10 starsChanged 11 days agoMITView on GitHub

Lint commit messages with Vale — pick the convention the history already follows, add the hook that stops a bad commit, and check pull requests in CI. Use when the user says "lint our commit messages", "enforce conventional commits", "add a commit-msg hook", "replace commitlint", or "our commit log is a mess".

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use writing-tests and testing.

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

    writing-tests

    Use when adding or changing tests in Megatron-Energon, or when a code change needs test coverage. Covers the end-to-end test style, dataset fixtures, save/restore and multi-worker checks, and how to run focused tests.

    Also in 3 projects that use this

  • NVIDIASkill

    testing

    Run Python and Rust tests for physicsnemo-curator using uv + pytest with coverage reporting via pytest-cov, and cargo-nextest for Rust tests. Includes benchmark workflows with pytest-benchmark and criterion.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 3

    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:

    Read the result three ways, as the script does:

    line 49
  2. Distinctive:

    If the user named a convention, still run it: "Conventional, which 3 of your last 50 commits follow" is worth saying before a hook starts …

    line 56
  3. Very specific:

    Check a rule's name and its parameters in styles/<Convention>/ after vale sync rather than guessing them.

    line 78
  4. Distinctive:

    3. Try it on a message: before installing anything:

    line 82

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

Lint commit messages

When to use this

The team wants its commit log held to a convention, with the tool that already lints the docs. Vale's Commits package carries the common ones — Conventional Commits, the seven rules, gitmoji, the Go and kernel styles, a Jira key — and equivalents of commitlint, gitlint, committed, conform and commitizen for a team replacing one of those.

This is separate from prose linting. onboard names it as an option, with the history's closest convention; it is added only when the user says so.

Prerequisites

  1. vale --version is 3.21.0 or later.
  2. vale ls-config resolves. If there is no config yet, this skill can write one that holds only the commit section; say that is what you are doing.

Workflow: choose and configure

1. Read the history before choosing. scripts/history.sh, beside this file, lints the last fifty commits against each convention in a temp directory and counts how many fail:

sh ${CLAUDE_SKILL_DIR}/scripts/history.sh
Convention      failing   most common reason
(core only)        0/14
Conventional      12/14   Conventional.Type (12)
SevenRules         4/14   SevenRules.Capitalize (3)
...
Closest: SevenRules, but 4 of 14 fail. A habit, not yet a convention; ask before enforcing.

${CLAUDE_SKILL_DIR} is the directory this file is in; if it reaches you as literal text, use that path. The script takes -n for more commits and -c to name the conventions to try.

Read the result three ways, as the script does:

  • Most of the history passes one — enforce that. It confirms a habit.
  • About half passes — a habit, not a convention. Show the number and ask.
  • Nothing passes — the team is choosing a convention, not confirming one. That is their decision; offer the two or three closest with their counts.

If the user named a convention, still run it: "Conventional, which 3 of your last 50 commits follow" is worth saying before a hook starts rejecting everyone's work.

2. Add the section to .vale.ini, and Commits to Packages:

Packages = Microsoft, Commits

[COMMIT_EDITMSG]
BasedOnStyles = Commits, SevenRules

Commits is the core every convention shares; the second name is the convention. Levels and switches work as for any rule, and a limit is set with a bracket key:

SevenRules.Limit[max] = 72
Commits.Imperative = error

Check a rule's name and its parameters in styles/<Convention>/ after vale sync rather than guessing them. To spell-check the body as well, add Vale to the list; the project's vocabulary applies.

3. Try it on a message before installing anything:

git log -1 --format=%B | vale --path=COMMIT_EDITMSG

Workflow: install and enforce

4. Install the hook, in the form the repository already uses.

  • A hook runner is present (lefthook.yml, .husky/, .pre-commit-config.yaml) — add Vale there. For the pre-commit framework:
repos:
  - repo: https://github.com/vale-cli/vale
    rev: v3.27.0
    hooks:
      - id: vale-commit-msg
  • None — a tracked hook and one git config per clone:
#!/bin/sh
# script/commit-msg — stops a commit whose message fails the project's rules.
case "$(sed -n '1p' "$1")" in
"Merge "* | "Revert "* | "fixup! "* | "squash! "* | "amend! "*) exit 0 ;;
esac
exec vale --path=COMMIT_EDITMSG < "$1"
chmod +x script/commit-msg
git config core.hooksPath script

core.hooksPath is per clone and is not shared by committing. Say so, and put the command where contributors already run setup — a prepare script, a make setup target, the contributing guide. If core.hooksPath is already set, add to that directory; do not repoint it.

5. Add the check in CI. A hook protects only clones that installed it. In a pull request job, lint each commit the request adds:

status=0
for sha in $(git rev-list --no-merges "$BASE..HEAD"); do
  git log -1 --format=%B "$sha" | vale --path=COMMIT_EDITMSG || status=1
done
exit $status

The job needs vale sync first and a checkout with history (fetch-depth: 0). Advisory or blocking is the same decision as in ci.

6. Keep the package's files out of git. vale sync puts the package's views and templates in styles/config/, beside the vocabularies. They are build output; add styles/config/views/ and styles/config/templates/ to .gitignore unless the project keeps its own there.

7. Report the convention, how much of the recent history already passes it, where the hook lives, what each contributor has to run once, and whether CI blocks.

Do not

  • Do not enforce a convention the history does not follow without saying the number. A hook that rejects most of the team's normal messages gets removed the same day.
  • Do not rewrite existing history to make it pass. The rules apply from here on.
  • Do not put the hook in .git/hooks. It protects one clone and nobody else knows it exists.
  • Do not bypass the hook with --no-verify to get your own commit through. Fix the message.
  • Do not start with every rule at error. As with prose: the convention's shape blocks, the finer points start as warnings.

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.