Commitcheck

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 7, 2026

Commit message convention and DCO sign-off checker over a git history range.

已驗證STDIO僅桌面開發者工具

概覽

AI 產生的概覽

檢查 git 儲存庫近期提交訊息,針對主旨長度、佔位主旨、DCO 簽署與慣例偏離,給出逐筆提交的發現。

可以做什麼
  • 檢查 git 儲存庫的提交(預設最近 50 筆):主旨行超過 72 字元、佔位主旨、缺少或格式錯誤的 Signed-off-by 尾註,以及偏離儲存庫主流提交風格的情況。
  • 回傳逐筆提交的發現,標明規則名稱與短 sha,並給出 CLEAN 或 FINDINGS 結論。
  • 規則會自行調整:只有在歷史本身顯示主流模式時,才會標記簽署或風格問題。
適用情境
適合在推送、發佈或提交貢獻前,讓助理審查儲存庫近期的提交規範,或說明歷史為何不符合 DCO 或提交訊息風格要求。
執行需求
以本機程序透過 stdio 執行,可用 npx 或 Docker 映像啟動。需要 Node 20 或更新版本,以及 PATH 中的 git。未宣告帳號、API 金鑰或環境變數。
安裝前請注意
僅對本機 git 歷史做唯讀檢查,未描述寫入、憑證或將資料傳送給第三方。結果僅限最近 50 筆提交,風格偵測基於統計,簽署檢查只確認尾註存在,不驗證簽章真實性或簽署人是否為作者。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Commitcheck,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

commitcheck

Commit hygiene checker for a git repository's recent history. It reads the most recent 50 commits and checks subject length, placeholder subjects, DCO Signed-off-by trailers, malformed trailers, and whether each commit follows the message convention the repo itself actually uses. Every finding names the rule and the short sha of the commit it came from.

Install

sh
npx @reneturcios/commitcheck check [path]

Or install it globally:

sh
npm install -g @reneturcios/commitcheck

Requires Node 20 or newer and git on PATH.

CLI

sh
commitcheck check [path] [--json]   # check a repo (default path: .)commitcheck mcp                     # run the MCP server on stdiocommitcheck --version               # print the version

Exit codes: 0 when the verdict is CLEAN, 1 when it is FINDINGS, 2 for a usage error or an unreadable target, and 141 when the reader closed the output pipe early (the shell-visible equivalent of death by SIGPIPE).

Findings are printed in git log order, newest first, and the order is deterministic for a given history.

MCP

The MCP server exposes one tool:

  • check_commits with argument path: runs the same check as the CLI and returns the full report as JSON.

Rules

RuleSeverityWhat it means
SUBJECT-TOO-LONGmediumThe subject line is over 72 characters.
SUBJECT-VAGUElowThe subject is empty or a placeholder such as wip, fix, update, changes, or .
NO-SIGNOFFmediumThe commit has no Signed-off-by trailer, in a repo whose history follows the DCO convention (see below).
CONVENTION-BREAKlowThe subject breaks the dominant message style of the range (see below).
MERGE-COMMITinfoA merge commit, reported for context. Merge commits are never a finding above info.
TRAILER-MALFORMEDlowA Signed-off-by line without an email shape, for example Signed-off-by: Jane Doe with no <[email protected]>.

The verdict is CLEAN when the range has no medium findings, and FINDINGS otherwise. Low and info findings are reported but do not change the verdict.

The adaptive rules, stated plainly

commitcheck does not impose a house style. Both convention checks are learned from the range being checked:

  • DCO / sign-off. A commit is flagged NO-SIGNOFF only when the repo demonstrably uses sign-off: at least half of the other commits in the range carry a well-formed Signed-off-by trailer. If the repo does not use sign-off, no commit is flagged for missing it. A malformed sign-off line does not count as a sign-off.
  • Message convention. Two styles are tracked: conventional subjects (type: summary or type(scope): summary) and capitalized imperative subjects (Add the thing). When one style is used by at least 70 percent of the non-merge commits in the range, it is the dominant style, and a commit that breaks it is flagged CONVENTION-BREAK. When no style reaches 70 percent, nothing is flagged for style.

Limits

  • Only the last 50 commits are checked.
  • Style detection is statistical. A short or mixed history may have no dominant style, in which case no convention findings are produced.
  • Sign-off presence is checked, not signature validity. commitcheck verifies that a Signed-off-by trailer with an email shape exists; it does not verify that the signer is the author or that any signature is genuine.
  • Merge commits are detected from the Merge ... subject line, which is the default git shape; a hand-written subject that starts with Merge will be reported as one.

來源:README.md,提交 2c8efad

工具

1

check_commits

Check the commits in a git repo (most recent 50 by default): subject lines over 72 chars, missing DCO Signed-off-by trailers, messages that break the repo's dominant convention (detected from the history itself), and placeholder subjects. Returns per-commit findings and a CLEAN or FINDINGS verdict.

輸入參數path必填

版本歷史

1
  1. v0.1.0最新Oct 30, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分