description: 全変更をステージング、コミット、リモートへ push する(取り扱い注意) allowed-tools: Bash(git add:), Bash(git status:), Bash(git commit:), Bash(git push:), Bash(git diff:), Bash(git log:), Bash(git pull:*)

⚠️ 注意: すべての変更をステージング・コミットし、リモートへ push する。すべての変更がひとまとまりであると確信できる場合のみ使うこと。

ワークフロー

1. 変更を分析

並列で実行する:

2. 安全性チェック

❌ 検出時は STOP し WARN を出すべき項目:

API キー検証: 変更ファイルに以下のようなパターンがないか確認する:

OPENAI_API_KEY=sk-proj-xxxxx  # ❌ 実キーを検出!
AWS_SECRET_KEY=AKIA...         # ❌ 実キーを検出!
STRIPE_API_KEY=sk_live_...    # ❌ 実キーを検出!

# ✅ 許容されるプレースホルダ:
API_KEY=your-api-key-here
SECRET_KEY=placeholder
TOKEN=xxx
API_KEY=<your-key>
SECRET=${YOUR_SECRET}

✅ 確認事項:

3. 確認を求める

サマリを提示する:

📊 Changes Summary:
- X files modified, Y added, Z deleted
- Total: +AAA insertions, -BBB deletions

🔒 Safety: ✅ No secrets | ✅ No large files | ⚠️ [warnings]
🌿 Branch: [name] → origin/[name]

I will: git add . → commit → push

Type 'yes' to proceed or 'no' to cancel.

明示的な "yes" を待ってから先へ進む。

4. 実行(確認後)

順番に実行する:

git add .
git status  # ステージングを確認

5. コミットメッセージを生成

変更を分析し、Conventional Commits 形式のコミットを作成する:

形式:

[type]: Brief summary (max 72 characters)

- Key change 1
- Key change 2
- Key change 3

Types: featfixdocsstylerefactortestchoreperfbuildci

例:

docs: Update concept README files with comprehensive documentation

- Add architecture diagrams and tables
- Include practical examples
- Expand best practices sections

6. コミットと push

git commit -m "$(cat <<'EOF'
[Generated commit message]
EOF
)"
git push  # 失敗時: git pull --rebase && git push
git log -1 --oneline --decorate  # 確認

7. 成功を通知

✅ Successfully pushed to remote!

Commit: [hash] [message]
Branch: [branch] → origin/[branch]
Files changed: X (+insertions, -deletions)

エラーハンドリング

使うべきとき

適している場面:

避けるべき場面:

代替案

ユーザーがより細かく制御したい場合は次を提案する:

  1. 選択的ステージング: 特定ファイルをレビュー/ステージング
  2. インタラクティブステージング: パッチ単位の選択に git add -p
  3. PR ワークフロー: ブランチを作成 → push → PR(/pr コマンドを使う)

⚠️ 注意: push する前に必ず変更を確認する。迷ったら、より細かい制御のため個別の git コマンドを使う。


Last Updated: April 9, 2026