mcpField
U
unslop-commit

unslop-commit

github.com/mohamedabdallah-14开发165102 次安装2 天前更新
代码仓库

关于 unslop-commit

用于生成或改写 Conventional Commits 格式提交信息的技能,强调直接、具体的表达。它规范主题行和正文,并说明何时应解释破坏性变更、安全修复、迁移或回滚。

主要功能

  1. 01Conventional Commits 格式
  2. 02祈使语气主题行
  3. 03可选范围和正文
  4. 04破坏性变更说明规范
  5. 05不执行提交操作

适用场景

  1. 01为暂存的更改起草提交信息
  2. 02在提交正文说明安全修复
  3. 03记录迁移或回滚原因

安装

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

$npx skills add https://github.com/mohamedabdallah-14/unslop --skill unslop-commit

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

详细介绍

Unslop Commit

目的

生成或改写提交消息,让它读起来像真实工程师在真实的一天结束时写的。采用 Conventional Commits 格式。直接、具体,不用模板化英语。解释原因,而非只说做了什么。

触发条件

/unslop-commit、/commit、“write a commit”、“commit message”、“humanize this commit”、“de-slop this commit”。用户暂存更改并请求编写提交消息时,自动触发。

规则

主题行
  • 格式:<type>(<scope>): <imperative summary>
  • Scope 可选。类型:feat、fix、chore、refactor、docs、test、perf、build、ci、revert。
  • 使用祈使语气:add、fix、move、remove,不要用 added、fixes、fixing。
  • 尽量不超过 50 个字符。最多 72 个字符。
  • 末尾不加句号。
  • : 后使用小写,除非项目惯例使用大写。
正文(仅当主题行无法表达清楚时添加)
  • 适用于:不明显的“原因”、破坏性更改、迁移、安全背景、数据完整性。
  • 每行最多 72 个字符。两个或更多独立要点用 - 列出;只有一个想法时写成一个段落。
  • 末尾附上引用:Closes #42、Refs #17。除非确实有破坏性更改,否则不要写 BREAKING CHANGE:;如果有,就写明。
切勿包含
  • 模板化前缀:“This commit...”、“This change...”、“We are...”、“I have...”
  • 营销用语:comprehensive、robust、enhance、leverage、seamless、holistic
  • 填充性副词:just、really、basically、simply、actually
  • Scope 已说明文件名时,不要重复写文件名
  • “As requested by...” (需要注明贡献者时,使用 Co-authored-by:)
  • 除非项目要求,否则不要注明 AI 参与
  • 除非项目惯例要求,否则不要使用表情符号
自动清晰说明(始终添加正文)
  • 破坏性更改
  • 安全修复
  • 数据迁移
  • Revert(注明被撤销的提交)

示例

错误 → 正确(主题行冗长,没有正文)
  • 错误:feat: implement a comprehensive, robust solution for user profile retrieval with enhanced error handling
  • 正确:feat(api): return profile fields the mobile client actually needs
错误 → 正确(正文含糊)

错误:

fix: fixed the bug

This commit addresses an issue where the application was not working correctly
in some edge cases. We've improved the logic to handle these scenarios.

正确:

fix(checkout): ignore stale cart id from localStorage

Stale cart ids came from tabs that hadn't refreshed after a deploy. Server
now treats unknown ids as empty cart instead of 500.

Closes #842
破坏性更改
feat(api)!: rename /v1/orders to /v1/customer-orders

The old route stays in place until the next major release but logs a
deprecation warning. Internal services have been migrated.

BREAKING CHANGE: third-party integrations using /v1/orders directly need
to switch to /v1/customer-orders by 2026-07-01.

Closes #1290

限制

  • 只输出提交消息,放在单个围栏代码块中,可直接粘贴。
  • 不要运行 git commit,不要暂存更改,也不要 amend。
  • 如果更改确实微不足道(docs(readme): fix typo),就保持简短。不要凑字数。
  • 切勿编造用户未提供的背景。如果原因不明确,就提问,或省略正文。

评论

支持 Markdown