360 Secure SkillHub
360 安全技能中心

commit-messages

该 Skill 通过 git status/diff/log 收集已暂存变更,按 Conventional Commits 规范分类并起草标题、正文与页脚,替换套话用词后写入 ./commit_msg.txt 并预览;无暂存变更时提示并停止,禁止使用 --no-verify。

athola
athola
热度 62.24
最近更新 2026-08-26 21:20:51
分类:开发依赖:代码执行 / 读写文件 / 内部调用大模型应用场景:代码生成 / 摘要总结 / 工作流

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add nm-sanctum-commit-messages
Metadata
name
commit-messages
description
Generates conventional commit messages from staged changes
version
1.9.8
triggers
["git","commit","conventional-commits","committing and needing a well-formatted message"]
metadata
{"openclaw":{"homepage":"https://github.com/athola/claude-night-market/tree/master/plugins/sanctum","emoji":"🦞"}}
source
claude-night-market
source_plugin
sanctum

Night Market Skill — ported from claude-night-market/sanctum. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

Conventional Commit Workflow

When To Use

  • Generating conventional commit messages from staged changes

When NOT To Use

  • Full PR preparation: use sanctum:pr-prep
  • Amending existing commits: use git directly

Steps

  1. Gather context (run in parallel):

    • git status -sb
    • git diff --cached --stat
    • git diff --cached
    • git log --oneline -5
    • When sem is available (see leyline:sem-integration): sem diff --staged --json for entity-level changes

    If nothing is staged, tell the user and stop.

    When sem output is available, use entity names (function, class, method) in the commit subject and body instead of parsing raw diff hunks. For example, "add function validate_webhook_url" instead of "add validation logic to notify.py".

  2. Classify: Pick type (feat, fix, docs, refactor, test, chore, style, perf, ci) and optional scope.

  3. Draft the message:

    • Subject: <type>(<scope>): <imperative summary> (50 chars max)
    • Body: What and why, wrapped at 72 chars
    • Footer: BREAKING CHANGE or issue refs
  4. Slop check: reject these words and replace with plain alternatives:

    Reject Use instead
    leverage, utilize use
    seamless smooth
    comprehensive complete
    robust solid
    facilitate enable
    streamline simplify
    optimize improve
    delve explore
    multifaceted varied
    pivotal key
    intricate detailed

    Also reject: "it's worth noting", "at its core", "in essence", "a testament to"

  5. Write to ./commit_msg.txt and preview.

Rules

  • NEVER use git commit --no-verify or -n
  • Write for humans, not to impress
  • If pre-commit hooks fail, fix the issues