360 Secure SkillHub
360 安全技能中心

Skylv Git Commit Validator

核心功能为校验git提交消息是否符合约定式提交格式,支持feat、fix等8种类型,检查主题行长度、语气、标点等规则。典型使用场景是团队协作时规范提交日志,便于代码维护和版本发布。输入为git提交消息,输出为校验结果及问题提示。

sky-lv
sky-lv
热度 40.49
最近更新 2026-05-11 17:47:10
分类:开发依赖:代码执行应用场景:代码审查 / DevOps / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add skylv-git-commit-validator
Metadata
name
skylv-commit-linter
slug
skylv-commit-linter
version
1.0.0
description
Validates git commit messages against conventional commits format. Triggers: commit lint, conventional commits, commit format.
author
SKY-lv
license
MIT
tags
["automation","tools"]
keywords
["automation","tools"]
triggers
commit-linter

Commit Linter

Overview

Validates commit messages and enforces conventional commits format.

Conventional Commit Format

type(scope): description

Types: feat, fix, docs, style, refactor, perf, test, chore

Valid Examples

feat(auth): add password reset fix(api): handle null response docs(readme): update install

Rules

  • Subject line max 72 characters
  • Use imperative mood ("add" not "added")
  • No period at end of subject
  • Separate subject from body with blank line

Validate

git log --oneline -20