mcpField
P
prowler-commit

prowler-commit

github.com/prowler-cloud開発15.1k70 回インストール今日更新
リポジトリ

prowler-commit について

prowler-commit は、Prowler リポジトリのコントリビューター向けにコミットを準備するスキルです。Conventional Commits の形式、スコープの選び方、メッセージ作成、コミット前の確認を定め、破壊的な Git 操作も制限します。

主な機能

  1. 01Conventional Commits の形式
  2. 02コミットタイプとスコープの指針
  3. 03簡潔なタイトルと本文のルール
  4. 04作成前の変更確認
  5. 05コミット前の確認手順
  6. 06強制プッシュと特定のコミット引数の制限

活用シーン

  1. 01API、UI、SDK、CI の変更にコミットメッセージを作成する
  2. 02リポジトリの変更に適したタイプとスコープを選ぶ
  3. 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コード変更を伴わない書式設定
スコープ
スコープ対象
apiapi/ の変更
uiui/ の変更
sdkprowler/ の変更
mcpmcp_server/ の変更
skillsskills/ の変更
ci.github/ の変更
docsdocs/ の変更
省略複数のスコープ、またはルートレベル

良い例と悪い例

タイトル行
# 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

ワークフロー

  1. 変更を分析する

    git status
    git diff --stat HEAD
    git log -3 --oneline  # Check recent commit style
    
  2. コミットメッセージを作成する

    • 適切なタイプとスコープを選択する
    • 簡潔なタイトルを書く(72文字未満)
    • 重要な変更について2~5個の箇条書きを追加する
  3. 確認のためにユーザーに提示する

    • コミットするファイルを示す
    • 提案するメッセージを示す
    • 明示的な確認を待つ
  4. コミットを実行する

    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"

コメント