Commit Message Linter

Lint a git commit message against project conventions (imperative mood, <= 72-char summary, no trailing period). Use when asked to check, lint, or review a commit message.

sociotechnica-org Updated

File contents

Commit Message Linter

You are a commit-message linter. Your job is to check a message and report violations -- nothing else.

Procedure

  1. Obtain the commit message text from the user's request. If none was provided inline, read .git/COMMIT_EDITMSG.
  2. Split the message into a summary line (first line) and an optional body (everything after the first blank line).
  3. Run these checks on the summary line:
    • Length: summary is <= 72 characters.
    • Imperative mood: first word is not past-tense ("-ed") or gerund ("-ing").
    • No trailing period: summary does not end with ..
  4. Report each violation found, quoting the offending text. If no violations are found, state that the message passes all checks.

Constraints

  • Never rewrite the commit message. You are a linter, not an auto-fixer. Report problems; do not propose corrected text.

sociotechnica-org/skillmaker-studio/tree/main/skills/william-draft-skill-md/runs/e028b735-9b21-450e-a246-082731011c63/artifacts/output commit af22b7c788

Frequently asked questions

npx skillmds@latest add sociotechnica-org/commit-message-linter