SuperAPI AI Directory

create-commit

Coding & development

View repository

Updated 10-15 21:40

About this skill

create-commit

Analyze the changes and create a commit in Conventional Commits format.

Flow

Step 1: Check the changes

git status
git diff --staged

If there is nothing staged, git diff also check and guide the user to stage changes.

Step 2: Determine the Conventional Commits type

type Purpose
feat New feature
fix Bug fix
docs Documentation-only changes
refactor Code refactoring without functional changes
test Adding or fixing tests
chore Changes to the build process, auxiliary tools, etc.
style Code style-only changes (whitespace, formatting, etc.)
build Changes to the build system or external dependencies
ci Changes to CI configuration
perf Performance improvements

Step 3: Infer the scope

Infer the scope from the paths of the changed files. If it spans multiple areas, it may be omitted.

Step 4: Generate the commit message and confirm with the user

Format: type(scope): subject

Example:

feat(auth): ソーシャルログイン機能を追加
fix(api): レスポンスのエラーハンドリングを修正
refactor(ui): コンポーネント構造を整理

Propose it to the user and get confirmation.

Step 5: Execute the commit

git commit -m "$(cat <<'EOF'
type(scope): subject

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"

Important: --no-verify must never be used (do not bypass pre-commit hooks).

Notes

  • If there is a breaking change, add ! : feat!: ... or in body BREAKING CHANGE: write
  • Write the subject in the imperative, present tense (Japanese is acceptable)
  • Keep the subject within 72 characters
  • .env If it contains or credential files, warn the user and abort the commit