writing-commits について
writing-commits は、Conventional Commits に沿ったコミットメッセージや Pull Request のタイトルと本文を作成する開発者向けスキルです。ブランチ名の形式と例も示します。
主な機能
- 01Conventional Commits に準拠
- 02件名とタイプのルール
- 03PR タイトルと本文のテンプレート
- 04ブランチ命名形式の定義
活用シーン
- 01機能追加のコミットメッセージ作成
- 02破壊的変更のコミットへの明記
- 03PR タイトルと本文の準備
- 04タイプに沿った開発ブランチの命名
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ augmnt/ webdev-skills --skill writing-commitsインストール後、Claude Code で/writing-commitsを入力して読み込まれたか確認します。
詳細
コミットの書き方
Conventional Commits に従います:<type>(<scope>): <subject>
種別
| 種別 | 用途 |
|---|---|
feat | ユーザー向けの新機能 |
fix | バグ修正 |
docs | ドキュメントのみ |
refactor | 動作を変更しないコード変更 |
test | テストの追加・修正 |
chore | ビルド、依存関係、ツール関連 |
ルール
- 件名:命令形にし、末尾にピリオドを付けず、50文字以内にします
- スコープ:任意の対象領域(auth、api、ui)
- 破壊的変更:種別の後に
!を追加します
例
feat(auth): add Google OAuth login
fix(api): handle null user in profile endpoint
feat(api)!: change auth response format
chore(deps): upgrade Next.js to 15
避けるべきパターン
# ❌ Avoid
"fix stuff"
"updates"
"WIP"
# ✅ Prefer
"fix(auth): resolve token refresh race condition"
PR タイトル
コミットと同じ形式にします。PR タイトルは squash コミットメッセージになります。
PR の本文
## What
[Brief description]
## Why
[Context/motivation]
## Testing
[How verified]
ブランチの命名
# Format: type/short-description
feat/oauth-login
fix/token-refresh
chore/upgrade-deps
# With ticket numbers
feat/PROJ-123-oauth-login
fix/PROJ-456-token-refresh
ブランチは短期間だけ使用します。マージ後に削除します。
コメント
Markdown 対応