← 返回
未分类 中文

Flyai Commit Lint

Enforce conventional commit messages with semantic validation, scope checking, and automated fix suggestions for git workflows.
对 Git 工作流强制使用常规提交信息,提供语义验证、范围检查和自动修复建议。
dingtom336-gif dingtom336-gif 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 330
下载
💾 0
安装
1
版本
#latest

概述

FlyAI Commit Lint

Enforce conventional commit messages across your team with semantic validation, scope verification, and automated fix suggestions.

When to use

Activate this skill when:

  • A user runs git commit and the message does not follow conventional commit format
  • A user asks to review or fix commit messages in a branch
  • Pre-commit hooks need commit message validation
  • CI pipelines require commit format enforcement

Commit Format

All commits must follow the pattern: type(scope): subject

Allowed Types

TypeDescription
-------------------
featA new feature
fixA bug fix
docsDocumentation changes
styleFormatting, missing semicolons, etc.
refactorCode change that neither fixes a bug nor adds a feature
perfPerformance improvement
testAdding or updating tests
choreMaintenance tasks
ciCI/CD configuration changes
buildBuild system or dependency changes

Scope Rules

  • Scope is optional but recommended
  • Must be lowercase kebab-case
  • Should match a module, component, or directory name in the project
  • Examples: auth, api, ui, database, ci

Subject Rules

  • Use imperative mood: "add feature" not "added feature"
  • No period at the end
  • Maximum 72 characters
  • Start with lowercase

Validation Process

  1. Parse the commit message into type, scope, subject, body, and footer
  2. Validate type against the allowed list
  3. Check scope format if present
  4. Verify subject follows all rules
  5. Check total first line length does not exceed 72 characters
  6. If body is present, ensure blank line separator exists

Auto-Fix Suggestions

When a commit message fails validation, suggest fixes:

  • Wrong type: suggest the closest matching type
  • Uppercase subject: auto-lowercase the first character
  • Period at end: remove trailing period
  • Past tense: suggest imperative form (added -> add, fixed -> fix)
  • Missing type: infer from changed files (test files -> test, docs -> docs)

Integration

Works with:

  • Git hooks (pre-commit, commit-msg)
  • GitHub Actions CI checks
  • Local development workflow
  • Branch history cleanup before merge

Examples

Good:

  • feat(auth): add OAuth2 login flow
  • fix(api): handle null response from upstream
  • docs: update API reference for v2 endpoints
  • refactor(database): extract connection pooling logic

Bad:

  • Added new feature (missing type)
  • feat: Add OAuth2. (uppercase, period)
  • fix(API): Fixed the bug (uppercase scope, past tense)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 16:20 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 79 📥 182,696
dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 682 📥 330,135