prowler-commit について
prowler-commit は、Prowler リポジトリのコントリビューター向けにコミットを準備するスキルです。Conventional Commits の形式、スコープの選び方、メッセージ作成、コミット前の確認を定め、破壊的な Git 操作も制限します。
主な機能
- 01Conventional Commits の形式
- 02コミットタイプとスコープの指針
- 03簡潔なタイトルと本文のルール
- 04作成前の変更確認
- 05コミット前の確認手順
- 06強制プッシュと特定のコミット引数の制限
活用シーン
- 01API、UI、SDK、CI の変更にコミットメッセージを作成する
- 02リポジトリの変更に適したタイプとスコープを選ぶ
- 03コミットを準備し、実行前に確認を求める
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ prowler-cloud/ prowler --skill prowler-commitインストール後、Claude Code で/prowler-commitを入力して読み込まれたか確認します。
詳細
重要なルール
- 必ず Conventional Commits 形式を使用してください:
type(scope): description - 必ず1行目を72文字未満にしてください
- 必ずコミットする前にユーザーの確認を求めてください
- 詳細になりすぎないようにしてください(「6つのサブセクション」「3つのファイル」などの数を避けてください)
- タイトルに実装の詳細を含めないでください
- ユーザーが明示的に要求しない限り、
-nフラグを使用しないでください git push --forceまたはgit push -fを使用しないでください(破壊的な操作で、履歴を書き換えます)- コミットを先回りして提案しないでください。ユーザーから明示的に依頼されるまで待ってください
コミット形式
type(scope): concise description
- Key change 1
- Key change 2
- Key change 3
タイプ
| タイプ | 使用する場面 |
|---|---|
feat | 新機能や新しい機能性 |
fix | バグ修正 |
docs | ドキュメントのみの変更 |
chore | メンテナンス、依存関係、設定 |
refactor | 機能追加やバグ修正を伴わないコード変更 |
test | テストの追加または更新 |
perf | パフォーマンス改善 |
style | コード変更を伴わない書式設定 |
スコープ
| スコープ | 対象 |
|---|---|
api | api/ の変更 |
ui | ui/ の変更 |
sdk | prowler/ の変更 |
mcp | mcp_server/ の変更 |
skills | skills/ の変更 |
ci | .github/ の変更 |
docs | docs/ の変更 |
| 省略 | 複数のスコープ、またはルートレベル |
良い例と悪い例
タイトル行
# GOOD - Concise and clear
feat(api): add provider connection retry logic
fix(ui): resolve dashboard loading state
chore(skills): add Celery documentation
docs: update installation guide
# BAD - Too specific or verbose
feat(api): add provider connection retry logic with exponential backoff and jitter (3 retries max)
chore(skills): add comprehensive Celery documentation covering 8 topics
fix(ui): fix the bug in dashboard component on line 45
本文(箇条書き)
# GOOD - High-level changes
- Add retry mechanism for failed connections
- Document task composition patterns
- Expand configuration reference
# BAD - Too detailed
- Add retry with max_retries=3, backoff=True, jitter=True
- Add 6 subsections covering chain, group, chord
- Update lines 45-67 in dashboard.tsx
ワークフロー
-
変更を分析する
git status git diff --stat HEAD git log -3 --oneline # Check recent commit style -
コミットメッセージを作成する
- 適切なタイプとスコープを選択する
- 簡潔なタイトルを書く(72文字未満)
- 重要な変更について2~5個の箇条書きを追加する
-
確認のためにユーザーに提示する
- コミットするファイルを示す
- 提案するメッセージを示す
- 明示的な確認を待つ
-
コミットを実行する
git add <files> git commit -m "$(cat <<'EOF' type(scope): description - Change 1 - Change 2 EOF )"
判断フロー
Single file changed?
├─ Yes → May omit body, title only
└─ No → Include body with key changes
Multiple scopes affected?
├─ Yes → Omit scope: `feat: description`
└─ No → Include scope: `feat(api): description`
Fixing a bug?
├─ User-facing → fix(scope): description
└─ Internal/dev → chore(scope): fix description
Adding documentation?
├─ Code docs (docstrings) → Part of feat/fix
└─ Standalone docs → docs: or docs(scope):
コマンド
# Check current state
git status
git diff --stat HEAD
# Standard commit
git add <files>
git commit -m "type(scope): description"
# Multi-line commit
git commit -m "$(cat <<'EOF'
type(scope): description
- Change 1
- Change 2
EOF
)"
# Amend last commit (same message)
git commit --amend --no-edit
# Amend with new message
git commit --amend -m "new message"
コメント
Markdown 対応