mcpField
C
commit-helper

commit-helper

github.com/chmouel开发31445 次安装3 天前更新
代码仓库

关于 commit-helper

commit-helper 面向开发者,根据暂存更改和近期提交风格生成 Conventional Commits 消息,并在执行前提交用户确认。

主要功能

  1. 01读取暂存更改及统计
  2. 02检查最近五条提交
  3. 03生成 Conventional Commits 格式
  4. 04限制标题和正文长度
  5. 05执行前请求用户确认

适用场景

  1. 01为暂存更改变更撰写提交消息
  2. 02参照近期提交保持风格一致

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/chmouel/lazyworktree --skill commit-helper

安装后在 Claude Code 中输入/commit-helper确认已加载。

详细介绍

提交助手

根据暂存的更改生成符合 Conventional Commits 规范的提交消息。

要提交的更改

!git diff --staged --stat

详细差异

!git diff --staged

最近提交的风格

!git log --oneline -5


请遵循以下规则生成符合 Conventional Commits 规范的提交消息:

  • 遵循 Conventional Commits 1.0.0 格式
  • 标题最多 50 个字符,正文每行最多 70 个字符
  • 使用过去时
  • 仅说明做了什么和为什么,不说明如何做
  • 使用英式拼写
  • 写成连贯的段落;只有在包含多个不同要点时才使用项目符号
  • 执行前先将提交消息呈现给用户审批

示例格式:

feat: added worktree deletion confirmation

Implemented confirmation dialogue before deleting worktrees to prevent
accidental data loss. The confirmation shows the worktree path and any
uncommitted changes that would be lost.

评论

支持 Markdown