create-commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesecreate-commit
create-commit
変更内容を分析して Conventional Commits 形式でコミットを作成します。
Analyze changes and create commits in Conventional Commits format.
フロー
Flow
Step 1: 変更内容を確認する
Step 1: Check changes
bash
git status
git diff --stagedstaged がない場合は も確認してユーザーに staging を案内する。
git diffbash
git status
git diff --stagedIf there are no staged changes, also check and guide the user to stage changes.
git diffStep 2: Conventional Commits type を決定する
Step 2: Determine Conventional Commits type
| type | 用途 |
|---|---|
| 新機能 |
| バグ修正 |
| ドキュメントのみの変更 |
| 機能変更なしのコードリファクタリング |
| テストの追加・修正 |
| ビルドプロセス・補助ツール等の変更 |
| コードスタイルのみの変更(空白、フォーマット等) |
| ビルドシステムや外部依存関係の変更 |
| CI 設定の変更 |
| パフォーマンス改善 |
| type | Purpose |
|---|---|
| New feature |
| Bug fix |
| Documentation-only changes |
| Code refactoring without functional changes |
| Adding or modifying tests |
| Changes to build processes or auxiliary tools |
| Code style-only changes (whitespace, formatting, etc.) |
| Changes to build systems or external dependencies |
| Changes to CI configuration |
| Performance improvements |
Step 3: scope を推定する
Step 3: Estimate scope
変更ファイルのパスから scope を推定する。
複数にまたがる場合は省略可。
Estimate the scope from the path of changed files.
Can be omitted if changes span multiple scopes.
Step 4: コミットメッセージを生成してユーザーに確認する
Step 4: Generate commit message and confirm with user
フォーマット:
type(scope): subject例:
feat(auth): ソーシャルログイン機能を追加
fix(api): レスポンスのエラーハンドリングを修正
refactor(ui): コンポーネント構造を整理ユーザーに提案して確認を取る。
Format:
type(scope): subjectExamples:
feat(auth): Add social login functionality
fix(api): Fix response error handling
refactor(ui): Organize component structurePropose to the user and get confirmation.
Step 5: コミットを実行する
Step 5: Execute commit
bash
git commit -m "$(cat <<'EOF'
type(scope): subject
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"重要: は絶対に使用しない(pre-commit フックを迂回しない)。
--no-verifybash
git commit -m "$(cat <<'EOF'
type(scope): subject
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"Important: Never use (do not bypass pre-commit hooks).
--no-verify注意事項
Notes
- Breaking change がある場合は を付ける:
!または body にfeat!: ...を記述BREAKING CHANGE: - 件名は命令形・現在形で記述(日本語可)
- 件名は 72 文字以内
- や認証情報ファイルが含まれる場合は警告してコミットを中止する
.env
- Add for breaking changes:
!or writefeat!: ...in the bodyBREAKING CHANGE: - Subject should be in imperative and present tense (Japanese is allowed)
- Subject should be within 72 characters
- Warn and abort the commit if or authentication information files are included
.env