git-commit
このプロジェクトにおけるGitコミットの手順とコミットメッセージの規約を理解し、適切にコミットできる。
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Git Commit
Workflow
1. Check Staged Changes
コミット可能かどうかを確認するため、まずステージされた変更を確認します。
git diff --cached --stat
もし変更がない場合は、ユーザーに git add した上で続行するかを確認します。
2. Analyze Diff
変更内容を詳細に確認します。
git diff --cached
3. Generate Commit Message
Conventional Commits に従ってコミットメッセージを生成します。
Format
<type>(<scope>): <subject>
[body]
Types
-
feat:- 新機能の追加 -
fix:- バグ修正 -
refactor:- リファクタリング -
docs:- ドキュメントの追加・更新 -
style:- フォーマット修正 (コードの動作に影響しない変更) -
perf:- パフォーマンス改善 -
test:- テストコードの追加・修正 -
chore:- メンテナンス作業-
chore(deps):- 依存関係の更新
-
Common Scopes: server, client, deps
Subject
変更内容を元に「どのような変更を行ったか」を簡潔に伝えます。
-
常に 現在形の命令形で始める (e.g.
add,implement,fix,improve,enhance,refactor,remove) - 常に タイトルは50文字以内
- 決して 大文字で始めない
- 決して ピリオドで終わらせない
-
決して 内容のないコミットメッセージにしない (e.g.
update,fix bugs)
4. Commit Changes
生成したコミットメッセージを使用して変更をコミットします。
# Simple
git commit -m "<type>(<scope>): <subject>"
# With Body
git commit -m "$(cat <<'EOF'
<type>(<scope>): <subject>
[body]
EOF
)"
Commit Message Examples
-
feat(chroma-cli): add new options for foobar -
fix(server): resolve validation issue in user input -
chore(deps): update Deno to X.Y.Z
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!