git-commit-message
Generate Git commit messages from staged changes when requested.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate Git commit messages from staged changes when requested.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Use whenever a user mentions or references a Jira ticket and you want to pull out description, comments, or more.
Use when writing or updating unit tests (in any language).
Scan and triage Snyk security findings in local repositories and container images. Use for Snyk vulnerability reviews, scan summaries, severity filtering, and remediation planning.
Use the SonarQube CLI to access and understand SonarQube analysis results. Use when the user asks about SonarQube issues.
Suggests improvements for English-language text but does not rewrite the original. Use when asked to correct spelling or wording and the text is English.
Review GitHub pull requests using gh CLI and the GitHub API. Use when asked to review a PR, inspect PR changes, or choose approve/comment/request-changes.
| name | git-commit-message |
| description | Generate Git commit messages from staged changes when requested. |
Create a commit message for the staged changes. If changes are staged, return only the commit message, with no code fence or commentary. Otherwise, report that nothing is staged.
List the staged files:
git diff --cached --name-onlyIf this produces no output, report that nothing is staged and do not invent a message. Otherwise, read the complete staged diff:
git diff --cachedUse the conversation context to understand the rationale, but describe only the staged diff. Ignore unstaged and untracked changes.
Read recent non-merge commit subjects before drafting the message:
git log -30 --no-merges --format=%sMatch the established style. Use Conventional Commit syntax such as
feat(scope): ... or fix(scope): ... only when it clearly dominates recent
history. Isolated examples and component prefixes such as subdir: ... do not
establish that convention.
infra, config, prod, and dev over
infrastructure, configuration, production, and development.fix, not fixed or fixes.<component>: <imperative summary> and match the casing used in recent
history. Otherwise, capitalize the first word of an unprefixed subject.Use this format unless the subject fully describes one small, self-explanatory change:
<subject>
Changes:
- <change or rationale>
- <change or rationale>
Before returning the message, run scripts/validate_commit_message.py. Resolve
its path relative to this SKILL.md directory and provide the draft through
standard input or in a file:
python3 /path/to/git-commit-message/scripts/validate_commit_message.py \
/path/to/draft-message
Revise and rerun the validator until it exits successfully. Never estimate line lengths manually.
git-commit-message: improve guidance
Changes:
- Match subject formatting to established repository history
- Validate commit message formatting before returning the result
- Avoid Conventional Commit syntax unless the project clearly uses it