commitlint

使用 commitlint 强制规范提交信息,适用于需标准化提交消息、在 CI 中执行提交检查、或从提交记录生成变更日志的场景。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
7

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "commitlint":https://skillpi.com/zh/skills/deepskill-644a0bd28c51cdb50689f0d7c2811deece81dcce63903126ccd958a4f5f9e804。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

使用 commitlint 强制规范提交信息,适用于需标准化提交消息、在 CI 中执行提交检查、或从提交记录生成变更日志的场景。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: commitlint
description: >-
  Enforce conventional commit messages with commitlint. Use when a user asks to standardize commit messages, enforce commit conventions, set up commit linting in CI, or generate changelogs from commits.
license: Apache-2.0
compatibility: 'Any Git repository'
metadata:
  author: terminal-skills
  version: 1.0.0
  category: development
  tags:
    - commitlint
    - git
    - conventional-commits
    - ci
    - changelog

commitlint

Overview

commitlint checks commit messages against conventional commit format (type(scope): description). Pairs with husky for Git hooks and standard-version/changesets for automated changelogs.

Instructions

Step 1: Setup

npm install -D @commitlint/cli @commitlint/config-conventional husky
npx husky init
echo 'npx --no -- commitlint --edit "$1"' > .husky/commit-msg

Step 2: Configure

// commitlint.config.js — Commit message rules
export default {
  extends: ['@commitlint/config-conventional'],
  rules: {
    'type-enum': [2, 'always', ['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore']],
    'scope-case': [2, 'always', 'kebab-case'],
    'subject-max-length': [2, 'always', 72],
  },
}

Step 3: Valid Commits

git commit -m "feat(auth): add Google OAuth login"        # valid
git commit -m "fix(api): handle null response from /users" # valid
git commit -m "updated stuff"                              # rejected

Guidelines

  • Conventional commits enable automated changelog generation and semantic versioning.
  • Use with husky to enforce at commit time, not just in CI.
  • Types: feat (minor bump), fix (patch bump), BREAKING CHANGE (major bump).

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供 commitlint 配置与 husky 集成方案,解决 Git 提交信息标准化、CI 检查、变更日志生成等实际开发痛点
  • 适用于开发者和 DevOps 工程师,具有广泛实用价值
触发精准95/100

亮点

  • description 明确描述适用场景,覆盖多种变体,边界清晰
结构规范90/100

亮点

  • Phase/步骤清晰(Setup/Configure/Valid Commits),有端到端示例,frontmatter 完整
执行可靠90/100

亮点

  • 工具来源明确,参数正确,覆盖主要异常,不可逆操作有确认机制
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 安装或获取外部依赖

    使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。

    主文档提及 · 第 28, 29, 30 行
  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 48 行

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。