commit

创建遵循常规提交格式的 git 提交。使用场景:被要求提交更改。

📖 中文导读:创建遵循常规提交格式的 git 提交。使用场景:被要求提交更改。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: commit description: Create git commits following conventional commits format. Use when asked to commit changes. allowed-tools: Bash, Read, Grep, Glob

Commit Changes

Create commits following the Conventional Commits specification.

Format

<type>(<scope>): <subject>

<body>

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation only
  • style: Formatting, no code change
  • refactor: Code change that neither fixes a bug nor adds feature
  • test: Adding or updating tests
  • chore: Build process, auxiliary tools, libraries

Rules

  1. Subject line: imperative mood, lowercase, no period, max 50 chars
  2. Body: explain why not what (the diff shows what)
  3. Wrap body at 72 characters
  4. Reference issues when relevant: "Fixes #123"

Process

  1. Run git status and git diff --staged to understand changes
  2. If nothing staged, stage relevant files with git add
  3. Determine appropriate type and scope from the changes
  4. Write commit message following the format
  5. Do NOT add "Generated by Claude" or co-author lines

Examples

feat(pubsub): add message timestamp to publisher

Include ROS2 clock timestamp in published messages to enable
message ordering and latency measurements.
fix(subscriber): handle empty message gracefully

Previously crashed on empty string. Now logs warning and continues.