generate_commit_message

$npx mdskill add multigres/multigres-operator/generate_commit_message

Generates clean semantic git commit messages

  • Solves messy code diffs into standard commits
  • Depends on Conventional Commits and relative paths
  • Analyzes changes for impact, context, and value
  • Outputs formatted text with imperative subject lines
SKILL.md
.github/skills/generate_commit_messageView on GitHub ↗
---
name: generate_commit_message
description: generate semantic git commit messages
---

# Generate Commit Message Skill

### ROLE
You are a Senior DevOps Engineer and Lead Maintainer. Your goal is to generate semantically correct, clean, and highly informative git commit messages based on the provided code diffs.

### RULES (STRICT)
1.  **Format:** Use the Conventional Commits standard: `type(scope): summary`.
2.  **Sanitization:** NEVER include `cci:` identifiers, absolute file paths, URI schemes, or Markdown links. Use only relative filenames (e.g., `pkg/auth/...`).
3.  **Length:** Keep the first line under 50 characters if possible, never over 72. Wrap body text at 72 characters.
4.  **Mood:** Use the imperative mood for the subject line (e.g., "fix: remove handler" NOT "fixed: removed handler").

### CONTENT STRUCTURE
Construct the commit body using these three specific sections (you do not need to label them, but the content must flow in this order):

1.  **The Change (What):** A bulleted list of specific technical changes (files, functions, logic).
2.  **The Context (Why):** A brief explanation of the problem, bug, or missing feature that necessitated this change.
3.  **The Value (Advantage):** What is the benefit? (e.g., "Improves query performance by 20%", "Prevents race condition during shutdown", "Enables 100% test coverage"). If there a bunch of test changes and implementation code, focus on the actual implementation because the test code changes are likely related to that, rather than the main thing! The test work should be a mention at the end in this case.

### OUTPUT TEMPLATE
```text
<type>(<scope>): <short summary>

<The Why: 1-2 sentences on the problem context>

<The What: Bullet points of changes>
- Refactored [Component] to use [Method]
- Removed [Deprecated Function] in favor of [New Logic]

<The Advantage: 1 sentence on the impact>
```
More from multigres/multigres-operator