How this skill is triggered — by the user, by Claude, or both
Slash command
/git-actions:git-conventionsThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
このスキルは Git 操作における共通の規則とベストプラクティスを提供します。
このスキルは Git 操作における共通の規則とベストプラクティスを提供します。
git-commit や git-push スキルと組み合わせて自動適用されます。
重要: すべての git コマンドは作業ディレクトリ(カレントディレクトリ)で直接実行する。
# ✅ 正しい使い方
git status
git diff
git add src/app.ts
git commit -m "message"
git push
# ❌ 禁止: git -C を使わない
git -C /path/to/repo status
git -C /Users/user/project diff
理由:
git -C は冗長であり、パスの誤りによるリスクがある| 操作 | 理由 |
|---|---|
git -C <path> オプション | 作業ディレクトリで直接実行すること。冗長で不要 |
| git config の更新 | セキュリティリスク |
| main/master への force push | 共同作業者への影響 |
--no-verify オプション | hook をスキップすべきでない |
--no-gpg-sign オプション | 署名をスキップすべきでない |
git reset --hard の無確認実行 | データ消失リスク |
以下のすべてを満たす場合のみ使用可能:
git log -1 --format='%an %ae' で確認)git status で確認)コミットが失敗または reject された場合は、絶対に --amend を使用しない。問題を修正して新しいコミットを作成する。
以下のファイルは絶対にコミットしない:
.env
.env.*
.env.local
.env.*.local
credentials.json
secrets.*
*.pem
*.key
*.p12
config/local.*
検出した場合は警告を表示し、ユーザーに確認を求める。
HEREDOC 形式を使用:
git commit -m "$(cat <<'EOF'
メッセージ本文
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
EOF
)"
| 動詞 | 用途 |
|---|---|
add | 完全に新しい機能 |
update | 既存機能の改善 |
fix | バグ修正 |
refactor | 機能変更なしのコード改善 |
docs | ドキュメントのみの変更 |
test | テストのみの変更 |
chore | ビルド、CI、依存関係の変更 |
以下の読み取り系コマンドは並列実行で効率化:
# 並列実行可能
git status
git diff
git diff --staged
git log --oneline -5
git branch -vv
# 1. 状態確認(並列)
git status & git diff & git log --oneline -3
# 2. ステージング
git add <files>
# 3. コミット(HEREDOC形式)
git commit -m "$(cat <<'EOF'
...
EOF
)"
# 4. プッシュ前確認
git log @{u}..HEAD --oneline
# 5. プッシュ
git push
# ❌ 禁止: hook スキップ
git commit --no-verify
# ❌ 禁止: main への force push
git push --force origin main
# ❌ 禁止: 無確認の hard reset
git reset --hard HEAD~3
npx claudepluginhub biwakonbu/cc-plugins --plugin git-actionsManages Git commit workflow using Conventional Commits format with safety protocols. Creates, validates, executes commits; handles hooks, PRs, and safety checks before operations.
Provides complete Git expertise for all operations: repo management, branch strategies, conflict resolution, history rewriting/recovery, advanced commands like rebase/cherry-pick, and platform workflows for GitHub/Azure DevOps/Bitbucket. Safety guardrails for destructive actions.
Enforces Git workflow standards including Conventional Commits, branch naming, and PR merge strategies for team collaboration.