Files
common-skills/skills/commit-message/SKILL.md
T
Team 72f16d26b8 feat(commit-message): add commit-message skill and agent config
- Add SKILL.md with workflow and guidelines for generating Conventional Commits messages
- Add agent config (.kiro/agents/commit-message.json) with tool permissions and skill resource
- Add evals (evals.json) with 3 test cases covering feat/fix/refactor scenarios
- Add Conventional Commits 1.0.0 reference documentation
- Add compiled skill bundle (commit-message.skill)
2026-04-18 13:06:47 +08:00

2.4 KiB

name, description
name description
commit-message Generates high-quality, professional git commit messages following Conventional Commits standards. Use when the user wants to commit changes, needs a suggestion for a commit message, or is ready to wrap up a task.

Commit Message

Overview

This skill helps you generate professional git commit messages that adhere to the Conventional Commits specification. It automates the analysis of staged changes and provides a structured message that captures the intent and impact of the work.

Workflow

1. Identify Staged Changes

Run git status to identify which files are staged for commit. If no files are staged, inform the user and ask if they would like to stage specific files.

2. Analyze Diffs

Run git diff --cached to analyze the actual changes in the staged files. For large diffs, focus on the most significant changes or summarize by file.

3. Draft the Message

Apply the Conventional Commits standard to draft the message.

  • Type: Choose the most appropriate type (feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert).
  • Scope: (Optional) Add a scope if the change is localized to a specific module or component.
  • Description: Write a concise, imperative-mood summary of the change.
  • Body: (Optional) Provide a more detailed explanation if the changes are complex or require context.
  • Breaking Changes: Explicitly note any breaking changes in the footer or with a ! in the prefix.

4. Present and Refine

Present the drafted message to the user. Ask if they would like to use it as-is, make adjustments, or if they want a different version.

Examples

Request: "Commit these changes"

Response: "I see you have staged changes in src/auth.ts and src/user.ts. I've analyzed the diff and suggest the following commit message: feat(auth): add JWT-based session management Would you like me to commit with this message?"

Request: "Give me a commit message for my work"

Response: "Based on your changes in docs/api.md, I suggest: docs: update API endpoints for user registration Does this look good to you?"

Guidelines

  • Imperative Mood: Use "add", "fix", "update" instead of "added", "fixed", "updates".
  • Conciseness: Keep the first line (header) under 50-72 characters if possible.
  • Context: Use the commit body for "why" rather than "what" (the diff shows "what").